[NTG-context] Movable code, was Re: starttexdefinition error in standalone, works in TL2013

2014-03-12 Thread Rik
On 2014-03-01 07:32, Wolfgang Schuster wrote: \unexpanded\def\startTranslation {\begingroup \dosingleempty\dostartTranslation} \def\dostartTranslation[#1]% {\iffirstargument \getrawparameters[Translation][setups=,language=en,#1]% \fi

Re: [NTG-context] starttexdefinition error in standalone, works in TL2013

2014-03-01 Thread Wolfgang Schuster
things incorrectly. The \starttexdefinition was extended after the texlive release to support keywords like global or expanded and has therefore changed since then. The reason why it fails is that context passes the argument to Lua where they are parsed and at this point macros like your

Re: [NTG-context] starttexdefinition error in standalone, works in TL2013

2014-03-01 Thread Rik Kabel
On 2014-03-01 07:32, Wolfgang Schuster wrote: Am 27.02.2014 um 05:08 schrieb Rik Kabel cont...@rik.users.panix.com: {useful information on TL2013 and starttexdefinition skipped} BTW: It’s better to follow contexts rules and use start/stop for environments, this way you can make use

Re: [NTG-context] starttexdefinition error in standalone, works in TL2013

2014-02-27 Thread Rik Kabel
Sorry for the not-so-minimal example with the obvious errors around the setup. Here is a stripped version that shows the problem: % macros=mkvi \let\EndTranslation\relax % The following should work, but fails with current beta \starttexdefinition Trans #TRANSLATION\EndTranslation

[NTG-context] starttexdefinition error in standalone, works in TL2013

2014-02-26 Thread Rik Kabel
) if a space is inserted after [#SETUP] in the doTrans intro. I thought that spaces should be allowed in \starttexdefinition -- is this only in the body and not the parameter description? % macros=mkvi \showframe \let\EndTranslation\relax \starttexdefinition Trans \dosingleempty

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-05 Thread Hans Hagen
On 4-9-2012 20:44, Marco Patzer wrote: On 2012-09-04 Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Why does adding semicolon not work? Do you have a example? \starttext \startluacode if true then; context(true) else; context(false) end \stopluacode \stoptext

[NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
{% \startluacode if true then else end \stopluacode} % This one fails % \starttexdefinition mycmd % \startluacode % if true then % else % end % \stopluacode % \stoptexdefinition \startluacode userdata = userdata or { } function userdata.myfun() if true

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Wolfgang Schuster
. % This one fails % \starttexdefinition mycmd % \startluacode % if true then % else % end % \stopluacode % \stoptexdefinition \starttexdefintion mycmd \startluacode if true then % else % end \stopluacode \stoptexdefinition Wolfgang

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Aditya Mahajan
and put a comment sign at the end of the line. % This one fails % \starttexdefinition mycmd % \startluacode % if true then % else % end % \stopluacode % \stoptexdefinition \starttexdefintion mycmd \startluacode if true then % else % end \stopluacode \stoptexdefinition Why

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Wolfgang Schuster
Am 04.09.2012 um 20:24 schrieb Aditya Mahajan adit...@umich.edu: Why does adding semicolon not work? Do you have a example? Wolfgang ___ If your question is of interest to others as well, please add an entry to

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Why does adding semicolon not work? Do you have a example? \starttext \startluacode if true then; context(true) else; context(false) end \stopluacode \stoptext Marco

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Herbert Voss
Am 04.09.2012 20:44, schrieb Marco Patzer: On 2012-09-04 Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Why does adding semicolon not work? Do you have a example? \starttext \startluacode if true then; context(true) else; context(false) end \stopluacode \stoptext

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: Hi Herbert, \starttext \startluacode if true then; context(true) else; context(false) end \stopluacode \stoptext that is no Lua syntax if true then; print(true) else; print(false) end This

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Aditya Mahajan
On Tue, 4 Sep 2012, Herbert Voss wrote: Am 04.09.2012 20:44, schrieb Marco Patzer: On 2012-09-04 Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Why does adding semicolon not work? Do you have a example? \starttext \startluacode if true then; context(true) else;

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread luigi scarso
On Tue, Sep 4, 2012 at 9:05 PM, Marco Patzer home...@lavabit.com wrote: On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: Hi Herbert, \starttext \startluacode if true then; context(true) else; context(false) end \stopluacode \stoptext

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Herbert Voss
Am 04.09.2012 21:05, schrieb Marco Patzer: if true then; print(true) else; print(false) end This snippet fed into a standalone Lua interpreter prints “true” on the terminal. I admit, I did not look up the syntax in the manual, but I have in mind that semicolons can be used to separate

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread luigi scarso
On Tue, Sep 4, 2012 at 9:05 PM, Aditya Mahajan adit...@umich.edu wrote: On Tue, 4 Sep 2012, Herbert Voss wrote: Am 04.09.2012 20:44, schrieb Marco Patzer: On 2012-09-04 Wolfgang Schuster wolfgang.schus...@gmail.com wrote: Why does adding semicolon not work? Do you have a example?

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Herbert Voss
Am 04.09.2012 21:22, schrieb luigi scarso: http://www.lua.org/manual/5.1/manual.html#2.4.4 The unit of execution of Lua is called a chunk. A chunk is simply a sequence of statements, which are executed sequentially. Each statement can be optionally followed by a semicolon: : : 2.4.4 - Control

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: voss@shania:~/ConTeXt lua zzz.lua lua: zzz.lua:1: unexpected symbol near ';' marco@homerow:/tmp$ lua t.lua true voss@shania:~/ConTeXt lua -v Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio marco@homerow:/tmp$ lua -v Lua 5.2.1

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Herbert Voss
Am 04.09.2012 21:35, schrieb Marco Patzer: On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: voss@shania:~/ConTeXt lua zzz.lua lua: zzz.lua:1: unexpected symbol near ';' marco@homerow:/tmp$ lua t.lua true voss@shania:~/ConTeXt lua -v Lua 5.1.4 Copyright (C) 1994-2008 Lua.org,

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread luigi scarso
On Tue, Sep 4, 2012 at 9:35 PM, Marco Patzer home...@lavabit.com wrote: On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: voss@shania:~/ConTeXt lua zzz.lua lua: zzz.lua:1: unexpected symbol near ';' marco@homerow:/tmp$ lua t.lua true voss@shania:~/ConTeXt lua -v Lua 5.1.4

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Marco Patzer
On 2012-09-04 Herbert Voss herbert.v...@fu-berlin.de wrote: voss@shania:~/ConTeXt lua -v Lua 5.1.4 Copyright (C) 1994-2008 Lua.org, PUC-Rio marco@homerow:/tmp$ lua -v Lua 5.2.1 Copyright (C) 1994-2012 Lua.org, PUC-Rio the syntax changes, see

[NTG-context] \starttexdefinition and @ in macroname in mkvi

2011-12-30 Thread Aditya Mahajan
Hi, @, !, _ etc.\ are not recognized as part of the macro name when using MkVI named arguments with \starttexdefinition. For example, consider the following example: \unprotect \starttexdefinition test@again #name Name is #name \stoptexdefinition \protect Processing this file using

Re: [NTG-context] \starttexdefinition and @ in macroname in mkvi

2011-12-30 Thread Hans Hagen
On 30-12-2011 10:43, Aditya Mahajan wrote: Hi, @, !, _ etc.\ are not recognized as part of the macro name when using MkVI named arguments with \starttexdefinition. For example, consider the following example: \unprotect \starttexdefinition test@again #name Name is #name \stoptexdefinition