* Question on enabling/disabling modes @ 2018-08-27 12:14 Mikael P. Sundqvist 2018-08-27 13:17 ` Taco Hoekwater 0 siblings, 1 reply; 9+ messages in thread From: Mikael P. Sundqvist @ 2018-08-27 12:14 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1030 bytes --] Hi! I am writing notes for my teaching and would like to do the following with modes: * If the file is compiled with context file.tex then everything (i.e. the content in all modes) is typeset. * If the file is compiled with context --mode=test1 file.tex then only mode test1 is typeset. I do not see how to do this easily. The example I am working on looks like this: %%% file.tex \definemode[test1][keep] \definemode[test2][keep] \starttext \startmode[test1] We are in mode test1. \stopmode \startmode[test2] We are in mode test2. \stopmode \stoptext %%% This, however, naturally gives not output, since the modes test1 and test2 are not activated. If I compile with context --mode=test1 file.tex I get the content in mode test1, as I want. I have tried to change "keep" to "yes" in the setup of the modes, but then the material in both modes are typeset no matter what command flag I use. Do I miss something? /Mikael PS In reality I have about 25 lectures, so using this method there will be about 25 modes in total. [-- Attachment #1.2: Type: text/html, Size: 1453 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-27 12:14 Question on enabling/disabling modes Mikael P. Sundqvist @ 2018-08-27 13:17 ` Taco Hoekwater 2018-08-27 14:37 ` Mikael P. Sundqvist 0 siblings, 1 reply; 9+ messages in thread From: Taco Hoekwater @ 2018-08-27 13:17 UTC (permalink / raw) To: mailing list for ConTeXt users > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> wrote: > > Hi! > > I am writing notes for my teaching and would like to do the following with modes: > > * If the file is compiled with context file.tex then everything (i.e. the content in all modes) is typeset. > * If the file is compiled with context --mode=test1 file.tex then only mode test1 is typeset. > > I do not see how to do this easily. This is what I would do if the list of modes is small: \doifnotmode{test1}{\enablemode[test1,test2]} (and don’t use the \definemode lines) But if you need many of them, that could get problematic with many nested \doifmodeelse statements. In that case, I would use a separate ‘all’ mode, and call the context script with that as argument in the generic case. %%% file.tex \starttext \startmode[test1,all] We are in mode test1. \stopmode \startmode[test2,all] We are in mode test2. \stopmode \stoptext %%% Best wishes, Taco Taco Hoekwater Elvenkind BV ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-27 13:17 ` Taco Hoekwater @ 2018-08-27 14:37 ` Mikael P. Sundqvist 2018-08-27 18:46 ` Henning Hraban Ramm 0 siblings, 1 reply; 9+ messages in thread From: Mikael P. Sundqvist @ 2018-08-27 14:37 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 1850 bytes --] On Mon, Aug 27, 2018 at 3:17 PM Taco Hoekwater <taco@elvenkind.com> wrote: > > > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> wrote: > > > > Hi! > > > > I am writing notes for my teaching and would like to do the following > with modes: > > > > * If the file is compiled with context file.tex then everything (i.e. > the content in all modes) is typeset. > > * If the file is compiled with context --mode=test1 file.tex then only > mode test1 is typeset. > > > > I do not see how to do this easily. > > > This is what I would do if the list of modes is small: > > \doifnotmode{test1}{\enablemode[test1,test2]} > > (and don’t use the \definemode lines) > > But if you need many of them, that could get problematic with > many nested \doifmodeelse statements. > > In that case, I would use a separate ‘all’ mode, and call the > context script with that as argument in the generic case. > > > %%% file.tex > \starttext > \startmode[test1,all] > We are in mode test1. > \stopmode > \startmode[test2,all] > We are in mode test2. > \stopmode > \stoptext > %%% > > > Best wishes, > Taco > > Taco Hoekwater > Elvenkind BV > > > > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ Thank you, Taco! I have around 25 of them, and your solution with "all" works indeed well for me. /Mikael [-- Attachment #1.2: Type: text/html, Size: 2828 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-27 14:37 ` Mikael P. Sundqvist @ 2018-08-27 18:46 ` Henning Hraban Ramm 2018-08-28 8:54 ` Fabrice Couvreur 0 siblings, 1 reply; 9+ messages in thread From: Henning Hraban Ramm @ 2018-08-27 18:46 UTC (permalink / raw) To: mailing list for ConTeXt users Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> wrote: > > > > Hi! > > > > I am writing notes for my teaching and would like to do the following with modes: > > > > * If the file is compiled with context file.tex then everything (i.e. the content in all modes) is typeset. > > * If the file is compiled with context --mode=test1 file.tex then only mode test1 is typeset. > > > > I do not see how to do this easily. > > > This is what I would do if the list of modes is small: > > \doifnotmode{test1}{\enablemode[test1,test2]} > > (and don’t use the \definemode lines) > > But if you need many of them, that could get problematic with > many nested \doifmodeelse statements. > > In that case, I would use a separate ‘all’ mode, and call the > context script with that as argument in the generic case. > > > %%% file.tex > \starttext > \startmode[test1,all] > We are in mode test1. > \stopmode > \startmode[test2,all] > We are in mode test2. > \stopmode > \stoptext > %%% > > ___________________________________________________________________________________ > > Thank you, Taco! > > I have around 25 of them, and your solution with "all" works indeed well for me. There’s also \startnotmode[some] This is not typeset in "some" mode. \stopnotmode Greetlings, Hraban --- https://www.fiee.net http://wiki.contextgarden.net https://www.dreiviertelhaus.de GPG Key ID 1C9B22FD ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-27 18:46 ` Henning Hraban Ramm @ 2018-08-28 8:54 ` Fabrice Couvreur 2018-08-28 9:04 ` Mikael P. Sundqvist 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Couvreur @ 2018-08-28 8:54 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 2375 bytes --] Hi Mikael, I do not know this way yet. Can you attach a complete example ? Regards, Fabrice Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm <texml@fiee.net> a écrit : > Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: > > > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> > wrote: > > > > > > Hi! > > > > > > I am writing notes for my teaching and would like to do the following > with modes: > > > > > > * If the file is compiled with context file.tex then everything (i.e. > the content in all modes) is typeset. > > > * If the file is compiled with context --mode=test1 file.tex then only > mode test1 is typeset. > > > > > > I do not see how to do this easily. > > > > > > This is what I would do if the list of modes is small: > > > > \doifnotmode{test1}{\enablemode[test1,test2]} > > > > (and don’t use the \definemode lines) > > > > But if you need many of them, that could get problematic with > > many nested \doifmodeelse statements. > > > > In that case, I would use a separate ‘all’ mode, and call the > > context script with that as argument in the generic case. > > > > > > %%% file.tex > > \starttext > > \startmode[test1,all] > > We are in mode test1. > > \stopmode > > \startmode[test2,all] > > We are in mode test2. > > \stopmode > > \stoptext > > %%% > > > > > ___________________________________________________________________________________ > > > > Thank you, Taco! > > > > I have around 25 of them, and your solution with "all" works indeed well > for me. > > > There’s also > > \startnotmode[some] > This is not typeset in "some" mode. > \stopnotmode > > > Greetlings, Hraban > --- > https://www.fiee.net > http://wiki.contextgarden.net > https://www.dreiviertelhaus.de > GPG Key ID 1C9B22FD > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 3935 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-28 8:54 ` Fabrice Couvreur @ 2018-08-28 9:04 ` Mikael P. Sundqvist 2018-08-28 9:58 ` Fabrice Couvreur 0 siblings, 1 reply; 9+ messages in thread From: Mikael P. Sundqvist @ 2018-08-28 9:04 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 3308 bytes --] On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur < fabrice1.couvreur@gmail.com> wrote: > Hi Mikael, > I do not know this way yet. Can you attach a complete example ? > Regards, > Fabrice > > Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm <texml@fiee.net> a > écrit : > >> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: >> >> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> >> wrote: >> > > >> > > Hi! >> > > >> > > I am writing notes for my teaching and would like to do the following >> with modes: >> > > >> > > * If the file is compiled with context file.tex then everything (i.e. >> the content in all modes) is typeset. >> > > * If the file is compiled with context --mode=test1 file.tex then >> only mode test1 is typeset. >> > > >> > > I do not see how to do this easily. >> > >> > >> > This is what I would do if the list of modes is small: >> > >> > \doifnotmode{test1}{\enablemode[test1,test2]} >> > >> > (and don’t use the \definemode lines) >> > >> > But if you need many of them, that could get problematic with >> > many nested \doifmodeelse statements. >> > >> > In that case, I would use a separate ‘all’ mode, and call the >> > context script with that as argument in the generic case. >> > >> > >> > %%% file.tex >> > \starttext >> > \startmode[test1,all] >> > We are in mode test1. >> > \stopmode >> > \startmode[test2,all] >> > We are in mode test2. >> > \stopmode >> > \stoptext >> > %%% >> > >> > >> ___________________________________________________________________________________ >> > >> > Thank you, Taco! >> > >> > I have around 25 of them, and your solution with "all" works indeed >> well for me. >> >> >> There’s also >> >> \startnotmode[some] >> This is not typeset in "some" mode. >> \stopnotmode >> >> >> Greetlings, Hraban >> --- >> https://www.fiee.net >> http://wiki.contextgarden.net >> https://www.dreiviertelhaus.de >> GPG Key ID 1C9B22FD >> >> >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___________________________________________________________________________________ > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ Fabrice, Taco's example is complete. Try context file.tex context --mode=test1 file.tex context --mode=all file.tex and you will get, in turn, nothing, the content in mode test1, everything. /Mikael [-- Attachment #1.2: Type: text/html, Size: 5674 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-28 9:04 ` Mikael P. Sundqvist @ 2018-08-28 9:58 ` Fabrice Couvreur 2018-08-28 10:57 ` Mikael P. Sundqvist 0 siblings, 1 reply; 9+ messages in thread From: Fabrice Couvreur @ 2018-08-28 9:58 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 4394 bytes --] Hi Mikael, I suppose the files test1 and test2 have a special structure ? %%% file.tex \doifnotmode{test1}{\enablemode[test1,test2]} \starttext \startmode[test1,all] We are in mode test1. \stopmode \startmode[test2,all] We are in mode test2. \stopmode \stoptext %%% %%% test1.tex ???? %%% %%% test2.tex ??? %%% Fabrice Le mar. 28 août 2018 à 11:05, Mikael P. Sundqvist <mickep@gmail.com> a écrit : > On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur < > fabrice1.couvreur@gmail.com> wrote: > >> Hi Mikael, >> I do not know this way yet. Can you attach a complete example ? >> Regards, >> Fabrice >> >> Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm <texml@fiee.net> a >> écrit : >> >>> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: >>> >>> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> >>> wrote: >>> > > >>> > > Hi! >>> > > >>> > > I am writing notes for my teaching and would like to do the >>> following with modes: >>> > > >>> > > * If the file is compiled with context file.tex then everything >>> (i.e. the content in all modes) is typeset. >>> > > * If the file is compiled with context --mode=test1 file.tex then >>> only mode test1 is typeset. >>> > > >>> > > I do not see how to do this easily. >>> > >>> > >>> > This is what I would do if the list of modes is small: >>> > >>> > \doifnotmode{test1}{\enablemode[test1,test2]} >>> > >>> > (and don’t use the \definemode lines) >>> > >>> > But if you need many of them, that could get problematic with >>> > many nested \doifmodeelse statements. >>> > >>> > In that case, I would use a separate ‘all’ mode, and call the >>> > context script with that as argument in the generic case. >>> > >>> > >>> > %%% file.tex >>> > \starttext >>> > \startmode[test1,all] >>> > We are in mode test1. >>> > \stopmode >>> > \startmode[test2,all] >>> > We are in mode test2. >>> > \stopmode >>> > \stoptext >>> > %%% >>> > >>> > >>> ___________________________________________________________________________________ >>> > >>> > Thank you, Taco! >>> > >>> > I have around 25 of them, and your solution with "all" works indeed >>> well for me. >>> >>> >>> There’s also >>> >>> \startnotmode[some] >>> This is not typeset in "some" mode. >>> \stopnotmode >>> >>> >>> Greetlings, Hraban >>> --- >>> https://www.fiee.net >>> http://wiki.contextgarden.net >>> https://www.dreiviertelhaus.de >>> GPG Key ID 1C9B22FD >>> >>> >>> ___________________________________________________________________________________ >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> >>> ___________________________________________________________________________________ >> >> >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___________________________________________________________________________________ > > > Fabrice, > > Taco's example is complete. Try > > context file.tex > context --mode=test1 file.tex > context --mode=all file.tex > > and you will get, in turn, nothing, the content in mode test1, everything. > > /Mikael > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 9902 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-28 9:58 ` Fabrice Couvreur @ 2018-08-28 10:57 ` Mikael P. Sundqvist 2018-08-30 16:55 ` Fabrice Couvreur 0 siblings, 1 reply; 9+ messages in thread From: Mikael P. Sundqvist @ 2018-08-28 10:57 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 5474 bytes --] On Tue, Aug 28, 2018 at 11:59 AM Fabrice Couvreur < fabrice1.couvreur@gmail.com> wrote: > Hi Mikael, > I suppose the files test1 and test2 have a special structure ? > > %%% file.tex > \doifnotmode{test1}{\enablemode[test1,test2]} > \starttext > \startmode[test1,all] > We are in mode test1. > \stopmode > \startmode[test2,all] > We are in mode test2. > \stopmode > \stoptext > %%% > > %%% test1.tex > ???? > %%% > > %%% test2.tex > ??? > %%% > > Fabrice > > Le mar. 28 août 2018 à 11:05, Mikael P. Sundqvist <mickep@gmail.com> a > écrit : > >> On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur < >> fabrice1.couvreur@gmail.com> wrote: >> >>> Hi Mikael, >>> I do not know this way yet. Can you attach a complete example ? >>> Regards, >>> Fabrice >>> >>> Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm <texml@fiee.net> a >>> écrit : >>> >>>> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: >>>> >>>> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> >>>> wrote: >>>> > > >>>> > > Hi! >>>> > > >>>> > > I am writing notes for my teaching and would like to do the >>>> following with modes: >>>> > > >>>> > > * If the file is compiled with context file.tex then everything >>>> (i.e. the content in all modes) is typeset. >>>> > > * If the file is compiled with context --mode=test1 file.tex then >>>> only mode test1 is typeset. >>>> > > >>>> > > I do not see how to do this easily. >>>> > >>>> > >>>> > This is what I would do if the list of modes is small: >>>> > >>>> > \doifnotmode{test1}{\enablemode[test1,test2]} >>>> > >>>> > (and don’t use the \definemode lines) >>>> > >>>> > But if you need many of them, that could get problematic with >>>> > many nested \doifmodeelse statements. >>>> > >>>> > In that case, I would use a separate ‘all’ mode, and call the >>>> > context script with that as argument in the generic case. >>>> > >>>> > >>>> > %%% file.tex >>>> > \starttext >>>> > \startmode[test1,all] >>>> > We are in mode test1. >>>> > \stopmode >>>> > \startmode[test2,all] >>>> > We are in mode test2. >>>> > \stopmode >>>> > \stoptext >>>> > %%% >>>> > >>>> > >>>> ___________________________________________________________________________________ >>>> > >>>> > Thank you, Taco! >>>> > >>>> > I have around 25 of them, and your solution with "all" works indeed >>>> well for me. >>>> >>>> >>>> There’s also >>>> >>>> \startnotmode[some] >>>> This is not typeset in "some" mode. >>>> \stopnotmode >>>> >>>> >>>> Greetlings, Hraban >>>> --- >>>> https://www.fiee.net >>>> http://wiki.contextgarden.net >>>> https://www.dreiviertelhaus.de >>>> GPG Key ID 1C9B22FD >>>> >>>> >>>> ___________________________________________________________________________________ >>>> If your question is of interest to others as well, please add an entry >>>> to the Wiki! >>>> >>>> maillist : ntg-context@ntg.nl / >>>> http://www.ntg.nl/mailman/listinfo/ntg-context >>>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> wiki : http://contextgarden.net >>>> >>>> ___________________________________________________________________________________ >>> >>> >>> ___________________________________________________________________________________ >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> >>> ___________________________________________________________________________________ >> >> >> Fabrice, >> >> Taco's example is complete. Try >> >> context file.tex >> context --mode=test1 file.tex >> context --mode=all file.tex >> >> and you will get, in turn, nothing, the content in mode test1, everything. >> >> /Mikael >> >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___________________________________________________________________________________ > > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ Fabrice, there is some misunderstanding. The code from Taco is complete. There are no other files. What we do here is enable/disable parts of the document with modes. We do not insert any other files (I guess one could do that inside the modes if one wants). /Mikael [-- Attachment #1.2: Type: text/html, Size: 12297 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Question on enabling/disabling modes 2018-08-28 10:57 ` Mikael P. Sundqvist @ 2018-08-30 16:55 ` Fabrice Couvreur 0 siblings, 0 replies; 9+ messages in thread From: Fabrice Couvreur @ 2018-08-30 16:55 UTC (permalink / raw) To: mailing list for ConTeXt users [-- Attachment #1.1: Type: text/plain, Size: 6392 bytes --] Hello Mikael, I read the documentation that I think I partly understood; I was really off topic. Fabrice Le mar. 28 août 2018 à 12:58, Mikael P. Sundqvist <mickep@gmail.com> a écrit : > On Tue, Aug 28, 2018 at 11:59 AM Fabrice Couvreur < > fabrice1.couvreur@gmail.com> wrote: > >> Hi Mikael, >> I suppose the files test1 and test2 have a special structure ? >> >> %%% file.tex >> \doifnotmode{test1}{\enablemode[test1,test2]} >> \starttext >> \startmode[test1,all] >> We are in mode test1. >> \stopmode >> \startmode[test2,all] >> We are in mode test2. >> \stopmode >> \stoptext >> %%% >> >> %%% test1.tex >> ???? >> %%% >> >> %%% test2.tex >> ??? >> %%% >> >> Fabrice >> >> Le mar. 28 août 2018 à 11:05, Mikael P. Sundqvist <mickep@gmail.com> a >> écrit : >> >>> On Tue, Aug 28, 2018 at 10:54 AM Fabrice Couvreur < >>> fabrice1.couvreur@gmail.com> wrote: >>> >>>> Hi Mikael, >>>> I do not know this way yet. Can you attach a complete example ? >>>> Regards, >>>> Fabrice >>>> >>>> Le lun. 27 août 2018 à 20:47, Henning Hraban Ramm <texml@fiee.net> a >>>> écrit : >>>> >>>>> Am 2018-08-27 um 16:37 schrieb Mikael P. Sundqvist <mickep@gmail.com>: >>>>> >>>>> > > On 27 Aug 2018, at 14:14, Mikael P. Sundqvist <mickep@gmail.com> >>>>> wrote: >>>>> > > >>>>> > > Hi! >>>>> > > >>>>> > > I am writing notes for my teaching and would like to do the >>>>> following with modes: >>>>> > > >>>>> > > * If the file is compiled with context file.tex then everything >>>>> (i.e. the content in all modes) is typeset. >>>>> > > * If the file is compiled with context --mode=test1 file.tex then >>>>> only mode test1 is typeset. >>>>> > > >>>>> > > I do not see how to do this easily. >>>>> > >>>>> > >>>>> > This is what I would do if the list of modes is small: >>>>> > >>>>> > \doifnotmode{test1}{\enablemode[test1,test2]} >>>>> > >>>>> > (and don’t use the \definemode lines) >>>>> > >>>>> > But if you need many of them, that could get problematic with >>>>> > many nested \doifmodeelse statements. >>>>> > >>>>> > In that case, I would use a separate ‘all’ mode, and call the >>>>> > context script with that as argument in the generic case. >>>>> > >>>>> > >>>>> > %%% file.tex >>>>> > \starttext >>>>> > \startmode[test1,all] >>>>> > We are in mode test1. >>>>> > \stopmode >>>>> > \startmode[test2,all] >>>>> > We are in mode test2. >>>>> > \stopmode >>>>> > \stoptext >>>>> > %%% >>>>> > >>>>> > >>>>> ___________________________________________________________________________________ >>>>> > >>>>> > Thank you, Taco! >>>>> > >>>>> > I have around 25 of them, and your solution with "all" works indeed >>>>> well for me. >>>>> >>>>> >>>>> There’s also >>>>> >>>>> \startnotmode[some] >>>>> This is not typeset in "some" mode. >>>>> \stopnotmode >>>>> >>>>> >>>>> Greetlings, Hraban >>>>> --- >>>>> https://www.fiee.net >>>>> http://wiki.contextgarden.net >>>>> https://www.dreiviertelhaus.de >>>>> GPG Key ID 1C9B22FD >>>>> >>>>> >>>>> ___________________________________________________________________________________ >>>>> If your question is of interest to others as well, please add an entry >>>>> to the Wiki! >>>>> >>>>> maillist : ntg-context@ntg.nl / >>>>> http://www.ntg.nl/mailman/listinfo/ntg-context >>>>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>>> wiki : http://contextgarden.net >>>>> >>>>> ___________________________________________________________________________________ >>>> >>>> >>>> ___________________________________________________________________________________ >>>> If your question is of interest to others as well, please add an entry >>>> to the Wiki! >>>> >>>> maillist : ntg-context@ntg.nl / >>>> http://www.ntg.nl/mailman/listinfo/ntg-context >>>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>>> wiki : http://contextgarden.net >>>> >>>> ___________________________________________________________________________________ >>> >>> >>> Fabrice, >>> >>> Taco's example is complete. Try >>> >>> context file.tex >>> context --mode=test1 file.tex >>> context --mode=all file.tex >>> >>> and you will get, in turn, nothing, the content in mode test1, >>> everything. >>> >>> /Mikael >>> >>> ___________________________________________________________________________________ >>> If your question is of interest to others as well, please add an entry >>> to the Wiki! >>> >>> maillist : ntg-context@ntg.nl / >>> http://www.ntg.nl/mailman/listinfo/ntg-context >>> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >>> archive : https://bitbucket.org/phg/context-mirror/commits/ >>> wiki : http://contextgarden.net >>> >>> ___________________________________________________________________________________ >> >> >> ___________________________________________________________________________________ >> If your question is of interest to others as well, please add an entry to >> the Wiki! >> >> maillist : ntg-context@ntg.nl / >> http://www.ntg.nl/mailman/listinfo/ntg-context >> webpage : http://www.pragma-ade.nl / http://context.aanhet.net >> archive : https://bitbucket.org/phg/context-mirror/commits/ >> wiki : http://contextgarden.net >> >> ___________________________________________________________________________________ > > > Fabrice, > > there is some misunderstanding. The code from Taco is complete. There are > no other files. What we do here is enable/disable parts of the document > with modes. We do not insert any other files (I guess one could do that > inside the modes if one wants). > > /Mikael > > ___________________________________________________________________________________ > If your question is of interest to others as well, please add an entry to > the Wiki! > > maillist : ntg-context@ntg.nl / > http://www.ntg.nl/mailman/listinfo/ntg-context > webpage : http://www.pragma-ade.nl / http://context.aanhet.net > archive : https://bitbucket.org/phg/context-mirror/commits/ > wiki : http://contextgarden.net > > ___________________________________________________________________________________ [-- Attachment #1.2: Type: text/html, Size: 15015 bytes --] [-- Attachment #2: Type: text/plain, Size: 492 bytes --] ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki! maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://context.aanhet.net archive : https://bitbucket.org/phg/context-mirror/commits/ wiki : http://contextgarden.net ___________________________________________________________________________________ ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2018-08-30 16:55 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-08-27 12:14 Question on enabling/disabling modes Mikael P. Sundqvist 2018-08-27 13:17 ` Taco Hoekwater 2018-08-27 14:37 ` Mikael P. Sundqvist 2018-08-27 18:46 ` Henning Hraban Ramm 2018-08-28 8:54 ` Fabrice Couvreur 2018-08-28 9:04 ` Mikael P. Sundqvist 2018-08-28 9:58 ` Fabrice Couvreur 2018-08-28 10:57 ` Mikael P. Sundqvist 2018-08-30 16:55 ` Fabrice Couvreur
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).