{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
0answers
29 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
68 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
66 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
14 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
107 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
51 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
20 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
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
1answer
49 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
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.} ...
3
votes
1answer
23 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
18 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
49 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
34 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
78 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
137 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
26 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
38 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
61 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
46 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
52 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
45 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
57 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
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 ...
1
vote
0answers
47 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
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
30 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 ...
3
votes
1answer
45 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
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 ...
2
votes
1answer
84 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
66 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
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 ...
0
votes
0answers
68 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
39 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
418 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: ...
4
votes
0answers
329 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: ! ...
3
votes
2answers
226 views

Why are some Unicode characters missing when using XeTeX and Ubuntu Mono?

I'm trying to typeset a document using minted code listings that contain quite some amount of non-standard Unicode characters. I'd like to use Ubuntu Mono as a monospaced font. The following supresses ...
3
votes
2answers
58 views

Haskell minted environement - problems with brackets

After doing some research on the interweb - I finally made the switch to minted. As I need to document Haskell with Latex, I created the following listing according to examples found on this page. ...
5
votes
0answers
51 views

Source code explanation in LaTeX [duplicate]

I was just wondering if it is possible to create source code explanations like the image below using LaTeX (listings or minted it doesn't matter). I'm Sorry I'm kind of new to LaTeX. Thanks in ...
3
votes
1answer
63 views

Disabling one keyword in minted

I'm formatting SQL code in my document using minted: \usepackage{minted} \newmintedfile[sql]{sql}{breaklines=true,samepage,fontsize=\footnotesize} % ... \sql{query.sql} In some of these files I'm ...
1
vote
1answer
35 views

How to write a onecolumn page while using the IEEEtran class?

I am writing a document in which I have to add a code in the appendix section. I am using the IEEEtran class but it does not help me while adding the code using the minted package. Is there a way I ...
0
votes
0answers
128 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
2answers
122 views

How to space before and after a `minted` code block with bgcolor?

I'm using minted to format code samples in my document, and I have set a bgcolor option to make them stand out. By default (as in Harish's answer below) the code block will naturally have some ...
2
votes
1answer
54 views

What are the advantages of the different ways you can use tcolorbox together with minted? Is one to be preferred over the other?

I'm listing code with the minted package and drawing the box around it using the tcolorbox package. However, there are two ways to do it, and I don't know which one is best. To list code that resides ...
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
1answer
117 views

Typeset colored terminal output using minted

I need to reproduce the output of a command in a LaTeX document. The command uses ANSI escape codes to produce colored output. I'd like to use minted, but using \inputminted{shell}{coloredoutput} ...
4
votes
1answer
127 views

LaTeX to HTML using htlatex - Background problem

I've been trying to highlight Python code and convert it to HTML. For highlighting I used the minted package since it provided a few styles that I was looking for and I used htlatex for HTML ...
1
vote
1answer
193 views

Two column minted listing inside tcolorbox

I have a quite long but narrow code I want to typeset inside a tcolorbox. Is it possible to enable a two (or more) column mode inside the box (not break the box and set the parts adjacent). The ...