TeX/csname

From Wikibooks, open books for an open world
< TeX
Jump to: navigation, search

Synopsis[edit]

\csname

Description[edit]

Used with \endcsname. The text between the two commands build the name of a TeX command.

Example[edit]

 \def\x{paragraph}
 
 % \def\startparagraph#1{...}
 \def\csname start\x\endcsname#1{...}
 
 % \def\stopparagraph#1{...}
 \def\csname stop\x\endcsname#1{...} 
 
 % \startparagraph{mytext}
 \csname start\x\endcsname{mytext}