Verb in math mode
- Include
\usepackage{fancyvrb} % math mode in verbatim
- SaveVerb to define verb text
\SaveVerb{verbtext}+verb text+
- UseVerb
\UseVerb{verbtext} within math mode
Examples
\usepackage{fancyvrb} % math mode in verbatim
\SaveVerb{verbtext}+verb text+
\begin{align*}
\UseVerb{verbtext}
\end{align*}
Color the verbatim
Define new blockcode environment
\DefineVerbatimEnvironment{blockcode}
{Verbatim}
{formatcom=\color{blue}}
Examples
\begin{blockcode}
text to be colored
\end{blockcode}
Break lines in verb
Include this new package: spverbatim
\usepackage{spverbatim} % break lines at spaces when vs. \verb
Use \spverb
\spverb+\langle \listarg \rangle+
Examples
Math in Verbatim
No comments :
Post a Comment