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

According to minted documentation:

Windows support is sketchy / untested at the moment. There are two complications: installation and usage.......

This question seeks a step by step elaboration of

How to setup minted for use with MikTeX under Windows?

share|improve this question
I could not find a similar question. If there is any, kindly let me know. This is an attempt to build a reference point. – Harish Kumar Apr 14 '13 at 10:34
Install a virtual machine and work under Unix ;-) – Marco Daniel Apr 14 '13 at 10:40
@MarcoDaniel Why to adopt easy methods when there are difficult ones ;-) – Harish Kumar Apr 14 '13 at 10:55
up vote 13 down vote accepted

minted uses Python pygments library, so you need to:

  • Install Python, choose any version you like: x64 or x86, it better to choose 2.7.5 version.
  • Add Python to PATH:
    • Hold Win and press Pause.
    • Click Advanced System Settings.
    • Click Environment Variables.
    • Append ;C:\Python27 to the PATH variable.
  • Install python-pip.
  • Add ;C:\Python27\Scripts to the PATH variable.
  • pip install pygments to install Pygments (in case you have Perl installed, the full path to pip should be specified, because Perl also has a binary with the same name).

  • Сompile with -shell-escape option enabled:

          string title = "This is a Unicode π in the sky"
          Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the perimeter
          of an $n$-sided regular polygon circumscribing a
          circle of diameter $d$.
          const double pi = 3.1415926535

The result should look like:


share|improve this answer
I like very much your example. I was trying and finally I think that installed pygments. I usually use winedt and 3 buttons. How could I use -shell-escape option enabled ? – Mika Ike Jun 21 '14 at 10:25
@MikaIke Actually, I don't use Winedt so can't answer this. Better to ask this question or to Google it, I think it already have been answered somewhere. – m0nhawk Jun 21 '14 at 12:40
@MikaIke: Go to OptionsExecution Modes and the in the window that opens, choose pdflatex (or any engine that you use). Add --shell-escape in Switches. See this picture: i.stack.imgur.com/bY3rH.png – Harish Kumar Aug 1 '15 at 23:40

Install python for windows. Then install setuptools. This should add easy_install.exe file in the Scripts folder of your python directory (something like: C:\Python26\Scripts\ in my computer. It may be different for you.) Add C:\Python26\Scripts to your system path using user variables. You may wish to use a user friendly editor: path editor for this purpose.

Now with internet on, go to the command prompt and type easy_install pygments.

enter image description here

Now you may have to restart your computer. And there you go. Try this test file:


\usepackage{minted} % loads fancyvrb



  d &= \sqrt{ (x'-x)^2 }
  e &= 0

  d = \sqrt{ (x'-x)^2 }  \\
  = f(x,x')


enter image description here

share|improve this answer
pygmentize.cmd is not really needed, in latest version there is a pygmentize.exe inside the Scripts folder, so, only adding that folder in PATH is necessary. – m0nhawk Apr 14 '13 at 12:33
@m0nhawk Good to know. I have edited it in my answer. Thank you. – Harish Kumar Apr 14 '13 at 14:48

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.