{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
1answer
24 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
15 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
13 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 ...
1
vote
1answer
49 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
68 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 ...
0
votes
0answers
27 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
47 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
83 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
19 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
323 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 ...
2
votes
0answers
51 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
41 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 ...
1
vote
1answer
53 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 ...
0
votes
0answers
15 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
44 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 ...
3
votes
0answers
54 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]{} ...
2
votes
1answer
83 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
17 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 ...
2
votes
1answer
80 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 ...
4
votes
0answers
67 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
77 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
54 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
26 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
118 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
47 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
65 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
74 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
44 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
148 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
71 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
60 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
200 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
250 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
95 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
89 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
49 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
52 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
53 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
30 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
40 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
66 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
91 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
64 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
211 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
81 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
47 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
53 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
537 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
99 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
98 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 ...