Re: [NTG-context] wrong /Rect in link annotations

2020-11-07 Thread Hans Hagen
On 11/7/2020 12:47 PM, Pablo Rodriguez wrote: Dear list, I have the following sample: \setupinteraction[state=start] \enabledirectives[references.border] %~ \definemakeup[slide] \define[1]\newurl{\goto{\tt\hyphenatedurl{#1}}[url(#1)]} \starttext %~ \startmakeup[slide

[NTG-context] wrong /Rect in link annotations

2020-11-07 Thread Pablo Rodriguez
Dear list, I have the following sample: \setupinteraction[state=start] \enabledirectives[references.border] %~ \definemakeup[slide] \define[1]\newurl{\goto{\tt\hyphenatedurl{#1}}[url(#1)]} \starttext %~ \startmakeup[slide] \newurl{a} compared to \newurl{a}. %~ \stopmakeup

Re: [NTG-context] force index entries without page number

2020-11-07 Thread Henning Hraban Ramm
e that? >> I also need to be able to refer to it like >> \seeindex{Hraban}{Ramm, Hraban) > > > You can use this when the entry appears only once which replaces the page > number with "passim". > > \define[1]\Passim > {passim} > > \defineprocessor [pass

[NTG-context] MP background for text typeset by \typefile

2020-11-05 Thread context
, ]% }, after={\stopframedtext }, ] - which allows to define a custom background via overlay/MP, but which encloses the text to be typeset into a framed, and thus doesn't spread over pages. My intention is to "decore" the text typed by

Re: [NTG-context] Filler rules

2020-10-22 Thread Willi Egger
had something like \definerule[…][…] and >> \setuprule[…][…]. This made it possible to create lines of a define width. > > I'm sorry but I'm unable to find any code or proper example for the command. > >> So what I found is the fillers, which apparently are not meant for

Re: [NTG-context] Filler rules

2020-10-22 Thread Wolfgang Schuster
Willi Egger schrieb am 15.10.2020 um 21:59: Hoi, In earlier times we had something like \definerule[…][…] and \setuprule[…][…]. This made it possible to create lines of a define width. I'm sorry but I'm unable to find any code or proper example for the command. So what I found

[NTG-context] lmts status

2020-10-22 Thread Hans Hagen
have primitives that can get a heavy protection against overload. We also have macro package system commands and these can get a pretty hard protection too. Commands defined by users (using \define...) can be treated less strict. Of course we also have all kind of runtime (temporary) macros that we

Re: [NTG-context] content of xml node (element) in lua

2020-10-17 Thread Jano Kula
On Sat, 17 Oct 2020 at 12:02, Hans Hagen wrote: > On 10/17/2020 12:16 AM, mf wrote: > > (sorry, I sent it before refining it) > > > > Il 16/10/20 20:57, Jano Kula ha scritto: > >> Hello! > >> > >> Processing XML I want to manipulate content of

Re: [NTG-context] content of xml node (element) in lua

2020-10-17 Thread Hans Hagen
On 10/17/2020 12:16 AM, mf wrote: (sorry, I sent it before refining it) Il 16/10/20 20:57, Jano Kula ha scritto: Hello! Processing XML I want to manipulate content of XML elements inside Lua. I can define the Lua function xml.functions.name <http://xml.functions.name>(t), where proc

Re: [NTG-context] content of xml node (element) in lua

2020-10-16 Thread mf
(sorry, I sent it before refining it) Il 16/10/20 20:57, Jano Kula ha scritto: Hello! Processing XML I want to manipulate content of XML elements inside Lua. I can define the Lua function xml.functions.name <http://xml.functions.name>(t), where processing happens, and use the c

[NTG-context] content of xml node (element) in lua

2020-10-16 Thread Jano Kula
Hello! Processing XML I want to manipulate content of XML elements inside Lua. I can define the Lua function xml.functions.name(t), where processing happens, and use the command \xmlfunction{#1}{name} to pass the current node #1 from ctx to lua as described in the xml-mkiv.pdf manual. To access

Re: [NTG-context] Filler rules

2020-10-15 Thread Willi Egger
Hoi, In earlier times we had something like \definerule[…][…] and \setuprule[…][…]. This made it possible to create lines of a define width. — So what I found is the fillers, which apparently are not meant for the purpose I am looking for. Kind regards Willi > On 14 Oct 2020, at 16

[NTG-context] space between chapter and chapter number (in words)

2020-10-14 Thread jbf
nothing to solve the problem: \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 2.5cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-2.5cm\relax    \doifsomething{\rawstructurelistuservariable{year

[NTG-context] index issues

2020-10-14 Thread Henning Hraban Ramm
suppose you’ll remember; I left out the Lua table lookup for unified entries): \defineprocessor[kursiv][style=italicface] \define[1]\nIndex{\doifmodeelse{*footnote}{% \expanded{\index[kursiv->]{#1}}}% }{% \expanded{\index{#1}}}% }} (2) Can I avoid linebreaking of page ranges in \placein

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
t;> return string.match(name, "%d+") >> end >>\stopluacode >> >>\define[1]\numbersfname >>{\cldcontext{userdata.numbersfname([==[#1]==])}} > > Untested: > > \defineexpandable[1]\numbersfname >   {\cldcontext{userd

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Wolfgang Schuster
communicating between tex and lua. For example: [...] \define[1]\numbersfname {\cldcontext{userdata.numbersfname([==[#1]==])}} This is the first time I see that way of wrapping an argument. In any case, I cannot compare to a number: \startluacode userdata = userdata or {} function

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Pablo Rodriguez
and lua. For example: > [...] > \define[1]\numbersfname > {\cldcontext{userdata.numbersfname([==[#1]==])}} This is the first time I see that way of wrapping an argument. In any case, I cannot compare to a number: \startluacode userdata = userdata or {} funct

Re: [NTG-context] need help comparing strings

2020-10-13 Thread Aditya Mahajan
> I need to get the number from \env{fname} and I don’t know what I’m > missing. \doif is the way to test whether it’s right. > > Could anyone explain me what I’m missing here? I find it simpler to write macros where there is clean communicating between tex and lua. For exam

Re: [NTG-context] Sections in content: macros v text

2020-10-07 Thread Tomas Hala
hanks in advance for any hint. # > # >Best wishes, # > # >Tomáš # > # >MWE (TL2020): # >\starttext # >\define\name{aa} \startsection[title=\name,list=\name] \stopsection # >\define\name{bb} \startsection[title=\name,list=\name] \stopsection # >\completecontent # >

[NTG-context] wrong url border (LMTX only)

2020-10-07 Thread Pablo Rodriguez
Dear list, I have the following sample: \setupinteraction[state=start] \enabledirectives[references.border] \definemakeup[slide] \define[1]\newurl{\goto{\tt\hyphenatedurl{#1}}[url(#1)]} \starttext \startmakeup[slide]\newurl{a}\stopmakeup \stoptext LMTX (latest from

Re: [NTG-context] Sections in content: macros v text

2020-10-07 Thread Wolfgang Schuster
discussed by I am not able to find any solution how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,

Re: [NTG-context] help with forced page break in TOC

2020-10-05 Thread jbf
in contextgarden tells me to first define the break, which I have done: \definelistextra[page][before=\page] It then tells me to call this in where I \placecontent (in my case I am using my own defined \placecombined list[content]). The example given in the wiki is: \placecontent[extras={6=page

Re: [NTG-context] help with forced page break in TOC

2020-10-05 Thread Willi Egger
> situation: > > In my case, the ToC has no chapters per se, but uses a defined \mytitle. This > produces a series of unnumbered items in the ToC. > > The example in contextgarden tells me to first define the break, which I have > done: > > \definelistextra[page][b

Re: [NTG-context] Citeproc

2020-10-05 Thread Aditya Mahajan
ount of available styles in > > > CSL, I nevertheless think that this could be a worthwile addition. What > > > would be necessary to make such a toll usable with ConTeXt? How > > > complicated would that be? > > > > In principle, this should be trivial. D

[NTG-context] Sections in content: macros v text

2020-10-05 Thread Tomas Hala
how to send the text "aa" to the content in this case. Thanks in advance for any hint. Best wishes, Tomáš MWE (TL2020): \starttext \define\name{aa} \startsection[title=\name,list=\name] \stopsection \define\name{bb} \startsection[title=\name,list=\name] \stopsection \completecontent

Re: [NTG-context] Citeproc

2020-10-05 Thread Hans Hagen
, this should be trivial. Define a new command, say \citeproc[ref], which saves the values of `ref` to a lua table, and at the end of the run, write that lua table to an aux .json file, call citeproc and store output to a new file, and on the second run read from that file. This is essentially how

[NTG-context] help with forced page break in TOC

2020-10-04 Thread jbf
to first define the break, which I have done: \definelistextra[page][before=\page] It then tells me to call this in where I \placecontent (in my case I am using my own defined  \placecombined list[content]). The example given in the wiki is: \placecontent[extras={6=page}] But I have

Re: [NTG-context] Citeproc

2020-10-04 Thread Aditya Mahajan
principle, this should be trivial. Define a new command, say \citeproc[ref], which saves the values of `ref` to a lua table, and at the end of the run, write that lua table to an aux .json file, call citeproc and store output to a new file, and on the second run read from that file. This is ess

Re: [NTG-context] Tagged export breaks r2l alignment in tabulate

2020-09-30 Thread Wolfgang Schuster
Denis Maier schrieb am 30.09.2020 um 16:18: Ok, that works. Is it possible to define that both cells in the first row as left to right? (Like in the definition, not in the cell.) I don't think so but maybe table headers can help you. \starttext \starttabulatehead[] \BC \raggedcenter Column

Re: [NTG-context] Tagged export breaks r2l alignment in tabulate

2020-09-30 Thread Denis Maier
. Is it possible to define that both cells in the first row as left to right? (Like in the definition, not in the cell.) Best, Denis ___ If your question is of interest to others as well, please add an entry to the Wiki

[NTG-context] correct vertical alignment in ToC

2020-09-29 Thread jbf
the definition below) and section authors (given its definition below), I could solve this problem, but everything I have tried does not seem to work. Wolfgang had given me the ChapterListCommand definition, and I think Hraban the SectionTocentry: (1) CHAPTERLISTCOMMAND \define[3]\ChapterListCommand

Re: [NTG-context] More table questions

2020-09-22 Thread Denis Maier
product, I have to make some design decisions right at the beginning and I won't be able to make ad hoc adjustments. In tabulate you have several kinds of horizontal lines (\HL, \FL, \ML, \LL), but you need to set them and define their width individually. IMO the different line widths

Re: [NTG-context] More table questions

2020-09-22 Thread Denis Maier
Am 22.09.2020 um 20:55 schrieb Aditya Mahajan: On Tue, 22 Sep 2020, Denis Maier wrote: Also, how do you easiest define booktabs style tables? I mean: can you define tables such that the last row end with thicker lines without having to make this explicit? Is there a mechanism for this? You

Re: [NTG-context] More table questions

2020-09-22 Thread Aditya Mahajan
On Tue, 22 Sep 2020, Denis Maier wrote: > Also, how do you easiest define booktabs style tables? I mean: can you > define tables such that the last row end with thicker lines without > having to make this explicit? Is there a mechanism for this? You can get this behavior using any

Re: [NTG-context] More table questions

2020-09-22 Thread Henning Hraban Ramm
as it fits your needs, then natural tables (Hans dixit in 2019). > Also, how do you easiest define booktabs style tables? I mean: can you define > tables such that the last row end with thicker lines without having to make > this explicit? Is there a mechanism for this? (That would make

[NTG-context] More table questions

2020-09-22 Thread Denis Maier
Hi, I usually don't need tables, therefore this maybe stupid question: What is the currently recommended way to typeset tables? Still natural tables? Or extreme tables? (My tables won't be 30 pages long.) Also, how do you easiest define booktabs style tables? I mean: can you define tables

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-10 Thread Wolfgang Schuster
/reconfigurable) solution later if I end up needing a more complex paned-layout environment that doesn't need direct access to the TABLE (or some other more relevant) interface. MWE demonstrator; there's other cruft in the actual definitions for my purposes. \starttext     \define\startPaneSlide

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-09 Thread jbf
the following, using an idea Hraban had floated:  \setupsectionblock  [bodypart]  [number=no] \define[1]\SectionTocEntry{%   #1\crlf% title   \structurelistuservariable{author}% } \setuplist[section][   textcommand=\SectionTocEntry, ] I need to adjust the \setuplist[section] so these section entries

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-09 Thread Rudd, Kevin
a more complex paned-layout environment that doesn't need direct access to the TABLE (or some other more relevant) interface. MWE demonstrator; there's other cruft in the actual definitions for my purposes. \starttext \define\startPaneSlide{\bTABLE} \define\stopPaneSlide{\eTABLE} \long\def

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-09 Thread Rudd, Kevin
True. There is also a \define\continuePaneRow{\eTD\bTD} definition as well for that reason but that wasn't necessary for the MWE to (fail while) embed(ing) TABLE elements in macros. Is it the case that I can bundle at least the table setup commands to avoid some level of replication

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread jbf
   A. u. thor  3 We obviously should not be getting [foreword: --2] in our result, nor a doubling up of Chapter 1 2. Where do I stand now with the earlier definition  (I mean the \define[3]\ChapterListCommand. Is that still used? Including its \setuplist part? What you

Re: [NTG-context] styling individual parts of ToC entry

2020-09-09 Thread jbf
e will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgroup    \hsize\dimexpr\makeupwidth-3cm\relax    \doifsomething{\rawstructurelistuservariable{year}} {{\it\struc

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Wolfgang Schuster
ame, inner margins for panes wsn't an issue either way. When you need one than single block per line this definition \define\startPaneRow{bTR\bTD} \define\stopPaneRow{\eTD\eTR} doesn't make sense because you limit yourself and after each table cell there is a new row. While you can write c

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Rudd, Kevin
t all works fine and produces a suitable single-cell table with "quux blech baz bar foo" framed; when embedded in macros (whether defined by \def, \unexpanded\def, \define) then it fails with the error "The file ended when scanning an argument. => fatal error: return code: 256. A pre

Re: [NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Wolfgang Schuster
and produces a suitable single-cell table with "quux blech baz bar foo" framed; when embedded in macros (whether defined by \def, \unexpanded\def, \define) then it fails with the error "The file ended when scanning an argument. => fatal error: return code: 256. A previous ques

[NTG-context] problem embedding TABLE macros within wrapper macros "to reduce repetitive complexity")

2020-09-08 Thread Rudd, Kevin
with "quux blech baz bar foo" framed; when embedded in macros (whether defined by \def, \unexpanded\def, \define) then it fails with the error "The file ended when scanning an argument. => fatal error: return code: 256. A previous question on the topic seemed to indicate that TABL

Re: [NTG-context] Fullwidth topfigure with caption in the margin

2020-09-08 Thread Mikael Sundqvist
completely different solutions) are very welcome. /Mikael \setuplayout[ rightmargin=2in, rightmargindistance=0.375in, width=4.125in, ] \showframe \definecolor [transparentred] [r=1,t=.5,a=1] \definefloat[topfigure][topfigures][figure] \setupfloat[topfigure][ default={top,none}, location=flushright

[NTG-context] Fwd: Re: styling individual parts of ToC entry

2020-09-07 Thread jbf
at least). MWE: \definehead [foreword] [title] \definehead [preface] [title] \definehead [mysection] [section] \setupcombinedlist[chapter,foreword,preface,mysection,section, subsection] \define[3]\ChapterListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext

Re: [NTG-context] styling individual parts of ToC entry

2020-09-07 Thread Wolfgang Schuster
ons' with authors I need for Chapter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread jbf
ter Two. I assume I would set up a third definition called \SectionListCommand. Sections will have different labels too - one will be called 'Context', the other 'Reflection'. \define[3]\TitleListCommand   {\hbox\bgroup \hbox to 3cm{\currentlistsymbol\hss}% number + labeltext \vtop\bgr

Re: [NTG-context] styling individual parts of ToC entry

2020-09-06 Thread Wolfgang Schuster
to the \ChapterListCommand do I need to make to accommodate the following? Possibly an \else statement, but not sure how to include that: \startchapter [title={Chapter title}] [author={Author Name}] I forgot to change the argument for the check off the author entry, this should fix it. \define[3

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread jbf
the ToC, and (2) the first part of the entry (e.g. Foreword) to be bold, but the author name to be regular text. An adjusted version of Hraban's setup can show what I have tried by way of example: % \define[1]\TitleTocEntry{%    #1\hskip 1cm% title

Re: [NTG-context] styling individual parts of ToC entry

2020-09-05 Thread Wolfgang Schuster
: % \define[1]\TitleTocEntry{%   #1\hskip 1cm% title    \structurelistuservariable{author}%   } \setuplist[title][textstyle=bold,   textcommand=\TitleTocEntry, ] %--- /Question 1:/ /How to get the two author names to line up vertically./ Given that I have both

[NTG-context] styling individual parts of ToC entry

2020-09-04 Thread jbf
: (1) the author's names lined up vertically throughout the ToC, and (2) the first part of the entry (e.g. Foreword) to be bold, but the author name to be regular text. An adjusted version of Hraban's setup can show what I have tried by way of example: % \define[1

Re: [NTG-context] Typing efficiency

2020-09-04 Thread Taco Hoekwater
tartmode[nl] > \getbuffer[nl] > \stopmode > > after every block of text? > > I tried to define a new start/stop pair as follows: > \definestartstop[Bufen][ > before={\startmode[en] > \startbuffer[en]}, > after={\stopbuffer > \getbuffer[en

[NTG-context] Typing efficiency

2020-09-04 Thread Jan Willem Flamma
to define a new start/stop pair as follows:\definestartstop[Bufen][    before={\startmode[en]    \startbuffer[en]},    after={\stopbuffer    \getbuffer[en]    \stopmode}] but that fails. No doubt a clever solution exists that minimizes the typing.  Kind regards,Jan Willem

Re: [NTG-context] author in ToC and other design complications

2020-09-04 Thread Henning Hraban Ramm
urelistuservariable instead. But if all of your chapters have the author set, you don’t need that check. > But I took your example and adjusted it for, say, a chapter which has just a > title (no subtitle) and an author, and added, below what I already have in > the pream

Re: [NTG-context] author in ToC and other design complications

2020-09-04 Thread jbf
) and an author, and added, below what I already have in the preamble: \define[1]\ChapterTocEntry{%   \structurelistuservariable{author}\crlf%   #1\crlf% title   %\structurelistuservariable{subtitle}}% } \setuplist[chapter][   textcommand=\ChapterTocEntry, ] So, in other words I swapped the word

Re: [NTG-context] force index entries without page number

2020-09-04 Thread Wolfgang Schuster
appears only once which replaces the page number with "passim". \define[1]\Passim {passim} \defineprocessor [passim] [command=\Passim] \starttext xxx\index{First} yyy\index[passim->]{Second} zzz\seeindex{Third}{Second} \placeindex \stopt

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-04 Thread Jan Willem Flamma
Flamma   The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define\MyManual{Course Manual}\define\MyTitle{Title}\define\MySubtitleOne{Subtitle 1}\define\MySubtitleTwo{Subtitle 2}\define\MyRevnumber{Revision number} % Load frontmatter files\startfront

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-03 Thread jbf
be able to copy and adapt to your needs. Kind regards, Jan Willem Flamma *The main product file* == \environment env-WA \startproduct currentproduct % Document definitions \define\MyManual{Course Manual} \define\MyTitle{Title} \define\MySubtitleOne{Subtitle 1} \define

Re: [NTG-context] defining font family for several options

2020-09-03 Thread jbf
even if you don't have mathematics in your text where you use that font, ConTeXt may pick some characters from math fonts. So in my opinion you should define a whole font family named mychapterfont, where in particular the sans serif comes from what you are indicating. The second point

Re: [NTG-context] \setupuserpagenumber not working as expected

2020-09-03 Thread Jan Willem Flamma
) Once the bodymatter starts the pagenumber is set  to the arabic 1 (see below in the main product file) You should be able to copy and adapt to your needs. Kind regards,Jan Willem Flamma   The main product file==\environment env-WA \startproduct currentproduct % Document definitions\define

Re: [NTG-context] defining font family for several options

2020-09-01 Thread jbf
That's now clear. Thank you. Julian On 2/9/20 9:59 am, Otared Kavian wrote: Hi Julian, What Aditya means is that you define two (or more) font families: one is named mainface as yu have already done, the other named mychapterfont (for instance) where you attribute whatever fonts you wish

Re: [NTG-context] defining font family for several options

2020-09-01 Thread Otared Kavian
Hi Julian, What Aditya means is that you define two (or more) font families: one is named mainface as yu have already done, the other named mychapterfont (for instance) where you attribute whatever fonts you wish to sans serif and else. Then when you want to use the special font in some

Re: [NTG-context] defining font family for several options

2020-09-01 Thread jbf
I presume you mean, {\switchtobodyfont[itcavantgarde]\ss My text} for the case I mentioned? Because at no point in the example I gave of \definefontfamily[mainface] had I defined ss as an AvanteGarde typeface, and that is the heart of my question. Can I somehow define two kinds of sans serif

Re: [NTG-context] odd behaviour with \definefontfamily

2020-08-25 Thread jbf
not, as yet, used that anywhere (and may not - it is there for insurance in case such a glyph is needed)? Julian On 26/8/20 11:58 am, Aditya Mahajan wrote: On Wed, 26 Aug 2020, jbf wrote: Can someone tell me why, when I define my typefaces as follows below, I get: mkiv lua stats  > loaded fonts

Re: [NTG-context] odd behaviour with \definefontfamily

2020-08-25 Thread Aditya Mahajan
On Wed, 26 Aug 2020, jbf wrote: > Can someone tell me why, when I define my typefaces as follows below, I get: > > mkiv lua stats  > loaded fonts: 2 files: baskervaldadfstd.otf, > texgyrepagella-math.otf > > when in fact my font definitions are: > > \defi

[NTG-context] odd behaviour with \definefontfamily

2020-08-25 Thread jbf
Can someone tell me why, when I define my typefaces as follows below, I get: mkiv lua stats  > loaded fonts: 2 files: baskervaldadfstd.otf, texgyrepagella-math.otf when in fact my font definitions are: \definefontfamily [mainface] [rm] [baskervaldadfstd] [tf=file:BaskervaldADFStd.

Re: [NTG-context] Overriding the number on a float

2020-08-25 Thread Aditya Mahajan
a safe way to increment the subfigure number automatically, > unfortunately. Another option is to define: \startplacesubfigure ... \stopplacesubfigure which could use the current value of figure counter as prefix and increment the subfigure counter. Something similar is there for subform

[NTG-context] short filler rule either side of a text

2020-08-24 Thread jbf
I know it is possible to get a rule to act as a filler either side of, say, a chapter head text by using \definefiller with alternative=rule and, as explained in an earlier post <https://tex.stackexchange.com/questions/497352/context-heading-text-surrounded-by-lines/497389#497389>,

Re: [NTG-context] color question

2020-08-24 Thread Henning Hraban Ramm
ers from 0 to 1. Even if some color names are predefined, you should define your grays yourself – either as shades of black only or maybe with a bit of cyan. Grays in more (process) colors are unstable and might get a tint (color cast) you don’t want. (Of course you could use other colors than cyan

Re: [NTG-context] Chapter heading with rules

2020-08-21 Thread Otared Kavian
Hi Julian, Indeed you can acchieve what you want, but it is better to define a command which takes care of the number and the title of the chapter at the same time (as in \ myChapterCommand below). %% begin example.tex \definefiller[ChapterRule] [alternative=rule, color=gray

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread jbf
=\MemoirChapter, ] %\define[2]\MemoirChapter % {\startoverlay % {#1} % {#2} % \stopoverlay} \define[2]\MemoirChapter {\framed[frame=off,width=broad,align={middle,lohi}] {\startoverlay {\raise1.5ex\hbox

Re: [NTG-context] memoir-style chapter heading

2020-08-18 Thread Otared Kavian
] \setuphead[chapter] [ numberstyle={\switchtobodyfont[48pt]}, numbercolor=gray, alternative=command, command=\MemoirChapter, ] \define[2]\MemoirChapter {\framed[frame=off,width=broad,align=middle] {\startoverlay

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
I meant to include an example of what I mean, since at least it seems to work (am including just the definition part of your example), So at least I can get middle and right alignment. \define[2]\MemoirChapter  {\midaligned{\startoverlay   {#1}   {#2}     \stopoverlay}} Julian On 17

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread jbf
, command=\MemoirChapter, ] \define[2]\MemoirChapter% {\startoverlay {#1} {#2} \stopoverlay} \starttext \startchapter[title={This is a test}] \stopchapter \stoptext Overlays don't allow tuning the location...for that you need layers. See the chapter

Re: [NTG-context] memoir-style chapter heading

2020-08-17 Thread Aditya Mahajan
[ numberstyle={\switchtobodyfont[48pt]}, numbercolor=gray, alternative=command, command=\MemoirChapter, ] \define[2]\MemoirChapter% {\startoverlay {#1} {#2} \stopoverlay} \starttext \startchapter[title={This is a test}

Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Wolfgang Schuster
the margin key to a value large enough to fit all numbers 3. Apply a command to the numbercommand key where you shift the number to the left in the margin area you set in the previous step begin example \define[1]\ChapterListNumbercommand {\offset[x=-1cm,width=0pt]{\simplealignedbox{1cm

Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Wolfgang Schuster
={}] (see below) with an environment setup that applies only to the ToC? Either you create and set up a \chapter command for the TOC (such as \chapterTOC) to use it only once, or you create a sectionblock that you apply only for the TOC (and define the chapter settings for that sectionblock). I

Re: [NTG-context] Help on tweaking alignment, page numbers and ToC

2020-08-11 Thread Pablo Rodriguez
r the TOC (such as \chapterTOC) to use it only once, or you create a sectionblock that you apply only for the TOC (and define the chapter settings for that sectionblock). I never used environments (other than the ones to typeset XML sources), so this is

[NTG-context] Defining \qed (was: Bug with \wordright...)

2020-08-08 Thread Otared Kavian
roofSymbol definition moves the symbol back in > the math formula to avoid the vertical space between them, you can remove it > but I would at leas use \blank[back] to get rid of the empty line between the > formula and the symbol. > > \define[1]\PlaceProofSymbol > {\blank[back,ove

Re: [NTG-context] Bug with \wordright in LMTX version 2020-08-03 14:25

2020-08-05 Thread Wolfgang Schuster
of the empty line between the formula and the symbol. \define[1]\PlaceProofSymbol {\blank[back,overlay]% \dontleavehmode\wordright{#1}} \defineenumeration [proof] [ closesymbol={\symbol[square]}, closecommand=\PlaceProofSymbol] \starttext \startproof \startformula a^2 + b^2

[NTG-context] Placing a section ending depending on odd/even sectionnumber

2020-08-04 Thread Willi Egger
Hi, now I have another hurdle to be taken :-) — Depending on the odd or even number of the section I have to place an ornament at the end of the section. I have sofar the following setup: \define\stopmysection {\setups{endsection}} \startsetups endsection \doifelse

Re: [NTG-context] check if inside footnote

2020-08-04 Thread Hans Hagen
footnotes), and I could avoid manually analyzing the structure if my macro could determine on its own if it’s called from a footnote. Not-working example: \setupinteraction[state=start] \defineprocessor[kursiv][style=italicface] \define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv

Re: [NTG-context] check if inside footnote

2020-08-04 Thread Henning Hraban Ramm
>> footnotes, or footnotes within footnotes), and I could avoid manually >> analyzing the structure if my macro could determine on its own if it’s >> called from a footnote. >> Not-working example: >> \setupinteraction[state=start] >> \defineprocessor[k

Re: [NTG-context] check if inside footnote

2020-08-04 Thread Hans Hagen
own if it’s called from a footnote. Not-working example: \setupinteraction[state=start] \defineprocessor[kursiv][style=italicface] \define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv->]{kursiv->#1}}#1} \starttext Text --- \index[C]{A}{B}\footnote{Inside\index{FN}}\in

[NTG-context] check if inside footnote

2020-08-04 Thread Henning Hraban Ramm
example: \setupinteraction[state=start] \defineprocessor[kursiv][style=italicface] \define[1]\Idx{\doifmodeelse{*footnote}{\index{#1}}{\index[kursiv->]{kursiv->#1}}#1} \starttext Text --- \index[C]{A}{B}\footnote{Inside\index{FN}}\index{BF} --- \placeregister[index][criterium=all] \st

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, % width=\ColWidth, ]{% \vtop{\placelocalnotes[footnote][before=,after

Re: [NTG-context] consistent index entries

2020-08-01 Thread Henning Hraban Ramm
> Am 01.08.2020 um 22:44 schrieb Wolfgang Schuster > : >>> \define[1]\Ort{\expanded{\index{...}}} >> Ah, I never know where to expand (tried \expanded\ctxlua). > > \expanded needs a argument, i.e. \expanded{...} I recognized it doesn’t work otherwise. But I t

Re: [NTG-context] consistent index entries

2020-08-01 Thread Wolfgang Schuster
Henning Hraban Ramm schrieb am 01.08.2020 um 22:16: Am 01.08.2020 um 21:30 schrieb Wolfgang Schuster : \def\Ort#1{\index{\ctxlua{user.Lookup("#1")}}} You have to expand the \index argument: \define[1]\Ort{\expanded{\index{...}}} Ah, I never know where to expand (tried \expan

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Otared Kavian
arginNote#1{% > \inmargin[ > voffset=\dimexpr-\FNVOffset\lineheight\relax, > width=\ColWidth, > align=flushleft, > ]{% > \inframed[ >width=\ColWidth, >align=right, >frame=off, >offset=overlay, >strut=yes, >]{#1}% > }% > } >

Re: [NTG-context] consistent index entries

2020-08-01 Thread Henning Hraban Ramm
> Am 01.08.2020 um 21:30 schrieb Wolfgang Schuster > : >> \def\Ort#1{\index{\ctxlua{user.Lookup("#1")}}} > > You have to expand the \index argument: > > \define[1]\Ort{\expanded{\index{...}}} Ah, I never know where to expand (tried \expanded\ctxlua). Now,

Re: [NTG-context] consistent index entries

2020-08-01 Thread Wolfgang Schuster
else return context(Name) end end \stopluacode \def\Ort#1{\index{\ctxlua{user.Lookup("#1")}}} You have to expand the \index argument: \define[1]\Ort{\expanded{\index{...}}} \starttext \Ort{Albano} \Ort{Altona} \Ort{Aurich} \strut\page \placeindex \stoptext The lookup wor

Re: [NTG-context] margin notes (was: lmtx update)

2020-08-01 Thread Henning Hraban Ramm
relax, width=\ColWidth, align=flushleft, ]{% \inframed[ width=\ColWidth, align=right, frame=off, offset=overlay, strut=yes, ]{#1}% }% } \define\PlaceFootnote{% \inmargin[ voffset=\dimexpr-\FNVOffset\lineheight\relax, width=\ColWidth, ]{% \vtop{\placelocalnotes

Re: [NTG-context] lmtx update

2020-08-01 Thread Otared Kavian
bout Ward, who says: \par \input ward.tex} \input ward.tex \par test \endnote{This is a note about Donald Knuth.} \input knuth.tex \par } This is a last note. \endnote{This last note is here to see what happens in the next page\dots\par \input knuth.tex} \par \input knuth.tex %\setups{notaflush} \stop

Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Mike Cooper
ntext] tabulate inside itemize > > On 7/29/2020 6:38 PM, Mike Cooper wrote: > > I would normally use tab stops and line breaks to achieve the following > > in a numbered list: > I know this looks terrible: > > \define\MyTabulateHack{\vskip-\lineheight\blank[disable]}

Re: [NTG-context] tabulate inside itemize

2020-07-29 Thread Hans Hagen
On 7/29/2020 6:38 PM, Mike Cooper wrote: > I would normally use tab stops and line breaks to achieve the following > in a numbered list: I know this looks terrible: \define\MyTabulateHack{\vskip-\lineheight\blank[disable]} \startitemize[n] \startitem \MyTabulateHack \starttabulat

[NTG-context] no reference output for \namedstructurevariable

2020-07-29 Thread Damien Thiriet
\namedstructurevariable{section}{reference} doesn't give any output, while \currentstructurereference does. Is this a bug or something I miss? I get also no output when I define custom key/value with startsection and call them with namedstructurevariable. Best regards, Damien Thiriet - End forwarded

[NTG-context] another question about markings

2020-07-26 Thread Joey McCollum
Bump. I’m having the same issue with the following macro, which I’ve defined to work with a two-column layout and which I invoke within \setupheadertexts: \define\RefRange{%    %Check if the first chapter matches the last chapter on the page:    \doifelse{\getmarking[Chapter][1][top]}{\getmarking

<    4   5   6   7   8   9   10   11   12   13   >