Whenever I try to use the mintinline command in a source file and then compile that file with pdflatex, I get an error. Minimum example to show the error is provided below:


When I run pdflatex --shell-escape sample.tex (where sample.tex) is the name of the file I have this code in), I get the following output:

This is pdfTeX, Version 3.14159265-2.6-1.40.15 (TeX Live 2014/Arch Linux) (preloaded format=pdflatex)
\write18 enabled.
entering extended mode
LaTeX2e <2014/05/01>
Babel <3.9k> and hyphenation patterns for 79 languages loaded.
Document Class: book 2007/10/19 v1.4h Standard LaTeX document class
Style option: `fancyvrb' v2.7a, with DG/SPQR fixes, and firstline=lastline fix 
<2008/02/07> (tvz)) (/usr/share/texmf-dist/tex/latex/xcolor/xcolor.sty
(/usr/share/texmf-dist/tex/generic/oberdiek/etexcmds.sty)) (./sample.w18)) /usr/bin/pygmentize

(./sample.aux) (/usr/share/texmf-dist/tex/context/base/supp-pdf.mkii
[Loading MPS to PDF converter (version 2006.09.02).]
) (./sample.pyg)
! Undefined control sequence.
l.4 \mintinline

Am I missing something here?

  • The command is \mint, not \mintinline. It should be \mint{vala}|main| (assuming vala is a legal language name).
    – egreg
    Commented Oct 5, 2014 at 23:25
  • 1
    @egreg: Quoting the documentation: "Note that the \mint command is not for inline use. Rather, it is a shortcut for minted when only a single line of code is present. The mintinline command is provided for inline use."
    – Koz Ross
    Commented Oct 5, 2014 at 23:31
  • 2
    I see no mention of \mintinline in the documentation of minted. Are you perhaps looking at the manual for the development version?
    – egreg
    Commented Oct 5, 2014 at 23:34
  • Ah, yeah, you're probably right. I took it from the github page for minted, and that's probably the cause. Thanks.
    – Koz Ross
    Commented Oct 5, 2014 at 23:35

1 Answer 1


The \mintinline command is provided by the development version of minted, not the one in the current TeX distributions. If you want to use it, manually install the development version.

You can instead use pythontex:

Abc \pygment{vala}|main| def

This requires running pythontex <filename> after a LaTeX run (when there are new code snippets).

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .