{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
1answer
229 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} ...
4
votes
1answer
530 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 ...
18
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
316 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
126 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
57 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 ...
11
votes
2answers
2k 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
422 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
35 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
435 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
174 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
247 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
293 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 ...
11
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
299 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 ...
36
votes
2answers
3k 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
323 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
168 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
231 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
210 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
694 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 ...
6
votes
3answers
5k 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
339 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
464 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 ...
6
votes
2answers
254 views

Define minted environment as a verbatim environment in texmaker [closed]

I use the minted environment in order to insert source code in a document. Contrary to lstlistings or verbatim environment, Texmaker does interpret the contains of minted environment. For example if ...
4
votes
1answer
144 views

Is it possible to use latex in the minted environment outside of comments?

I am wondering if it's possible to add a bit code in latex, perhaps by using some kind of escape character, to mark parts of the minted environment that should be executed as regular latex code?
3
votes
1answer
123 views

Introducing section headings in minted

I apologize if this has been answered elsewhere. I haven't been able to find it. I am using the minted package and I would like to have sections similar to \section{Section Headings} So I have ...
14
votes
2answers
209 views

Repeating environment contents twice

I'm writing a document where I have many code blocks like so: \begin{align} d = \sqrt{ (x'-x)^2 } \end{align} \begin{minted}{latex} d = \sqrt{ (x'-x)^2 } \end{minted} So the first line renders ...
1
vote
0answers
114 views

Custom pygment lexer doesn't work in TeXShop or TeXworks [closed]

I wrote a lexer for pygments and it works well from the console. However when I use TeXShop or TeXworks I get the following error: (/usr/local/texlive/2012/texmf-dist/tex/latex/ae/omsaer.fd)Error: ...
9
votes
1answer
670 views

Reference Code snippet in latex using minted

I'm not really sure how to reference a code snippet in my text. I need also a caption for the code. The only working way I found is wrapping the minted in a figure. The problem is that I want to ...
6
votes
2answers
621 views

Minted+Inconsolata: Straight Quotes

I am using minted to display my source code and the Inconsolata package to set the output font. Unfortunately, this produces the following ugly result (note the direction of the quote marks: ...
5
votes
1answer
203 views

linenumbers of minted are not shown in beamer if i use infolines

linenumbers of minted are not shown in beamer if i use infolines as an outertheme example: \documentclass{beamer} \usepackage{minted} \usetheme{Warsaw} \useoutertheme{infolines} ...
4
votes
1answer
756 views

Minted with frame and bgcolor

I have a problem with minted. I have created a new minted environment like so: \definecolor{dhscodebg}{rgb}{0.95,0.95,0.95} \newminted[dhscode]{hs}{tabsize=4, fontsize=\footnotesize, frame=lines, ...
7
votes
1answer
418 views

Insert Text between “List of XXX” Heading and Actual Listing

I would like to insert a small paragraph of text between the "List of Figures" heading and the actual list of figures, and also between "List of Listings" and the actual list of listings. I am using ...
5
votes
1answer
862 views

Error caused by interaction between minted, footnotes, babel and "(double quote)

I'd like to put some inline code using minted but when I try to typesent the empty string "" I get an "undefined control sequence" error. Sample code: \documentclass[a4paper,10pt]{article} ...
7
votes
1answer
191 views

Double #s when defining a new command that uses \mint instead of using \mint directly

Why does \dollarcom give a different result than \mint{bash}|$#|? \documentclass{article} \usepackage{minted} \newcommand{\dollarcom}{\mint{bash}/$#/} \begin{document} \dollarcom \mint{bash}|$#| ...
2
votes
1answer
1k views

TeXworks expl3.sty error

I am trying to check if minted is already installed in my computer. I successfully installed Python, distributed.py and pip as instructed in this tutorial. I am now trying to test the new package with ...
8
votes
1answer
405 views

How can I make source code included with minted copyable?

Is it possible to make source code with minted copyable? Here is a minimal example how I include source code (completely, with minimal java code, on GitHub): \documentclass{beamer} ...
11
votes
1answer
7k views

How to enable shell-escape in TeXworks?

I require use of the minted package of similar one which support Prolog syntax-highlighting. Given that I use the TeXworks "IDE", how do I enable shell-escape? Though I attempted—see above—I still ...
1
vote
1answer
234 views

How can I highlight Java bytecode?

I usually use minted to display highlighted source code. But it seems as if minted would not support Java bytecode (see list of supported languages). How can I insert highlighted java bytecode? (Is ...
7
votes
1answer
865 views

Using Vim Latex-live-preview with minted package

I was wondering if anyone had succeeded to make vim-live-preview with the package minted. When I tried to edit the pdflatex command winthin the script.vim by adding the -escape-shell switch, but ...
2
votes
2answers
569 views

minted: How to pass LaTeX commands via \newminted and how to use different styles?

I would like to use minted to redefine the Sweave environments Sinput and Soutput (see the example below). This way, I can have minted format my R code. There are two problems left: 1) Is it possible ...
4
votes
2answers
424 views

Minted gets error when encounters a dollar

I'm using minted to try to list & color some pieces of plpgsql (PostgreSQL's plsql), namely some functions and triggers. The problem appears when I write the dollars as $$ or $BODY$ which ...
4
votes
1answer
442 views

utf8 math characters from source code file with minted in XeLaTeX

I want XeLaTeX/minted to display all my mathematical characters from my .java source file. More detailed: I file my programming homework in PDF documents in my university. I have been using LaTeX and ...
10
votes
1answer
300 views

Remove blank lines in minted

Is it possible to remove blank (empty) lines in minted, and gobble multiple blank lines to a specified amount, like the emptylines option in listings? \documentclass{article} \usepackage[T1]{fontenc} ...
7
votes
3answers
262 views

Expanding a minted command inside a macro

I am currently trying to speed up the compile time of a document that uses minted. I would like to be able to have certain language features (and style) appear the same in both a minted environment ...
8
votes
3answers
6k views

How to put C++ source code into beamer slides [duplicate]

Possible Duplicate: How display LaTeX code in LaTeX document? How do I fit java style source code in one frame in beamer? How do I add C++ formatted and coloured source code to my beamer ...
4
votes
1answer
2k views

minted package: Undefined control sequence

I just installed the minted package to type prettier code in my university reports, I'm trying it out but I keep getting the same messages when compiling: This is the source: \documentclass{report} ...
2
votes
0answers
138 views

PL/pgSQL and minted [closed]

When using Minted to highlight a PL/pgSQL script, I get following error: TypeError: 'NoneType' object has no attribute '__getitem__' (File '%pythonpath%/scripts/pygments/formatters/latex.py', line ...
1
vote
1answer
912 views

Minted working from terminal but not Texpad [duplicate]

Possible Duplicate: minted not working on mac I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type pdflatex -shell-escape MintedProblem.tex ...