On 10-1-2011 12:23, Stefan Müller wrote:
Hi list,
there seems to be something wrong with the "escape" mechanism in
verbatim. Line breaks before escaped code are ignored. Consider the
following example from the wiki [1] (e.g. the second line is printed
right behind the first with no line break):
\starttext
\setuptyping[TEX][escape=yes]
\startTEX
/BTEX\em sometex/ETEX
/BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX
\before /BTEX\em sometex/ETEX \after
\before /BTEX\em sometex/ETEX \inbetween /BTEX\em sometex/ETEX \after
\before \after
\stopTEX
\setuptyping[TEX][escape={[[,]]}]
\startTEX
[[\em sometex]]
[[\em sometex]] \after
\before [[\em sometex]]
\before [[\em sometex]] \after
\before [[\em sometex]] \inbetween [[\em sometex]] \after
\before \after
\stopTEX
\setuptyping[TEX][escape=//]
\startTEX
//\em sometex
\before //\em sometex
\stopTEX
\stoptext
Is this a bug or am I missing something here?
I get newlines here.
Also "\setuptyping[TEX][escape=//]" seems to have no effect at all, "//"
is printed just like normal chars.
Actually in mkii it's
\setuptyping[TEX][escape=/]
\startTEX
/em sometex
\before /em sometex
\stopTEX
and indeed in mkiv it does not work. I will provide a bit of backward
compatibility but keep in mind that in mkiv the \em change will cross
lines, so in this case the first sometex as well as \before will be
slanted.
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 74 | www.pragma-ade.com
| www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
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://tex.aanhet.net
archive : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________