{minted} is a package that facilitates expressive syntax highlighting in LaTeX using the powerful Pygments library. The package provides options to customize the highlighted source code output using {fancyvrb}. You'll need to install python-pygments (e.g sudo apt-get install python-pygments). ...

learn more… | top users | synonyms

1
vote
2answers
35 views

Minted “underfull \hbox (badness 10000) in paragraph” when using bgcolor [closed]

When I use minted to highlight BASH code like this \documentclass[a4paper, 11pt, twoside]{article} \usepackage{xltxtra} \usepackage{xunicode} \usepackage{polyglossia} \usepackage[svgnames]{xcolor} \...
4
votes
1answer
50 views

Problem with \mintinline{latex} and ToC

I'd like to use code highlighting for LaTeX in my sectional titles. In the titles themselves it works, but the it does not in the Table of Contents. Here a minimal example: \documentclass{scrartcl} \...
4
votes
1answer
77 views

Get minted up and running with clean thesis

I am currently working with the cleanthesis package. Customizing this thing was ok so far, but now I encountered a real problem. While trying to use minted, I wasted a lot of time till I found out it ...
4
votes
1answer
99 views

Generate tikz coordinate for each line from minted file included

I want to include a file ../basename.end via minted and automatically generate a tikz-coordinate basename-$LINENUMBER for the beginning of each line of the included file... I fumbled around with ...
4
votes
0answers
78 views

Copyable tabs in minted

I'm preparing tutorial for students with code fragments that they will copy to a text editor. Is there a way to make syntax-highlighted code copyable to text editor so that indentation is preserved, ...
2
votes
2answers
289 views

How to invoke minted with python3

I have 2 versions of Python on my machine. Version 2.7.10 can be invoked with python, whereas python3 uses 3.5.0 under the hood. I'd like to use minted with python3, which is why I installed Pygments ...
4
votes
1answer
122 views

Work-around for minted code highlighting in arXiv?

I am currently trying to submit my bachelors thesis to arXiv. However, it does not work: (/texlive/2011/texmf-dist/tex/generic/oberdiek/etexcmds.sty)) Package ifplatform Warning: shell escape is ...
1
vote
0answers
50 views

tcolorbox, not displaying symbols in listings (using minted) [closed]

I have the following latex code \begin{ipythonnb} \begin{ipyin} A = np.array([[3, 2, -1], [2, -2, 4], [-1, 0.5, -1]]) b = np.array([1, -2, 0]) np.linalg.solve(A,b) \end{ipyin} \begin{ipyout} array([ ...
1
vote
1answer
62 views

Background color for a range of lines in Minted

I have a long piece of code that highlight with minted. I would like to have a background only around a block of code. How can I achieve that? I tried to use something like escapeinside=|| to create ...
3
votes
1answer
754 views

Pygmentize not working properly with minted package in TexShop on OS X

I am using TexShop on mac OS X 10.11.1 and I'm trying to output some Python code inside my LaTeX document. Here is an example of a document I would want to produce : \documentclass[12pt]{article} \...
1
vote
0answers
113 views

Can't enable breakanywhere option [closed]

I'm trying to activate breakanywhere option (tried with both breaklines enabled/disabled) but I get this message: ! Package xkeyval Error: `breakanywhere' undefined in families `minted@opt@cmd' ...
1
vote
0answers
116 views

Problem with Minted using Mactex

I'm having an issue using Minted, the following error appears: Package minted Error: You must have `pygmentize' installed to use this package. But I've already installed Pygmentize. I've tried ...
2
votes
0answers
42 views

\mintinline expands to a single newline

I'm using Minted 2.1, that I have installed through tlmgr, and Texmaker 4.1. Compiling the following piece of code (straight from the documentation) : \documentclass{report} \usepackage[utf8]{...
1
vote
0answers
50 views

Count lines of multiple files (Using minted for formatting.)

I am using minted to show source code in my document like this: \section{Image functions} \inputminted{python}{src/imagefuncs.py} \section{Matrix operations} \inputminted{python}{src/matrices.py} \...
2
votes
1answer
110 views

Minted Package, inline background color

MWE: \documentclass[10pt]{article} \usepackage[english]{babel} \usepackage[paperwidth=6in,paperheight=9in, margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{...
2
votes
0answers
361 views

minted package - keyval error: breaklines undefined

On Fedora 22 system: I installed texlive-scheme-full, Python 2.7 (and pygments 2.0.2) as well as all the pre-requisites for minted. I am trying to use the breaklines command with the minted package. I ...
1
vote
0answers
42 views

Centering code listings in tabular

I'm inserting code listings using mint into a tabular, but the text and listings in corresponding columns aren't centered. How do I center them? Here's my table code: \begin{center} \begin{...
0
votes
2answers
103 views

Converting latex highlighted code listing to image

Does someone know how I could submit a paper to a journal which contains source code highlighting with minted https://github.com/gpoore/minted ? I really like the highlighting and don't want to go ...
0
votes
1answer
269 views

\vspace not working as expected

I have a code block using minted and mdframed and a caption afterwards. \begin{mdframed} \begin{minted}[tabsize=4]{c++} some code \end{minted} \end{mdframed} \begingroup\captionof{listing}{some ...
1
vote
1answer
69 views

dblatex generated output does not play nice with minted

I have a large LaTeX file generated with dblatex. When I replace lstlisting environment with minted it fails to process it. XeLaTeX produces following errror: ! Missing \endcsname inserted. <to be ...
0
votes
1answer
412 views

Python error while generating code snippets with minted and Pygments in Anki

On the command line everything works fine but in in Anki I get a python error. My computer: MacBook Air (13-inch, Mid 2012) Processor 2 GHz Intel Core i7 Memory 8 GB 1600 MHz DDR3 My operating ...
2
votes
1answer
123 views

Don't understand error of LaTeX after creating a new environment

I'm using the minted-package to color code in a paper I'm writing. In order to change the style of the parts where my code will be displayed later down the road I defined a new enviroment. However, ...
4
votes
1answer
86 views

How to add caption correctly in listing?

I have two blocks lstlisting and another listing as follows: \documentclass{article} \usepackage[T1]{fontenc} \usepackage{inconsolata} \usepackage{color} \definecolor{pblue}{rgb}{0.13,0.13,1} \...
3
votes
1answer
153 views

How to display the symbol dollar $ correctly?

I have a minted block as follows: \documentclass{article} \usepackage{minted} \usepackage{listings} \begin{document} \begin{listing}[ht] \begin{minted}{xml} <plugin> <...
2
votes
1answer
179 views

mintinline inside tabularx causes “Missing Pygments output” error

I'm working on a reference table for printf format strings: \documentclass[a4paper]{article} \usepackage{tabularx} \usepackage{minted} \usepackage{fontspec} \setmonofont{ubuntu Mono} \usepackage[...
1
vote
1answer
158 views

Multipage listings with minted and captions

I have source long listings (2+ pages) that I highlight using minited via \inputminted. I wish to have have a caption and a reference label for the listing in \listoflistings and in my text when I ...
2
votes
1answer
162 views

How to properly number between lstlisting and listing the same latex file?

I'm having trouble with the legend of the lstlisting and listing the latex file when I reference them both are appearing as listing 1. How do I display the number of correctly caption for listing 1 ...
1
vote
1answer
114 views

Problem, when loading minted after \tikzexternalize

Yesterday I found my old thesis and found out that there is a new version of minted (2.0+) which somehow don't want to work with my old thesis since all the listings were not highlighted. ...
3
votes
1answer
163 views

mixing minted with lstlisting

I have a List of Listings that looks like this: The first listing, which is correct, uses lstlisting. 3.1 is the correct chapter. The second listing uses minted. Somehow it shows 1 as chapter, ...
5
votes
1answer
259 views

XeLaTeX and ifplatform/catchfile (loaded by “minted”): Errors on compilation

I'm using minted along with XeLaTeX, but recently I've run into strange problems. To illustrate what I mean, consider the following MWE (the filename is main.tex): \documentclass{minimal} \...
2
votes
2answers
118 views

xelatex: Minted code block represents tabs as ^^I

I am producing LaTeX output with org mode. My code snippets wind up being indented with tabs, because of my c-mode settings. Changing these would be inconvenient. Although the snippet I am posting ...
3
votes
1answer
145 views

lstlistoflistings is unformatted

I habe a problem to get a list of listings that looks like the normale table of figures or basically like any other list of anything. As I am not a tex or latex pro, i tried several packages and ...
3
votes
1answer
111 views

How to set the label for listings?

Hi I'm new in Latex and I'm using this code from the Board everything is working, but I don't know how to set the label for the listing with this code \usepackage[many,minted]{tcolorbox} \newcommand{...
3
votes
2answers
131 views

How to supress chktex errors in minted environment?

Is there a way to make chktex play nice with the minted package? Right now, it seems to assume that normal checks apply to the content of the minted environments and produces a lot of warnings.
1
vote
0answers
142 views

Minted. Code highlighting right margin

I use minted for Python code, but with the long lines, instead of adapting to the document text width, it expands to the right without any kind of margin, and the code that doesn't fit, just does not ...
1
vote
0answers
57 views

Determine equal spacing before and after minted environment

I have some code in a minted-environment that I want to separate from the rest of the text by equal spacing before and after the environment. I successfully used the method described here for an ...
4
votes
1answer
191 views

How can I make listings look like minted?

Up until now I used the listings package for my code-listings. Today, I tried minted and I'm pleased with the default look. Since I'd have a lot to do to switch from listings to minted at this stage ...
1
vote
0answers
125 views

JavaScript ES6 Code highlighting

I'm using the latest minted to highlight my sourcecode. I've got a lot of code listings using ES5 and ES6 javascript features but minted is lacking a lot of them still. What can I do to get proper ...
1
vote
1answer
64 views

Version dependent package conflict

For testing purposes I am using a recent version of minted (from TeX Live 2015) with TeX Live 2014, containing also the 2014 version of eledmac. Between the two packages in these two versions there is ...
3
votes
1answer
99 views

How to put space before and after an \inputminted code block with bgcolor?

This is related to the question How to space before and after a `minted` code block with bgcolor? There it is explained that there is a bug with minted which causes the space above and below a code ...
2
votes
1answer
284 views

Customizing the list of listings from minted

This question is in regards to customizing the format of the list of listings produced with the minted package. In particular, I want to replicate the formatting produced via the tocloft for Figures: ...
2
votes
1answer
55 views

Using minted to highlight Mako templates

When attempting to use the minted package to highlight a piece of source code in the Mako templating language: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \...
7
votes
1answer
534 views

Minted mathescape

Please consider the following code: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}[mathescape=true]{text} $A\wedge B$ \end{minted} \end{document} When I try to compile ...
1
vote
0answers
58 views

Using the minted package font in normal listings

I've recently used the minted package with the pastie style to display code but I wasn't happy with the general output. However, I did like the font family. Now I'm trying to use the minted font for ...
2
votes
1answer
160 views

minted with Texmaker on OS X

I'm trying to use minted with texmaker. The weird thing is, that it works, when I invoke pdflatex --shell-escape testfile in the system shell, but not from texmaker, though Options -> Configure ...
2
votes
0answers
242 views

Undefined control sequence since tcolorbox version 3.71 [2015-07-23] [closed]

I had a code that was perfectly fine before I update tcolorbox. Here is a MWE: \documentclass[11pt, twoside]{report} \usepackage[usenames,dvipsnames,svgnames,rgb]{xcolor} \usepackage{setspace} \...
1
vote
0answers
1k views

Package minted Error: Missing Pygments output Latex [closed]

I am using Anaconda Scientific package for installing all the python related packages. I want to use minted package for editing my script in Latex. However, after I set up all the things correct. The ...
1
vote
0answers
29 views

how to use inline syntax highlighting from mint inside tabular column

I want to display single lines (not whole blocks) of code in a tabular column. The result should work with longtable as well. I defined a shorthand for inline highlighting using minted. It allows to ...
8
votes
1answer
219 views

Prevent pagebreak between minted and captionof

I know there are already many questions there covering that or at least similar topics. I've read this for example but can't get it figured out... At first here comes my MWE: \documentclass{scrartcl}...
5
votes
1answer
70 views

Rewrite \begin{foo}\end{foo} to \begin{bar}{opts}\end{bar}?

I know this is likely a simple Latex macro question. I've got a large document with a ton of lstlisting blocks, and I'd like to use minted instead. That means turning blocks that look like this: \...