{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
1answer
34 views

shell escape is disabled

I am trying to use minted for code highlighting. Now to use this package I need to enable shell escape. So I have set the compiler options as follows: However, I am still getting the same error ...
3
votes
2answers
335 views

Using minted package on Ubuntu: .w18 file not found error

I am trying to run the following code through XeLaTeX, using the -shell-escape option: \documentclass{article} \usepackage{minted} \begin{document} \end{document} The file is named guess.tex and ...
4
votes
1answer
43 views

minted v2.2 (TeX Live 2016): changing style in the preamble does not longer work

I have just upgraded mi MacTeX installation to MacTeX 2016 (from '2015 with all packages updated) and I found that changing the default style using \setminted{style=...} in the document preamble does ...
1
vote
1answer
61 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 ...
1
vote
0answers
29 views

How can I fill a page with a minted included json file?

I'm trying to add some huge json files to my document and have no idea how can I solve this two problems. Code: \linespread{1.0} \subsection{File xpto.json for X = 1} \label{ap:json_xpto1} \beCengin{...
2
votes
1answer
60 views

German quotation marks in the bibliography along with syntax highlighting

Let's begin with the MWE: \documentclass{scrreprt} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[backend=biber,style=alphabetic]{biblatex} \addbibresource{lit.bib} % \...
12
votes
1answer
394 views

TeX Live 2016: minted doesn't work with LuaLaTeX

I've installed TeX Live 2016 as it was released today (thanks to the developers for that). Now I have the following MWE: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{...
0
votes
1answer
18 views

How to fix or change randomly marked json snippet?

So my problem is that my json snippets are marked red, but I don't want to mark them red. How my JSON looks like: [ {obj1} {obj2} {obj3} ] And my snippet looks like: [ {obj1} ... ] And that ......
1
vote
1answer
24 views

Minted bug or misuse?

Consider the following minted code: \begin{minted}[escapeinside=||]{ocaml} foo |this is escaped| bar \end{minted} which works as expected, i.e., the escaped text is actually escaped. However, if ...
4
votes
1answer
106 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
1answer
67 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: \mintinline{java}{...
3
votes
1answer
670 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} \...
30
votes
3answers
5k views

Code spanning over two pages with minted, inside listing with caption

I am trying using minted to display some code in my document, but the code is long and spans over two pages, this works fine, however when I place my code inside \begin{listing} \inputminted{java}{...
1
vote
1answer
560 views

Highlighting a Chunk of Code within a lstlisting by specifying the line number

This question in somehow related to http://stackoverflow.com/questions/1304315/highlighting-a-chunk-of-code-within-a-lstlisting but not exactly the same. I want to make some slides with animation ...
2
votes
1answer
43 views

How to remove extra space added by tex4ht to minted listing at start of each line?

This is really annoying. For some reason, tex4ht adds an extra space to the left of each line in the listing when using minted. This does not happen with listings or verbatim. Only with minted. If you ...
0
votes
1answer
28 views

minted complilation problem when changing machine

I'm writing a document science 7 months in my office desktop and every things worked well, but when I take all files to compile in my home computer, I got this error compilation with the minted ...
1
vote
0answers
25 views

ShareLatex - using minted in subfiles

I am using ShareLatex with each of my sections split into subfiles, and now needs to insert some source code. In doing so i have used the package minted which works fine if i keep my code example in ...
12
votes
3answers
3k views

Breaking long lines using latex with minted and pygments

Since Acrobat obviously isn't able to convert XML to PDF from command line, I'm trying to achieve it using LaTeX. I found the minted package doing a quite good (and simple) job since it uses pygments ...
5
votes
3answers
683 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} \begin{minted}{xml}...
1
vote
1answer
52 views

Display character % with minted

How can I display the % character with minted without it being considered a comment? If I write \minted{%} the rest of the line is considered a comment, and if I write \minted{\%} minted displays both ...
0
votes
2answers
71 views

If I have a double quote ' " ' in my text it shows up in the pdf as \textquotedbl{}

I am new to latex. I am running xubuntu 14.04. I am using Lyx 2.0.8. I can write, compile to pdf then view the pdf. Unfortunately, if I have a double quote ' " ' in my text it shows up in the pdf as \...
4
votes
2answers
728 views

Centering \inputminted inside a figure?

I'm using minted package to import some code and also kind of images using ASCII art. I've wrapped the \inputminted with \figure with a caption and all works fine. The only thing I can't accomplish ...
0
votes
0answers
37 views

Minted error - Undefined Color from Sharetex example

Error: ! Package xcolor Error: Undefined color `LightGray'. See the xcolor package documentation for explanation. Type H <return> for immediate help. ... ...
2
votes
1answer
52 views

Highlight #pragma in code listing using minted

I'm going to give a talk on OpenMP soon and I'm currently preparing my beamer slides. Since a lot of the OpenMP magic happens inside of #pragma instructions, I'd like to highlight those in some bright ...
1
vote
2answers
103 views

Combine minted and tcolorbox for code from file (inputminted?)

Thanks to Thomas F. Sturm and Gonzalo Medina I have a nice looking environment for code listings with appropriate ref functionalities. However, I just cannot figure out a way to make the defined ...
0
votes
0answers
20 views

Undefined control sequence \mintinline [duplicate]

I want to write inline mysql code with minted. However, there is an error Undefined control sequence \mintinline. This is MWE: \documentclass[a4paper,oneside, 12pt]{memoir} % подешавање српског ...
5
votes
1answer
326 views

Censor minted source code in pdf

I'm using minted in my publication to embed my source code examples with proper highlighting. Unfortunately, they are under non-disclosure agreement (NDA), so I have to blank them out before ...
13
votes
3answers
3k views

Background colour with minted package: code misplaced

With the following example \listfiles \documentclass{article} \usepackage{minted} \definecolor{bg}{rgb}{0.95,0.95,0.95} \begin{document} Some text \begin{minted}{latex} A test \end{minted} Some text ...
2
votes
0answers
57 views

LatexMK incorrectly tries to build files used by minted

I am using LatexMK from a Makefile with the -use-make option. A really great tool to automatically compile my document while making sure all images are up-to-date. When trying to compile a document ...
0
votes
0answers
60 views

minted not highlighting and inserting random characters in code

I am trying to syntax highlight some Haskell code in my latex document. The rest of my document works fine except for one section. I have the \usepackage{minted} command where my other packages are ...
2
votes
1answer
85 views

Is it possible to break page on a double line break in the minted environment?

For a project, I am printing a large amount of source code using Minted. Certain blocks, such as CSS blocks, are fairly short, but are split across pages, which means they are not as readable. Is it ...
1
vote
1answer
58 views

Length of external plain text file

(Xelatex) How can one determine the maximal line length (e.g. in characters) of a external, plain text file? This file likely contains special Latex characters. Usecase is syntax highlighted code by ...
5
votes
2answers
988 views

Minted does not escape beamer's \end{frame}

It seems that the following code does not work as expected (ie. printing the \end{frame} as a verbatim colored code. Instead, the \end{frame} is interpreted by LaTeX: \documentclass[10pt,a4paper]{...
0
votes
0answers
16 views

Is it possible to visualize a page break in a mdframed environment?

I'm using mdframed to style my code listings. I use minted to realize the code listings. My question is, if there is an easy way to visualize the page break of mdframed. I tried to sketch what I try ...
4
votes
1answer
57 views

How to highlight (color/draw attention to) a particular snippet in Minted

I'm currently doing some work on error messages in programming languages. As such, I'm showing faulty pieces of code, alongside the compiler-errors accompanying them. I'm using minted for the code ...
2
votes
4answers
800 views

Minted working from terminal but not Texpad

I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type pdflatex -shell-escape My_Ruby_Notes.tex it compiles fine and the resultant pdf looks perfect. ...
1
vote
1answer
2k views

Cannot get 'pygmentize' to work correctly on mac

I am using TeXworks on Mac osX 10.7.5 and I'm trying to compile some python code within my tex file but with limited success. My tex file looks like: \documentclass[12pt,A4]{article} \usepackage{...
3
votes
0answers
67 views

How can I highlight certain words in minted with different colors?

I would like to highlight some specific words inside the minted environment when using beamer. \documentclass[14pt]{beamer} \usepackage{minted} \begin{document} \begin{frame}[fragile]{} \begin{...
2
votes
1answer
111 views

Centralize minted environment in beamer

I would like to insert some code inside the minted environment when using beamer. \documentclass[14pt]{beamer} \usepackage{minted} \begin{document} \begin{frame}[fragile]{} \begin{figure} \...
1
vote
1answer
19 views

POVRay code not highlighted minted

Bonjour ! I want to highlight PovRay code with minted but I don't get any result ! PovRay is in the list of pygments language supported, and I run my file with -enable -write18 in windows vista 64 bit ...
4
votes
0answers
78 views

How to let minted break across pages but keep the caption together with the end of listing?

I want to create a listing using minted that has background colour and can be split across pages. The usual advice in that case is to use the mdframed environment and I have written a command that ...
3
votes
0answers
79 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 ...
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} \begin{...
0
votes
2answers
101 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 ...
13
votes
2answers
5k views

Inline code and short verb with minted

I it possible to use minted for inline code and to add a short verb sing for minted? Like \lstMakeShortInline| in listings.sty? \documentclass{article} \usepackage{minted} \newminted{tex}{} \...
7
votes
1answer
132 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 ...
5
votes
1answer
61 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
27 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 ...
1
vote
3answers
203 views

Configure Minted Color XML

I'm using minted package for code listing, however I don't like some of the colors too much. Is it possible to configure these colors? For example, When I display the colors to view XML color, the ...
3
votes
1answer
52 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} \usepackage{...