Changes

Jump to navigation Jump to search
1,279 bytes added ,  13:19, 7 September 2005
β†’β€ŽIn-line text: Taco's macro for in-line \typeTEX-ing added
=In-line text=
 
<code>\startTEX ... \stopTEX</code> only works when typesetting the whole paragraph. If you need to type only a command or two as in-line text, you can use the following [[User:Taco|Taco's]] macro (hopefully this will land in the core once in the future):
 
<texcode>
\def\typeTEX
{\bgroup
\def\processinlineverbatim##1%
{\processingverbatimtrue
\localcatcodestrue
\def\endofverbatimcommand{\TEXendofcommand##1}%
\bgroup
\aftergroup\endofverbatimcommand
\futurelet\next\doprocessinlineverbatim}%
\initializetyping{TEX}%
\startverbatimcolor
\processinlineverbatim\egroup }
</texcode>
 
Now you can say:
 
<texcode>
\typeTEX+\typeTEX{\typeTEX is a wonderful macro}+, isn't it?
</texcode>
<context>
\setupcolors[state=start]
\def\typeTEX
{\bgroup
\def\processinlineverbatim##1%
{\processingverbatimtrue
\localcatcodestrue
\def\endofverbatimcommand{\TEXendofcommand##1}%
\bgroup
\aftergroup\endofverbatimcommand
\futurelet\next\doprocessinlineverbatim}%
\initializetyping{TEX}%
\startverbatimcolor
\processinlineverbatim\egroup }
 
\typeTEX+\typeTEX{\typeTEX is a wonderful macro}+, isn't it?
</context>
 
Source: [http://archive.contextgarden.net/thread/20050907.093522.baf795f5.en.html]
=Interesting features=

Navigation menu