{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
16 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
30 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
35 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} ...
2
votes
1answer
19 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
20 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 ...
0
votes
0answers
17 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 ...
3
votes
0answers
48 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 ...
0
votes
0answers
18 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
34 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
26 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
69 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
29 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} ...
5
votes
1answer
79 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
33 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
27 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
83 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
134 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
18 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
2answers
113 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
55 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
25 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
34 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
67 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
34 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.} ...
3
votes
1answer
24 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
19 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
57 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
39 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
86 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
2answers
147 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
31 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
40 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} ...
2
votes
1answer
91 views

How to use the latest minted package in overleaf?

I am working on a document in overleaf. I am using the minted package to place code in my document. I need to use the breaklines option of the minted package which only the latest version of the ...
0
votes
0answers
16 views

'<' and '>' - minted unable to print it

I am trying to print \documentclass[11pt]{article} \usepackage{acl2015} \usepackage{times} \usepackage{url} \usepackage{latexsym} \usepackage{minted} \usepackage{framed} \usepackage{graphicx} ...
4
votes
1answer
54 views

How to place a code snippet using minted inside a tcolorbox?

This is a piece of my LaTeX code: \documentclass[a4paper,oneside] \usepackage{minted} \usepackage{tcolorbox} \tcbuselibrary{breakable,skins} \usepackage{etoolbox} \usepackage{fancyvrb} ...
2
votes
0answers
63 views

Python console code with minted

I am using minted to highlight source code in my document. I have defined \definecolor{codeyellow}{RGB}{255,251,204} \newminted{python}{linenos,breaklines,frame=lines,bgcolor=codeyellow} in the ...
1
vote
1answer
50 views

Give code fragments a numbering (like equation-numbers, not line-numbers)

Can I give my code fragments in minted a numbering, like with equation numbers, so they'd have a (1) etc. at the right side of them so they can be referred to? (E.g. to write something like "Combine ...
0
votes
0answers
69 views

Getting the latex minted package to work in Anki

This is my Edit_LaTeX_build_process.py file (note the -shell-escape option) newLaTeX = \ [ ["latex", "-shell-escape", "-interaction=nonstopmode", "tmp.tex"], ["dvipng", "-D", "200", "-T", ...
3
votes
0answers
38 views

minted or listings input a file between markers

Is it possible, using the minted or listings package to format a file between or till a certain textual marker automatically. E.g. consider a source file: code code //marker code ... //end marker ...
1
vote
0answers
52 views

Getting minted and LyX work together

I need to insert code in my report, so I decided to use minted with LyX, my usual editor. I found a solution for getting minted and LyX together in this post (pwaller answer), by adding a custom ...
0
votes
1answer
30 views

Build errors while using minted package

When i execute latex source, i get following error. ! Undefined control sequence. l.42 \newmintinline [command]{LaTeX}{} The control sequence at the end of the top line of your error message was ...
0
votes
0answers
39 views

Correct highlighting of code listings using minted

I've done some coding using Qt and I need to list the code in a document. One of the advantages of Qt is the multiple template classes such as QList or QMap for example. I'm trying to get the correct ...
4
votes
1answer
54 views

Relax a command inside minted

I'm using rich unicode in LaTeX as specified here. However I also use unicode in Julia language, so when I input Julia code in XeLaTeX I get an error because √ is bound to \sqrt in LaTeX, but is a ...
0
votes
0answers
30 views

Minted and Tabularx

I've seen lots of questions on using minted with tabular. I'm getting this problem when using minted with tabularx. Code: \begin{tabularx}{|l|X}|} A & B\\ testing & \begin{minted}{c} int ...
2
votes
1answer
124 views

LaTeX minted Error

I receive the following errors: ! Package minted Error: You must invoke LaTeX with the -shell-escape flag. ! Package minted Error: You must have `pygmentize' installed to use this packag in ...
4
votes
1answer
70 views

Minted caching in tikz externalize job

Enabled caching options for minted and tikz lead to unexpected and inefficient caching. For every tikz figure that is externalized, all minted code blocks of the main document are cached within the ...
4
votes
0answers
92 views

\inputminted: distinct file parts in one listing (equivalent to linerange in listings)

I want to include code from a file into my document. However, several distinct line ranges should appear in the same listing. Also, I want to use gobbling, and it would be nice to include some blank ...
0
votes
0answers
74 views

Same caption space

I want to have the same vertical spacing between figures/listings and their captions. Currently, the space between figure and caption is shorter than that between listing and caption. What should I ...
0
votes
0answers
46 views

Add a chapter for \listoflistings

I've struggled for some time to get the \listoflistings to work. I'm using minted to insert code-examples like this: \begin{listing}[H] ...
1
vote
1answer
514 views

Minted not working

I'm trying to use the minted package on Windows 8. I installed python and Pygment, added C:\Python34 and C:\Python34\Scripts on my path. When I try to compile the following latex code: ...