Am 03.10.2010 um 10:28 schrieb luigi scarso:

>> Bug or limitation?
> Limitation, but it should be doable to remedy in TeX.

Possible but is it worth the effort, when you start with “--” the percent 
should also behave like in Lua etc.

\starttext

\bgroup\obeylines
\gdef\texcomment#1
  {}
\egroup

\bgroup
\let\letterhyphen=-
\catcode`-=13
\unexpanded\def-{\futurelet\next\doscanhyphen}
\def\doscanhyphen
  {\ifx\next-
     \expandafter\texcomment
   \else
     \expandafter\letterhyphen
   \fi}
\obeylines
text
text
% foo
- foo 1
-- foo 2
\normalexpanded{- foo 1}
\normalexpanded{-- foo 2}
text
\egroup

\stoptext

Wolfgang

___________________________________________________________________________________
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
___________________________________________________________________________________

Reply via email to