TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using minted to format code in a book. Except for the bw theme, I only see colored styles, which is nice for producing a PDF, but not ideal for printing in black & white.

Is there a clean black & white style I can use (probably something resembling what algorithmicx produces) for pygments/minted which I could use for the printable version of the book?

share|improve this question
You can try \usepackage[gray]{xcolor} – Marco Daniel May 29 '12 at 16:00
That works @MarcoDaniel, but it doesn't make text bold like algorithmicx does. – ℝaphink May 29 '12 at 18:31
The gray option prevents other colors to appear. Especially, when highlighting some text (like when using the changes package). Using ulem instead of colors might not be the best choice: tex.stackexchange.com/questions/270901/…. I really like the friendly style and would love to see it converted to a grayscale style. – koppor Oct 4 '15 at 9:54
up vote 5 down vote accepted

Marco's solution is probably the nicest one:


The reason I was not getting bold text was that I only loaded Inconsolata and not Inconsolata Bold. I now set up my mono font like this:

\setmonofont[Scale=0.9,BoldFont={Inconsolata Bold}]{Inconsolata}

and the result is fine (using the default style):

black and white code listing

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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