{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

2
votes
0answers
30 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
46 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
86 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
279 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
41 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
93 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
177 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
55 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
311 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
100 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
74 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
127 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
161 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
130 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
144 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
109 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
121 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
202 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
100 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
110 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
95 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} ...
3
votes
2answers
100 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
121 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
49 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
173 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
112 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
59 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
78 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
229 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
443 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
50 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 ...
1
vote
0answers
124 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
227 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
28 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
207 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: ...
5
votes
1answer
69 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: ...
0
votes
1answer
60 views

Powerdot breaks with both minted and verbments [duplicate]

I am sure I am not the only one trying to put some computer code onto my slides. When it comes to LaTeX presentation class my choice as a long time PostScript/PSTricks user is of course Powerdot. ...
1
vote
0answers
66 views

Add a color for a specific class

I have the following C# Code public class MeasurementData { #region Public Properties public int ADC { get; set; } public double Latitude { get; set; } public double Longitude { get; ...
1
vote
1answer
239 views

Caption and label on Minted code

I want to add a caption and label on a Minted source code so I can reference it, similarly to what you can do to figures. In Minted manual it says I can use the listing environment, which allows to ...
0
votes
0answers
54 views

Can I use tufte-book documentclass with the minted package?

This minimal code example: \documentclass{tufte-book} \usepackage{minted} \begin{document} \begin{figure} \begin{minted}{html} <html></html> \end{minted} \caption{This is a test.} ...
4
votes
1answer
266 views

Alignment of minted line numbers

I'm using the minted package for code highlighting. The below is just a minimal example. What I find annoying about this package is that line numbers appear in the margin. This causes several ...
2
votes
1answer
77 views

Using `inputminted` in lyx has no effect on document

I'm trying to import a complete code file into a lyx document using the minted package. But the resulting document has no code at all. Here is a minimal example. And there's nothing in the resulting ...
1
vote
2answers
152 views

TexStudio Special Comments for math mode over highlighting in minted environment

Latex sudo noob here. I had a question regarding the answer to the question TeXstudio recognize $ in R code as that of the math mode How does one create the special comment listed in the answer? It ...
1
vote
1answer
89 views

Using minted for syntax highlighting with RTL language reverses code

I'm writing a LyX document in Hebrew and I want to inset some inline code snippet but the code is reversed when rendered. The minimal lyx example is here. And it look like this: LyX source: ...
5
votes
1answer
247 views

Syntax highlighting code fragments

I am trying to split a long code listing into two columns, on a Beamer slide, using Minted. However, because the second column isn't syntactically valid (i.e., without the lead in from the first), ...
5
votes
3answers
602 views

Break lines at any character in minted

Consider any snippet of minted code that contains a large string not containing any spaces like: \documentclass{article} \usepackage{minted} \setminted{breaklines} \begin{document} ...
1
vote
1answer
50 views

argument in newenvironment

I am trying to write a newenvironment that would be a wrapper for code layout, using minted. So far, I tried that: \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} ...
5
votes
1answer
69 views

handling of `--` in minted

I'm using minted for pretty printing console output and have just noticed that double hyphens, i.e. --, for program options are getting turned in en-hyphens, i.e. –. A MWE is: \documentclass{memoir} ...