this works great---well, I stole it right out of the docs:

!   red

now I would like to have multiple active characters, each designating a particular style. I could bore everyone with my code that tries to generalize this to two or three characters (define '-' as active, then add another defineactive with a comma), but they were all wrong.

is this easy?

a related question (not needed) is whether one can easy switch forth and back on the same line.

advice appreciated.


You can have multiple active characters:



!    red
@    blue
?    orange


enter image description here

and define a custom environment to handle this specification, but I'd strongly suggest you to switch to the listings package for heavy formatting of listings.

| improve this answer | |
  • agreed. I think fancyvrb is better for showing interactions of a user with a shell and programs, with some input and output, etc., that need to come in different typeset. – ivo Welch May 29 '14 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.