CSS, Character Sets, and so onControlling HyperlatexSetting Html attributesMaking characters non-specialContentsIndex

Making characters non-special

 

Sometimes it is useful to turn off the special meaning of some of the ten special characters of LaTeX. For instance, when writing documentation about programs in C, it might be useful to be able to write some_variable instead of always having to type some\_variable, especially if you never use any formula and hence do not need the subscript function. This can be achieved with the \NotSpecial command. The characters that you can make non-special are

      ~  ^  _  #  $  &

For instance, to make characters $ and ^ non-special, you need to use the command

      \NotSpecial{\do\$\do\^}

Yes, this syntax is weird, but it makes the implementation much easier.

Note that whereever you put this declaration in the preamble, it will only be turned on by \begin{document}. This means that you can still use the regular LaTeX special characters in the preamble.

Even within the iftex environment the characters you specified will remain non-special. Sometimes you will want to return them their full power. This can be done in a tex environment. It is equivalent to iftex, but also turns on all ten special LaTeX characters.


Tom Sgouros, September 13, 2005

CSS, Character Sets, and so onControlling HyperlatexSetting Html attributesMaking characters non-specialContentsIndex