{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

8
votes
0answers
870 views

break lines in minted code

Thanks to this question minted is able to break long source code lines. It is working really fantastic, except in one case: When already indented code gets breaked into two lines, than line two gets ...
6
votes
0answers
645 views

How to have inline code and line numbering with minted?

I'm using the code found in this answer to allow minted to provide inline code. But, unfortunately, this breaks line numbering, which is not shown anymore. How can I have both inline code and line ...
4
votes
0answers
71 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 ...
4
votes
0answers
325 views

Undefined Control Sequence with minted

For some reason, minted is giving me a "Undefined Control Sequence" error on every line that I used "\usepackage". I searched about it but I couldn't see an answer that fits me. The error: ! ...
4
votes
0answers
151 views

(Clickable) cross-reference in lstlisting

To generate documentation for an 'application programming interface', I would like to have a syntax highlighted area (with the class declaration), which has clickable links to the documentation (which ...
4
votes
0answers
217 views

Latex - picture color and minted color

I'm using minted package. If logo (top-picture) contains green, code color change. \definecolor{codecolor}{RGB}{108,247,10} ...
3
votes
0answers
36 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 ...
3
votes
0answers
305 views

Minted PHP with line numbers

I've added minted and inserted PHP code. The result is that I must put < ?php and ?> tags to get the code colored, then if I want to display line numbers it starts from < ? php line like ...
3
votes
0answers
106 views

Reference source code line in minted environment with cleveref

I'd like to reference lines in the minted environment (solved here for regular \ref) using cleveref. MWE: % !TEX TS-program = arara % arara: pdflatex: { shell: yes } % arara: pdflatex: { shell: yes ...
3
votes
0answers
287 views

Customize comment color in minted style

I'm using the minted package to highlight some Python code, and currently I'm using \usemintedstyle{trac}. I want to change the color of the comment (from the current light brown-ish) to green. My ...
2
votes
0answers
51 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 ...
2
votes
0answers
87 views

Options problem with LaTeX using AucTeX

In my file, I use the package minted that require to use the option -shell-escape . In order to use this option, I need to add the following line in AucTeX : %%% TeX-command-extra-options: ...
2
votes
0answers
42 views

Cyrillic in minted label

Is it posible to use the Cyrillic text for the label option in minted source code listing? I try to compile this piece of latex code with xelatex: ...
2
votes
0answers
123 views

Possible bug in minted package

(just now while typing the topic title I found possible related but my post is too long to discard it now :-) ) (the minipages is only to show side by side. I'll not use it) I'm using minted package ...
1
vote
0answers
28 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
17 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 ...
1
vote
0answers
13 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 ...
1
vote
0answers
28 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
0answers
46 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 ...
1
vote
0answers
80 views

tcolorbox line numbers

I am trying to make a generic environment to use for all my boxes in my document. I want all my boxes to have line numbers. I can only get this to work some of the time. I don't get line numbers when ...
1
vote
0answers
140 views

Error in minted package

I am using minted to display code in my LaTeX report, and after following the instructions given here by hpesoj626, I get the error Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode ...
1
vote
0answers
84 views

Minted Listings don't behave the way they should

I'm quite new to La/TeX and I have a question about the package minted and it's listing feature. I'm using a LaTeX template from someone else who gave it to me. He used the listing feature as well ...
1
vote
0answers
817 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} ...
1
vote
0answers
206 views

Why does Minted color the first method of a c++ class differently?

I am using minted to list c++ source code in LaTeX. When I compile the following sample I get a strange result. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{minted} ...
0
votes
0answers
24 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.} ...
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} ...
0
votes
0answers
56 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", ...
0
votes
0answers
22 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
29 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 ...
0
votes
0answers
25 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 ...
0
votes
0answers
65 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
38 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] ...
0
votes
0answers
125 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 ...
0
votes
0answers
139 views

Different minted styles for different languages

I am trying to add two different snippets of code to a document, one in Java and one in ObjC. I have been able to set up the languages the way I like them, but I would like to set a different style ...
0
votes
0answers
12 views

Avoid converting doublequotes in minted environment

The code \documentclass{article} \begin{document} \begin{minted}[]{scala} "test" \end{minted} \end{document} compiles to ”test” The doublequotes are the wrong ones.
0
votes
0answers
38 views

Minted crop lines from beggining and end of file

I am having a following problem with minted and LaTeX: I would like to include (a bunch) of c header files in my document, but since they are actual implemetantions, they have header guards, such as ...
0
votes
0answers
119 views

Highlighting code lines with minted in diff like GitHub?

What I'm seeking is something like you find in this question but together with the minted package. Preferably without any extra steps. I know that it's possible to create your own pygment styles, but ...
0
votes
0answers
159 views

AucTex minted package not finding pygmentize

I am trying to compile a latex document with the minted package. I can do this quite happily from the terminal (I'm using texlive on os x) with the following code: xelatex --shell-escape demo.tex ...
0
votes
0answers
48 views

minted package call from function

My aim is to call source(highlighted by minted package) in one of the input.tex file instead of master tex. This one does not work : \documentclass{uoyths} \usepackage{minted} \begin{document} ...
0
votes
0answers
168 views

No caption label using minted with caption and hyperref

I'm trying to use the caption and hyperref with the listing environment and the minted package. If you compile the MWE, the listing will only show a number but no name. hyperref inserts a link, ...