{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
495 views

How can I change the font size of the number in minted environment?

How can I change the font size of the number in minted environment? The font can be modified with fontsize parameter, but the number on the left side is not affected with it. This is the code: ...
3
votes
1answer
124 views

Issue with firstnumber Option from minted Package

I don't understand why the code in the next MWE does not lead to the Cpp-language lines being numbered starting from 1 in the resulting pdf document (I'm on pdfTeX). \documentclass{memoir} ...
3
votes
0answers
73 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 ...
2
votes
1answer
129 views

tabulation minted xelatex

When I use tabulation inside the minted environment in pdflatex, they show as normal (several spaces). But when I use xelatex, they appear as ^^I. Example (before each letter a b c, there is ...
3
votes
0answers
127 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 ...
1
vote
1answer
116 views

Using `minted` environment inside a `tabu` table

I am trying to use a piece of highlighted code using the minted package inside a tabu table: \documentclass{article} \usepackage{minted} \usepackage{longtable} \usepackage{tabu} \begin{document} ...
1
vote
1answer
124 views

Turn off syntax highlighting in minted?

How do I turn off syntax highlighting in minted? Defining my DSL with a CFG and then a PEG; and the syntax highlighting is getting in the way.
5
votes
1answer
72 views

Confusing Problems with LaTeX3/expl3 \pdftex_if_engine:TF Switch

For a number of days I've been confused with some problems I had when using the \pdftex_if_engine:TF switch in a LaTeX3/expl3 class of my own. I thought it would be equivalent to the \ifpdf switch, ...
1
vote
1answer
130 views

Syntax highlighting for SPARQL query in a listing? (works fine in minted environment but not in listing with mint)

I can do syntax highlighting in the minted environment, for any SPARQL query using this Pygments lexer thanks to this answer. My problem is how to get SPARQL syntax highlighting to work with mint in ...
8
votes
1answer
126 views

Formatting code fragments extracted from file with minted

I would like to use the catchfilebetweentags package to grab code snippets from a source file and use minted to highlight them. Imagine I have the following in program.scala: //<a def ...
4
votes
0answers
392 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 ...
2
votes
0answers
135 views

Minted Package escaping code for SQL [closed]

I'm using minted package in LaTeX to display SQL statements however, I have a variable which it confuses with the keyword "ORDER" in SQL. How can escape this? Is it possible?
3
votes
0answers
139 views

minted creating garbage output on PDF file [closed]

Good Day, I'm using texlive 2013 which I updated today 20JULY13. When I attempt to compile my LaTeX file using only the most basic minted statements \begin{minted}{c} Test \end{minted} results in ...
13
votes
2answers
578 views

Combine minted and tcolorbox

I have the idea to combine minted with tcolorbox. At first, I have created my own minted environments: \newminted[mycsharp]{csharp}{tabsize=2,fontsize=\footnotesize} ...
4
votes
0answers
151 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} ...
1
vote
1answer
110 views

minted Environment Inside varwidth Environment

Is there a way to incorporate a minted environment inside a varwidth environment? I have colored backgrounds for code snippets, and I did manage to put a minted environment inside a minipage, based on ...
3
votes
1answer
80 views

l3doc in combination with minted

The following question is related: How to add listings environment to DTX files I want to use the document class l3doc in combination with minted. However I am not able to get a nice result. If I ...
1
vote
1answer
242 views

minted Environment Inside minipage Environment

I am having to use the minted environment inside a minipage environment quite often in my document. I wanted to write a new environment for doing this, but since minted isn't designed to be included ...
3
votes
1answer
222 views

Package minted: \mint Command Not Working Inside tabularx Environment

The question, How to embed a minted environment inside a tabular environment?, addresses a similar issue, but I am using: the tabularx package, and the inline \mint command Is there a workaround ...
4
votes
1answer
221 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 ...
4
votes
1answer
409 views

listings caption gray box meaning of code

Some time ago I copied this code from Stackexchange to have a nice gray box at the top of my imported source code which I displayed with listings: \DeclareCaptionFont{white}{\color{white}} ...
1
vote
2answers
291 views

Using \inputminted from lyx with relative path

I'm using the minted package with lyx. I want to use \inputminted and must be able to specify a relative path (to share between machines with different home directory names). The problem is that the ...
1
vote
1answer
84 views

Vertical centering of text inside tabular does not work as expected

I have a simple table with three columns. The second and third columns contain minted environments, and the first column contains text that should be vertically centered for each row. I'm using the ...
2
votes
0answers
87 views

Editing math.py for pygment [closed]

I'm using the minted package to syntax my code. When I'm doing so in I'm using the Matlab language. When to continue on the next line, we do so in Matlab by entering ... before the next row. However, ...
2
votes
1answer
80 views

Non-raised tildes in a minted environment

Consider the following minimal example that combines Beamer + Minted: \documentclass[11pt,utf8]{beamer} \usepackage{minted} \begin{document} \begin{frame}[fragile] \frametitle{Foobar} ...
5
votes
0answers
502 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 ...
1
vote
1answer
182 views

How to embed a minted environment inside a tabular environment?

I'm using packages minted and booktabs, and would like to put a minted environment within a tabular one. However, the following does not work: \documentclass[11pt]{article} \usepackage{minted} ...
3
votes
1answer
307 views

Error when using minted package and -output-directory option

I am having problem when I use the -output-directory option while I am using minted. It does not move the .out.pyg and .pyg file to the output directory and it gives me an error. I there any ...
13
votes
2answers
2k views

Box around minted environment

I'm using the minted package to produce nice looking java-code but I would like to make a box around the code so it is easier to separate the code from the rest of the document. What is the easiest ...
11
votes
2answers
261 views

How can I define a new minted environment with optional arguments?

I have the following mwe: % arara: pdflatex: { shell: true } % arara: pdflatex: { shell: true } \documentclass{article} \usepackage{minted} \usepackage{listings} \usepackage{caption} ...
1
vote
2answers
108 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 ...
1
vote
0answers
54 views

How to add a caption to a listing with minted? [duplicate]

Package minted provides a way to add captions and labels to a listing wrapping it around with listing environment. With this environment the code block is put inside a floating box which won't break ...
10
votes
2answers
1k views

How to use minted under MikTeX and Windows 7?

According to minted documentation: Windows support is sketchy / untested at the moment. There are two complications: installation and usage....... This question seeks a step by step ...
5
votes
2answers
343 views

Error using Minted for syntax highlighting in custom document class

I am writing Master thesis in LaTeX and want to use minted package for source code syntax highlighting. I have installed it successfully and minimal example from minted documentation works just fine. ...
2
votes
0answers
33 views

Minted in listing: break code across pages? [duplicate]

I'm using minted to highlight code. And I put that into a listing environment in order to get those numbered. By it self minted breaks code across pages. But when I put it into a listing, I get code ...
1
vote
1answer
299 views

Minted: customise listing name? [duplicate]

How do I customize listing name: Listing 1: thing -- when I use minted? Here's an MWE: \documentclass{article} \usepackage{minted} % \renewcommand{\lstlistingname}{Something} % doens't work! ...
1
vote
1answer
153 views

emacs whizzytex latex options, minted, -shell-escape

I want to use whizzytex with emacs because of its superior speed compared to other wysiwyg options available. The only thing preventing me from doing so is that my latex documents use the minted ...
2
votes
1answer
193 views

Problem with polyglossia with “babelshorthands” enabled and minted: .out.pyg file is not generated anymore

Since some years I'm working with polyglossia and the minted package in combination with XeLaTeX and English texts without any problems. Now I had to write a document in German with some code, so I ...
1
vote
1answer
238 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 ...
8
votes
1answer
1k views

Set global options for \inputminted

I am using the minted package to highlight source code. How can I set the options parameter globally for \inputminted? I want to do this because I have a lot of php code files that I will include in ...
1
vote
0answers
242 views

TeXLipse, Pygments and the minted package not working [closed]

I've got a little problem to get minted working on Mac OS X 10.8.3. Things I've installed: minted 1.7 (was already installed via TeX Live Utility) Python 2.7 Pygments 1.6 (is in $PATH environment ...
32
votes
2answers
2k views

minted vs. texments vs. verbments

Regarding the typesetting of syntax-colored source code, I know that listings is inferior because it doesn't utilize a full lexer. Instead the Python-based solution is recommended. It seems there are ...
1
vote
1answer
257 views

Set my own minted default options inside a class

Is there a way that I can set minted options inside a class? I want to set my own defaults format for minted inside a custom class that I have.
3
votes
1answer
147 views

Error when compiling a 'minted' listings inside a 'memoir' subfloat

I'm trying to compile the following minimal example: \documentclass{memoir} % Enable subfloats within figures \newsubfloat{figure} \usepackage{minted} \begin{document} \begin{figure} \subbottom{% ...
3
votes
1answer
192 views

Minted shows formatted tex code instead of intended source

I use WinShell with PDFLatex on Windows 7. I managed to install Pygmentize and compile the minimum example without errors: \documentclass{article} \usepackage{minted} \begin{document} inline: ...
1
vote
1answer
167 views

Minted cross reference line

I used to use listings a lot but minted+pygmentize has outstanding output. However, there are a few features from listings that are hard to find in minted, like having the line numbers on the right. ...
2
votes
1answer
591 views

minted list of listings and TOC conflict

I am using minted for source code highlighting. I want a List of Listings, and I want the List of Listings to itself have an entry in the main Table of Contents. I thought I could do this with ...
5
votes
3answers
3k views

How to invoke latex with the -shell-escape flag in TeXMakerX?

This is a follow-up question on the post: Creating a table around a java script code highlighted using minted where invoking -shell-escape flag in TeXStudio is one of the two questions posted by the ...
2
votes
1answer
296 views

Equivalent to TeXLive's --restricted-shell-escape for MiKTeX?

I often work on Windows, so need to use MiKTeX. I recently found the minted package, which needs to call the external command pygmentize. I currently call xelatex with the -shell-escape option to ...
4
votes
1answer
410 views

Creating a table around a java script code highlighted using minted

I would like to create a block around javascript code in latex. I use minted package for format highlighting. Here is my example code: \documentclass[]{article} \usepackage{minted} %opening ...