{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

3
votes
0answers
57 views

Minted text changes _ to \_ in the final PDF

I'm writing a report and I found something wrong after compiling it. The PDF file showed things like \_ instead of _ and \textquotedbl{} instead of quotation marks. It's pretty important for me to fix ...
5
votes
1answer
38 views

Avoid space when using mintinline wrapped in a new command

I want to wrap mintinline into a new command \cc but it produces an additional whitespace when using it: \documentclass{article} \usepackage{minted} \newcommand{\cc}[1]{{\mintinline{latex}{#1}}} ...
1
vote
0answers
20 views

Best options to highlight Geogebra syntax

I want to write something about geogebra in LaTeX. I usually use the minted package for listings. Is there any language supported by minted which which is very close to the Geogebra Syntax (as used in ...
7
votes
1answer
88 views

! I can't find file `['

I am writing my thesis by using LaTeX and the toptesi package. I am mostly writing on my laptop, but sometimes I need to switch to my other PC. I encounter some problems here when generating the pdf ...
3
votes
1answer
39 views

New environment for Python source code

I am trying hard to create an environment for my source code. Here's my current state \documentclass[a4paper,fontsize=12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
3
votes
1answer
24 views

Natural width when centering a minted environment

I'm writing a report in which I have some code snippets. Using the following code, I'm able to create, and centre, a good-looking minted environment: \documentclass{article} % Required for minted ...
3
votes
2answers
37 views

“Figure” as name of listings in listoflistings with minted and newfloat

The following MWE gives me a List of Listings with "Figure" as name of listings. \documentclass{scrreprt} \usepackage{classicthesis} \usepackage[newfloat]{minted} \begin{document} ...
0
votes
0answers
39 views

Is it possible to use tikzmark inside minted?

As I've pointed out in a related question, I'd like to have some arrows pointing to parts of a source-code listing. I know this is possible with the listings package, but is it possible with minted? ...
3
votes
2answers
114 views

How to draw over minipage in tikz?

I've got a code snippet, that I'd like to annotate with arrows, boxes, and bubbles pointing to the various parts of the code. Right now, I've got the code in a minted environment, inside a minipage, ...
1
vote
2answers
44 views

Displaying minted code line numbers from within preview environment

I'd like to have the line numbers corresponding to code highlighted using the minted package displayed in the output of a preview environment. Perhaps because the line numbers are set in the margin, ...
1
vote
1answer
40 views

minted: how to highlight java method at class

I'm trying to highlight a method at a Java class with minted. The usual notation (at least in Javadocs) for a method at a class is classname#method, but when I do something like: ...
4
votes
1answer
88 views

Difficulties with Minted and UTF-8

I'm trying to typeset Python programs with LaTeX and the Minted package. I'm under Ubuntu 15.10, with TeXlive installed from Ubuntu standard repositories. The python-pygment package is at version ...
11
votes
2answers
228 views

Extract source code on the fly to a file?

I'm trying to create a programming text to use for my students. My goal is to have an environment (say, "code", for instance), so, if I type the following in my .tex file: \begin{code}{Sample script} ...
5
votes
1answer
67 views

Connecting vertical box drawing characters

I've been working on some diagrams for a slide deck using beamer and minted (and buliding the PDF with Xelatex). When using the Unicode box-drawing characters, the vertical bars are not actually ...
3
votes
1answer
58 views

minted fails with breaklines and obeytabs

The following example with a minted enviroment fails with the error message _minted-test/7587C145B52367AE51CACC4AFB0EC13D2F785CCAC2A2CC760CA216BD1781DF79.pygtex:3: Extra }, or forgotten \endgroup. [ ...
0
votes
0answers
30 views

Forcing page break of a minted listing with \centering on

I am using minted to create a code listing. I need the listing to be centered so according to this solution, I use the \RecustomVerbationEnvironment to escape the verbatim environment so that it can ...
2
votes
2answers
31 views

How to get continuos line numbers for minted code blocks

I use minted in following way: \documentclass[a4paper, 11pt, twoside]{article} \usepackage{xltxtra} \usepackage{xunicode} \usepackage{polyglossia} \usepackage[svgnames]{xcolor} % Syntax higlight ...
4
votes
1answer
29 views

Minted breakautoindent changes behaviour on OverLeaf

I am trying to typeset some of my source code using the minted package, this works fine that is to say there is no outright error but something strange happens why I typeset locally. For various ...
1
vote
2answers
23 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
26 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
37 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
63 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
37 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, ...
1
vote
2answers
134 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 ...
2
votes
1answer
37 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
27 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
32 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
220 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
49 views

Can't enable breakanywhere option

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
67 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
20 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} ...
1
vote
0answers
29 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
57 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} ...
2
votes
0answers
143 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
33 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} ...
0
votes
2answers
70 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
74 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
34 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
148 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
70 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
57 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
75 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
105 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} ...
1
vote
1answer
66 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
88 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
93 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
71 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, ...
3
votes
0answers
131 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
62 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
69 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 ...