From: Hans Hagen <pragma@wxs.nl>
Subject: Re: Malicious little bugger
Date: Mon, 03 Jul 2006 10:43:14 +0200 [thread overview]
Message-ID: <44A8D8A2.3060605@wxs.nl> (raw)
In-Reply-To: <Pine.WNT.4.63.0607030113180.2244@nqvgln>
Aditya Mahajan wrote:
> On Sun, 2 Jul 2006, David Arnold wrote:
>
>
>> Sanjoy,
>>
>> Of course. Thanks.
>>
>> But how about an example in latex or tex where a function eats a
>> brace and crashes, as what happens with this context code:
>>
>> \placeformula[-]
>> \startformula
>> [9,\infty)=\{x:\,x\ge 9\}
>> \stopformula
>>
>> I know I've seen this in Latex before, but I can't remember where.
>>
>
> \begin{equation}
> \begin{aligned}
> [g,\infty)=\{...\}
> \end{aligned}
> \end{equation}
>
> The package mathtools enforces that the optional arguments of aligned
> et al. should come in the same line, that is
>
> \begin{aligned}[t] takes "t" as an optional arguments which
>
> \begin{aligned}
> [t]
>
that only can work if one gives the end of line characters a different
catcode; a side effect is that the lookahead may fail when the formula
is passed in a macro so it will never be robust
> does not.
>
> I do not think that this can be ever enforced in Context, because a
> lot of Context code is written like
>
> \definesomething
> [somename]
> [some options]
>
> \dosingleempty et al, could be changed to stop scanning on a newline,
> but I am certain it will break some of the internals.
>
indeed,
for tex (unless one messes around with the endline char)
\define[]
\define []
\define []
\define
[]
is the same, and in order to be consistent, context even does some
explicit testing so that intermediate newlines and spaces are gobbles
(when non standard), think of:
\define[][]
\define[] []
\define []
[]
why should we treat spaces between \define [] and [] [] differently?
anyhow, it dates back a long time, is rather optimized, and will not change
Hans
next prev parent reply other threads:[~2006-07-03 8:43 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-02 4:36 David Arnold
2006-07-02 11:23 ` Hans Hagen
2006-07-02 18:15 ` Peter Münster
2006-07-02 19:01 ` Taco Hoekwater
2006-07-02 19:53 ` Hans Hagen
2006-07-02 20:25 ` Peter Münster
2006-07-02 23:35 ` David Arnold
2006-07-03 2:29 ` Sanjoy Mahajan
2006-07-03 2:32 ` David Arnold
2006-07-03 5:17 ` Aditya Mahajan
2006-07-03 8:43 ` Hans Hagen [this message]
2006-07-03 6:26 ` Taco Hoekwater
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=44A8D8A2.3060605@wxs.nl \
--to=pragma@wxs.nl \
--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).