Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- documentclass{article}
- usepackage{listings}
- usepackage{xcolor}
- lstset{
- basicstyle=ttfamily,
- keywordstyle=color{blue},
- keywords={function},
- escapeinside={|}{|}
- }
- deffbar{function bar ();}
- begin{document}
- begin{lstlisting}[]
- function foo ();
- |fbar|
- end{lstlisting}
- end{document}
- documentclass{article}
- usepackage{listings}
- usepackage{xcolor}
- lstset{
- basicstyle=ttfamily,
- keywordstyle=color{blue},
- keywords={function},
- escapeinside={|}{|}
- }
- deffbar{scantokens{function bar ();}}
- begin{document}
- begin{lstlisting}[]
- function foo ();
- |expandafter|fbar
- end{lstlisting}
- end{document}
- documentclass{article}
- usepackage{listings}
- usepackage{xcolor}
- lstset{
- basicstyle=ttfamily,
- keywordstyle=color{blue},
- keywords={function},
- escapeinside={|}{|}
- }
- deffbar{scantokens{|function bar ();}}
- begin{document}
- begin{lstlisting}[]
- function foo ();
- |fbar
- end{lstlisting}
- end{document}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement