From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Unexpected emergency stop
Date: Sat, 10 Feb 2018 13:45:29 +0100 [thread overview]
Message-ID: <5A7EE969.9060105@gmail.com> (raw)
In-Reply-To: <CAJjcFnJuy6P7TtXiC+7jE_iJUhnJ-0COXv1_ksx9xdTOpFLVGQ@mail.gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 810 bytes --]
> Tim Steenvoorden <mailto:tim.steenvoorden@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
[-- Attachment #1.2: Type: text/html, Size: 1890 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
___________________________________________________________________________________
next prev parent reply other threads:[~2018-02-10 12:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-09 18:03 Tim Steenvoorden
2018-02-09 19:49 ` Otared Kavian
2018-02-10 11:44 ` Tim Steenvoorden
2018-02-10 12:45 ` Wolfgang Schuster [this message]
2018-02-10 12:57 ` Tim Steenvoorden
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5A7EE969.9060105@gmail.com \
--to=schuster.wolfgang@gmail.com \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).