[texhax] Question about commandchars in fancyvrb.sty

Robin Fairbairns Robin.Fairbairns at cl.cam.ac.uk
Wed Nov 3 01:08:09 CET 2004

> Hello, I am trying to set the command characters for Verbatim
> environment in fancyverb.sty as;
>   \DefineVerbatimEnvironment{MySplus}{Verbatim}{commandchars=@``}
> so I can change the style of S-Plus code partially like;
>   \begin{MySplus}
>      @textsl` sl style splus code here ` 
>      tt style splus code here
>   \end{MySplus}
> since the S-Plus code I would like to put in Verbatim environment uses
> various type of characters except @ and back-tick.
> Could anyone tell me how to enable the back-tick as a command
> character?

you're doing it right, up to the point you mention it a second time.
the command characters have to be three different ones,

so \DefineVerbatimEnvironment{MySplus}{Verbatim}{commandchars=@`'}

would work.  the requirement comes from the way tex decodes arguments:
i can think of no way fancyverb could be made to work like with the
same character substituting for both { and }


More information about the texhax mailing list