* [NTG-context] Use headcommand in \definedescription together with \definehighlight @ 2024-06-24 17:19 Gerion Entrup 2024-06-24 19:20 ` [NTG-context] " Aditya Mahajan 0 siblings, 1 reply; 9+ messages in thread From: Gerion Entrup @ 2024-06-24 17:19 UTC (permalink / raw) To: ntg-context [-- Attachment #1.1: Type: text/plain, Size: 1174 bytes --] Hi, I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. Do you know, if this is possible? Here is a MWE: ``` \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] \definedescription[category][ alternative=top, headstyle=bold, width=broad, ] \definedescription[desc][ width=broad, distance={\widthofstring{~}}, headcommand={\groupedcommand{\hl}{:}}, % headcommand={\groupedcommand{}{:}}, % this compiles but the highlight is lost % headcommand={\groupedcommand{\starthl}{\stophl :}}, % this does not compile headstyle=, before={\startpacked}, after={\stoppacked}, alternative=hanging, ] \starttext This is a \hl{highlight}. Some listings \startcategory{Itemize} \startitemize[packed] \item \hl{first}: one \item \hl{second}: two \stopitemize \stopcategory Now the same as desc: \startcategory{Desc} \startdesc{first} one \stopdesc \startdesc{second} two \stopdesc \stopcategory \stoptext ``` The itemize looks like it should look (except of the dots). Best, Gerion [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 659 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight 2024-06-24 17:19 [NTG-context] Use headcommand in \definedescription together with \definehighlight Gerion Entrup @ 2024-06-24 19:20 ` Aditya Mahajan 2024-06-24 21:57 ` Gerion Entrup 0 siblings, 1 reply; 9+ messages in thread From: Aditya Mahajan @ 2024-06-24 19:20 UTC (permalink / raw) To: mailing list for ConTeXt users On Mon, 24 Jun 2024, Gerion Entrup wrote: > Hi, > > I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. > I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. Not sure what exactly you want, but how about: \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. \definedescription[category][ alternative=top, headstyle=bold, width=broad, ] \definedescription[desc][ width=fit, distance={\widthofstring{~}}, headcommand={\groupedcommand{>\,}{:}}, headstyle=\tt, before={\startpacked}, after={\stoppacked}, alternative=hanging, ] \starttext This is a \hl{highlight}. Some listings \startcategory{Itemize} \startitemize[packed] \item \hl{first}: one \item \hl{second}: two \stopitemize \stopcategory Now the same as desc: \startcategory{Desc} \startdesc{first} one \stopdesc \startdesc{second} two \stopdesc \stopcategory \stoptext Aditya ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight 2024-06-24 19:20 ` [NTG-context] " Aditya Mahajan @ 2024-06-24 21:57 ` Gerion Entrup 2024-06-24 22:09 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Gerion Entrup @ 2024-06-24 21:57 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1423 bytes --] Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan: > On Mon, 24 Jun 2024, Gerion Entrup wrote: > > > Hi, > > > > I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. > > I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. > > Not sure what exactly you want, but how about: > > \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] > % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. Is there a better way to define a highlight that sets a style (color, font) _and_ a prefix (symbol)? Another way, I know of, would be just a plain def, something like \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to define a highlight (just with an additional prefix). > \definedescription[category][ > alternative=top, > headstyle=bold, > width=broad, > ] > > \definedescription[desc][ > width=fit, > distance={\widthofstring{~}}, > headcommand={\groupedcommand{>\,}{:}}, Hmm, this works, but duplicates the above definition. If I don't want to use > as prefix but ›, I need to replace it in two places. > headstyle=\tt, > before={\startpacked}, > after={\stoppacked}, > alternative=hanging, > ] Gerion [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 659 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight 2024-06-24 21:57 ` Gerion Entrup @ 2024-06-24 22:09 ` Wolfgang Schuster 2024-06-25 6:41 ` [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) Gerion Entrup 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2024-06-24 22:09 UTC (permalink / raw) To: mailing list for ConTeXt users, Gerion Entrup Gerion Entrup schrieb am 24.06.2024 um 23:57: > Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan: >> On Mon, 24 Jun 2024, Gerion Entrup wrote: >> >>> Hi, >>> >>> I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. >>> I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. >> Not sure what exactly you want, but how about: >> >> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] >> % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. > Is there a better way to define a highlight that sets a style (color, font) _and_ a prefix (symbol)? > Another way, I know of, would be just a plain def, something like \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to define a highlight (just with an additional prefix). 1. ConTeXt already uses \hl as name for a existing command. 2. Use \definestartstop: \definestartstop [gerion] [style=mono,left={›\thinspace}] \starttext text \gerion{text} \stoptext >> \definedescription[category][ >> alternative=top, >> headstyle=bold, >> width=broad, >> ] >> >> \definedescription[desc][ >> width=fit, >> distance={\widthofstring{~}}, distance=\spaceamount, Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) 2024-06-24 22:09 ` Wolfgang Schuster @ 2024-06-25 6:41 ` Gerion Entrup 2024-06-27 20:19 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Gerion Entrup @ 2024-06-25 6:41 UTC (permalink / raw) To: mailing list for ConTeXt users, Wolfgang Schuster [-- Attachment #1.1.1: Type: text/plain, Size: 2513 bytes --] Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 24.06.2024 um 23:57: > > Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan: > >> On Mon, 24 Jun 2024, Gerion Entrup wrote: > >> > >>> Hi, > >>> > >>> I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. > >>> I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. > >> Not sure what exactly you want, but how about: > >> > >> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] > >> % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. > > Is there a better way to define a highlight that sets a style (color, font) _and_ a prefix (symbol)? > > Another way, I know of, would be just a plain def, something like \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to define a highlight (just with an additional prefix). > > 1. ConTeXt already uses \hl as name for a existing command. > > 2. Use \definestartstop: > > \definestartstop [gerion] [style=mono,left={›\thinspace}] > > \starttext > > text > > \gerion{text} > > \stoptext > > >> \definedescription[category][ > >> alternative=top, > >> headstyle=bold, > >> width=broad, > >> ] > >> > >> \definedescription[desc][ > >> width=fit, > >> distance={\widthofstring{~}}, > > distance=\spaceamount, > > Wolfgang This seems to be much better but does not lead to the wanted result. The full example now is: ``` \definestartstop[myhl][style=mono,left={›\thinspace}] \definedescription[categorie][ alternative=top, headstyle=bold, width=broad, ] \definedescription[desc][ width=broad, distance=\spaceamount, headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}}, headstyle=, before={\startpacked}, after={\stoppacked}, alternative=hanging ] \starttext This is a \myhl{highlight}. Some listings \startcategorie{Itemize} \startitemize[packed] \item \myhl{first}: one \item \myhl{second}: two \stopitemize \stopcategorie Now the same as desc: \startcategorie{Desc} \startdesc{first} one \stopdesc \startdesc{second} two \stopdesc \stopcategorie \stoptext ``` This adopts the correct style in \startdesc \stopdesc and sets the colon but omits the › (the left part). Gerion [-- Attachment #1.1.2: mwe.pdf --] [-- Type: application/pdf, Size: 12902 bytes --] [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 659 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) 2024-06-25 6:41 ` [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) Gerion Entrup @ 2024-06-27 20:19 ` Wolfgang Schuster 2024-06-28 9:40 ` Gerion Entrup 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2024-06-27 20:19 UTC (permalink / raw) To: Gerion Entrup; +Cc: mailing list for ConTeXt users [-- Attachment #1: Type: text/plain, Size: 3222 bytes --] Gerion Entrup schrieb am 25.06.2024 um 08:41: > Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster: >> Gerion Entrup schrieb am 24.06.2024 um 23:57: >>> Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan: >>>> On Mon, 24 Jun 2024, Gerion Entrup wrote: >>>> >>>>> Hi, >>>>> >>>>> I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. >>>>> I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. >>>> Not sure what exactly you want, but how about: >>>> >>>> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] >>>> % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. >>> Is there a better way to define a highlight that sets a style (color, font) _and_ a prefix (symbol)? >>> Another way, I know of, would be just a plain def, something like \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to define a highlight (just with an additional prefix). >> >> 1. ConTeXt already uses \hl as name for a existing command. >> >> 2. Use \definestartstop: >> >> \definestartstop [gerion] [style=mono,left={›\thinspace}] >> >> \starttext >> >> text >> >> \gerion{text} >> >> \stoptext >> >>>> \definedescription[category][ >>>> alternative=top, >>>> headstyle=bold, >>>> width=broad, >>>> ] >>>> >>>> \definedescription[desc][ >>>> width=fit, >>>> distance={\widthofstring{~}}, >> >> distance=\spaceamount, >> >> Wolfgang > > This seems to be much better but does not lead to the wanted result. The full example now is: > ``` > \definestartstop[myhl][style=mono,left={›\thinspace}] > > \definedescription[categorie][ > alternative=top, > headstyle=bold, > width=broad, > ] > > \definedescription[desc][ > width=broad, > distance=\spaceamount, > headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}}, > headstyle=, > before={\startpacked}, > after={\stoppacked}, > alternative=hanging > ] > > \starttext > > This is a \myhl{highlight}. > > Some listings > > \startcategorie{Itemize} > \startitemize[packed] > \item \myhl{first}: one > \item \myhl{second}: two > \stopitemize > \stopcategorie > > Now the same as desc: > \startcategorie{Desc} > \startdesc{first} one \stopdesc > \startdesc{second} two \stopdesc > \stopcategorie > > \stoptext > ``` > > This adopts the correct style in \startdesc \stopdesc and sets the colon but omits the › (the left part). You can do the following in the next version. 1. Add "arguments=yes" to \definestartstop to enable the optional argument for the new command. 2. Use the new commands with the "headcommand" key and apply ":" as right delimiter for the content of \Highlight. \definestartstop [Highlight] [arguments=yes, style=mono, left={›\thinspace}] \definedescription [description] [ width=broad, distance=\spaceamount, headcommand=\Highlight[right=:], alternative=hanging] \starttext This is a \Highlight{highlight}. \startdescription[title={Lorem ipsum}] \samplefile{lorem} \stopdescription \stoptext Wolfgang [-- Attachment #2: Highlight.pdf --] [-- Type: application/pdf, Size: 14512 bytes --] [-- Attachment #3: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) 2024-06-27 20:19 ` Wolfgang Schuster @ 2024-06-28 9:40 ` Gerion Entrup 2024-06-28 9:59 ` Wolfgang Schuster 0 siblings, 1 reply; 9+ messages in thread From: Gerion Entrup @ 2024-06-28 9:40 UTC (permalink / raw) To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 3755 bytes --] Am Donnerstag, 27. Juni 2024, 22:19:02 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 25.06.2024 um 08:41: > > Am Dienstag, 25. Juni 2024, 00:09:09 MESZ schrieb Wolfgang Schuster: > >> Gerion Entrup schrieb am 24.06.2024 um 23:57: > >>> Am Montag, 24. Juni 2024, 21:20:19 MESZ schrieb Aditya Mahajan: > >>>> On Mon, 24 Jun 2024, Gerion Entrup wrote: > >>>> > >>>>> Hi, > >>>>> > >>>>> I was in the process to convert an itemize part to a description and wanted to simplify the code in the same move. > >>>>> I discovered headcommand for that, but struggled to set the text in an highlight _and_ make a colon at the end. > >>>> Not sure what exactly you want, but how about: > >>>> > >>>> \definehighlight[hl][style={\m{>}\,\switchtobodyfont[tt]}] > >>>> % This is the wrong way to define such a command as '>' is not part of the style. I have left this definition just for comparison with the soln below. > >>> Is there a better way to define a highlight that sets a style (color, font) _and_ a prefix (symbol)? > >>> Another way, I know of, would be just a plain def, something like \def{\hl}{\groupedcommand{>\,\switchtobodyfont[tt]}{}}, but actually I want to define a highlight (just with an additional prefix). > >> > >> 1. ConTeXt already uses \hl as name for a existing command. > >> > >> 2. Use \definestartstop: > >> > >> \definestartstop [gerion] [style=mono,left={›\thinspace}] > >> > >> \starttext > >> > >> text > >> > >> \gerion{text} > >> > >> \stoptext > >> > >>>> \definedescription[category][ > >>>> alternative=top, > >>>> headstyle=bold, > >>>> width=broad, > >>>> ] > >>>> > >>>> \definedescription[desc][ > >>>> width=fit, > >>>> distance={\widthofstring{~}}, > >> > >> distance=\spaceamount, > >> > >> Wolfgang > > > > This seems to be much better but does not lead to the wanted result. The full example now is: > > ``` > > \definestartstop[myhl][style=mono,left={›\thinspace}] > > > > \definedescription[categorie][ > > alternative=top, > > headstyle=bold, > > width=broad, > > ] > > > > \definedescription[desc][ > > width=broad, > > distance=\spaceamount, > > headcommand={\groupedcommand{\startmyhl}{\stopmyhl :}}, > > headstyle=, > > before={\startpacked}, > > after={\stoppacked}, > > alternative=hanging > > ] > > > > \starttext > > > > This is a \myhl{highlight}. > > > > Some listings > > > > \startcategorie{Itemize} > > \startitemize[packed] > > \item \myhl{first}: one > > \item \myhl{second}: two > > \stopitemize > > \stopcategorie > > > > Now the same as desc: > > \startcategorie{Desc} > > \startdesc{first} one \stopdesc > > \startdesc{second} two \stopdesc > > \stopcategorie > > > > \stoptext > > ``` > > > > This adopts the correct style in \startdesc \stopdesc and sets the colon but omits the › (the left part). > > You can do the following in the next version. > > 1. Add "arguments=yes" to \definestartstop to enable the optional > argument for the new command. > > 2. Use the new commands with the "headcommand" key and apply ":" as > right delimiter for the content of \Highlight. > > \definestartstop > [Highlight] > [arguments=yes, > style=mono, > left={›\thinspace}] > > \definedescription > [description] > [ width=broad, > distance=\spaceamount, > headcommand=\Highlight[right=:], > alternative=hanging] > > \starttext > > This is a \Highlight{highlight}. > > \startdescription[title={Lorem ipsum}] > \samplefile{lorem} > \stopdescription > > \stoptext > > Wolfgang Thanks, that will work. Do you know, why the groupedcommand solution does not work? Gerion [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 659 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) 2024-06-28 9:40 ` Gerion Entrup @ 2024-06-28 9:59 ` Wolfgang Schuster 2024-07-01 18:11 ` Gerion Entrup 0 siblings, 1 reply; 9+ messages in thread From: Wolfgang Schuster @ 2024-06-28 9:59 UTC (permalink / raw) To: Gerion Entrup; +Cc: mailing list for ConTeXt users Gerion Entrup schrieb am 28.06.2024 um 11:40: > Do you know, why the groupedcommand solution does not work? The command and the environment which are created by \definestartstop can't be interchanged when you use the before/after and left/right keys. %%%% begin example \usemodule[visual] \definestartstop [Example] [before={\par\leftaligned{\tttf [before]}\par}, after={\par\leftaligned{\tttf [after]}\par}, left={{\tttf [left]}}, right={{\tttf [right]}}] \starttext \fakewords{10}{20} \startExample \fakewords{10}{20} \stopExample \fakewords{10}{20} \blank \fakewords{3}{5} \Example{\fakewords{3}{5}} \fakewords{3}{5} \stoptext %%%% end example Wolfgang ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) 2024-06-28 9:59 ` Wolfgang Schuster @ 2024-07-01 18:11 ` Gerion Entrup 0 siblings, 0 replies; 9+ messages in thread From: Gerion Entrup @ 2024-07-01 18:11 UTC (permalink / raw) To: Wolfgang Schuster; +Cc: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 902 bytes --] Am Freitag, 28. Juni 2024, 11:59:19 MESZ schrieb Wolfgang Schuster: > Gerion Entrup schrieb am 28.06.2024 um 11:40: > > > Do you know, why the groupedcommand solution does not work? > > The command and the environment which are created by \definestartstop > can't be interchanged when you use the before/after and left/right keys. > > %%%% begin example > \usemodule[visual] > > \definestartstop > [Example] > [before={\par\leftaligned{\tttf [before]}\par}, > after={\par\leftaligned{\tttf [after]}\par}, > left={{\tttf [left]}}, > right={{\tttf [right]}}] > > \starttext > > \fakewords{10}{20} > \startExample > \fakewords{10}{20} > \stopExample > \fakewords{10}{20} > > \blank > > \fakewords{3}{5} > \Example{\fakewords{3}{5}} > \fakewords{3}{5} > > \stoptext > %%%% end example > > Wolfgang > Ok, thanks for the explanation (I have added the example to the wiki). Gerion [-- Attachment #1.2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 659 bytes --] [-- Attachment #2: Type: text/plain, Size: 511 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl webpage : https://www.pragma-ade.nl / https://context.aanhet.net (mirror) archive : https://github.com/contextgarden/context wiki : https://wiki.contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2024-07-01 18:15 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-06-24 17:19 [NTG-context] Use headcommand in \definedescription together with \definehighlight Gerion Entrup 2024-06-24 19:20 ` [NTG-context] " Aditya Mahajan 2024-06-24 21:57 ` Gerion Entrup 2024-06-24 22:09 ` Wolfgang Schuster 2024-06-25 6:41 ` [NTG-context] Re: Use headcommand in \definedescription together with \definehighlight (now: \definestartstop) Gerion Entrup 2024-06-27 20:19 ` Wolfgang Schuster 2024-06-28 9:40 ` Gerion Entrup 2024-06-28 9:59 ` Wolfgang Schuster 2024-07-01 18:11 ` Gerion Entrup
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).