| 1 |
\global\newtoks\lstTeXcolors |
| 2 |
\global\newtoks\_TeX_listingcommands |
| 3 |
|
| 4 |
\global\lstTeXcolors={ |
| 5 |
\definecolor{special char}{rgb}{.7 0 .4} |
| 6 |
\definecolor{macro}{rgb}{1 0 0} |
| 7 |
\definecolor{math}{rgb}{.7 0 .4} |
| 8 |
\definecolor{code char}{rgb}{0 .6 0} |
| 9 |
} |
| 10 |
|
| 11 |
\global\_TeX_listingcommands={ |
| 12 |
\the\lstTeXcolors |
| 13 |
\bgroup\lccode`?=`\%\lowercase{\egroup |
| 14 |
\replace {\_mstrip\\?}{\w\c{special char}{\_mstrip\\?}\w} |
| 15 |
\replacefromto ?\n{\w\c{lst-comment}{?#1}\w\n}% |
| 16 |
} |
| 17 |
\replace {\string$}{\w\c{math}{\string$}\w} |
| 18 |
\replace {\string&}{\w\c{special char}{\string&}\w} |
| 19 |
\replace {\string#}{\w\c{special char}{\string#}\w} |
| 20 |
\bgroup\lccode`?=`\{\lccode`!=`\} |
| 21 |
\lowercase{\egroup |
| 22 |
\replace ?{\w\c{special char}{?}\w}% |
| 23 |
\replace !{\w\c{special char}{!}\w}% |
| 24 |
} |
| 25 |
\replacefromto {\string^\string^}\w {\c{code char}{\string^\string^#1}\w} |
| 26 |
\replacefromto {\_mstrip\\}\w{\c{macro}{\_mstrip\\#1}\w} |
| 27 |
} |
| 28 |
|