In my Verbatim I need to specify colour for my code.
In this answer (fancyvrb alternate commandchars and \textcolor) the solution is to put this code in the preamble:
\newcommand*{\fvtextcolor}[1]{\textcolor{#1}{#2}}
and then use
\begin{Verbatim}[commandchars=&\[\]]
&fvtextcolor[blue][function]
\end{Verbatim}
My problem is the commandchars. \textcolor needs a pair of braces, but in my code I use all the pair of braces that is: () [] {}.
So is it possible to specify another pair of commandchars? Something like
&fvtextcolor'blue''function' or &fvtextcolor"blue""function"?
[commandchars=\&\`\']would use the backtick for the opening brace and the apostrophe for the closing brace. Any unused character is good. – egreg May 19 '14 at 12:06red'test' ? – Karsten Jancker May 19 '14 at 12:08:(; I tried with"and!and it seems to work. – egreg May 19 '14 at 12:15