Re: [NTG-context] What is a better way to do this macro?

2015-07-16 Thread Idris Samawi Hamid ادريس سماوي حامد
Hi Wolfgang, all, Here is a new test file. Objective: To control the interlinespacing of the \\ command inside of \framed while keeping the bottom argument y of {x\\y} on the same baseline as the rest of the sentence. Look carefully at the examples in the attached pdf and see how the

[NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \GG $\GG$ % OK \startitemize[][] \sym{\GG} \GG % OK \stopitemize \startluacode context.startitemize() context.sym([[\GG]]) context(Abc) context.stopitemize() \stopluacode \stoptext

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a situation where mmod is true, then \GG is replaced with G_G Well, I

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Hans Hagen
On 7/16/2015 10:55 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Hans Hagen
On 7/16/2015 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's clear that you always are in a

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Hans Hagen
On 7/16/2015 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: This seems to be best solution - exactly what I wanted to achieve: \def\GG{\mathematics{G_G}}. compare these two: \def\GG{\ifmmode G_G\else$\GG$\fi} \starttext \edef\x{\GG} \stoptext and \unexpanded\def\GG{\ifmmode

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread luigi scarso
On Thu, Jul 16, 2015 at 10:55 AM, Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote: Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Hans Hagen
On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG maybe you mean: \def\GG{\ifmmode G_G\else$GG$\fi} \starttext \GG $\GG$ % OK

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread Procházka Lukáš Ing . - Pontex s . r . o .
Hello, On Thu, 16 Jul 2015 10:27:48 +0200, Hans Hagen pra...@wxs.nl wrote: On 7/16/2015 10:20 AM, Procházka Lukáš Ing. - Pontex s. r. o. wrote: Hello, why this code: \def\GG{\ifmmode G_G\else$\GG$\fi} because in math mode \GG expands \GG which expands \GG I want to just pass

Re: [NTG-context] TeX capacity exceeded - in Lua block - why?

2015-07-16 Thread luigi scarso
On Thu, Jul 16, 2015 at 12:13 PM, Procházka Lukáš Ing. - Pontex s. r. o. l...@pontex.cz wrote: Hello, On Thu, 16 Jul 2015 11:03:05 +0200, luigi scarso luigi.sca...@gmail.com wrote: \def\GG{\ifmmode G_G\else$\GG$\fi} means define the macro \GG as G_G if mmmod is true, else as \GG It's

Re: [NTG-context] What is a better way to do this macro?

2015-07-16 Thread Wolfgang Schuster
Idris Samawi Hamid ادريس سماوي حامد mailto:idris.ha...@colostate.edu 16. Juli 2015 20:49 Dear gang, Consider the following (also attached): =choice-cs.tex \def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={} \halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}}

Re: [NTG-context] What is a better way to do this macro?

2015-07-16 Thread Idris Samawi Hamid ادريس سماوي حامد
Hi Wolfgang, On Thu, 16 Jul 2015 13:03:15 -0600, Wolfgang Schuster schuster.wolfg...@gmail.com wrote: You can use the \framed command. \define[2]\ChoiceOne {\dontleavehmode\framed[frame=off,location=bottom,align=middle,offset=0pt]{#1\\#2}}

[NTG-context] What is a better way to do this macro?

2015-07-16 Thread Idris Samawi Hamid ادريس سماوي حامد
Dear gang, Consider the following (also attached): =choice-cs.tex \def\CHOICE#1#2{\leavevmode\vbox{\tabskip=0pt\everycr={} \halign{\strut\hfil##\hfil\cr#1\cr#2\cr}}} \setuppagenumber[state=stop] \setupwhitespace[big] \starttext (One~* Two~* Three~* Four) is even.

Re: [NTG-context] What is a better way to do this macro?

2015-07-16 Thread Wolfgang Schuster
Idris Samawi Hamid ادريس سماوي حامد mailto:idris.ha...@colostate.edu 16. Juli 2015 22:09 Hi Wolfgang, all, Here is a new test file. Objective: To control the interlinespacing of the \\ command inside of \framed while keeping the bottom argument y of {x\\y} on the same baseline as the rest of