[NTG-context] Unexpected emergency stop

Tim Steenvoorden tim.steenvoorden at gmail.com
Sat Feb 10 13:57:53 CET 2018


Thanks Wolfgang, that’s a clear and easy explanation!

Cheers,
Tim
Op za 10 feb. 2018 om 13:46 schreef Wolfgang Schuster <
schuster.wolfgang at gmail.com>

>
> Tim Steenvoorden <tim.steenvoorden at gmail.com>
> 10. Februar 2018 um 12:44
>
> Thanks Otared! Works like a charm!
>
> Out of curiosity, could you explain the mechanics behind this? I know it
> is a commonly used trick in TeX macro definitions, but I don’t know how it
> changes TeX’s understanding of the tokes it parses.
>
>
> When you create a new commands like this
>
>     \def\mycommand[#1]{...}
>
> the brackets are delimiters for the argument of the command, i.e. when TeX
> sees
> \mycommand it looks for [ and grabs everything intill ] as as argument.
> When you
> out now a space (or start a new line) after ] in your definition of the
> command, e.g.
>
>     \def\mycommand[#1] {...}
>
> TeX looks now for “] ” (right bracket followed by a space) as delimiter for
> the argument of your command.
>
>
> Wolfgang
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context at 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
>
> ___________________________________________________________________________________

-- 
----
T.J. Steenvoorden, MSc

PhD Candidate | Radboud University Nijmegen
Faculty of Science | Department of Software Science
Mercator 1 Building | Room 01.08
Toernooiveld 212 | 6525 EC | Nijmegen | The Netherlands
+31 24 365 22 91 | t.steenvoorden at cs.ru.nl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20180210/53d73b91/attachment-0001.html>


More information about the ntg-context mailing list