{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

10
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
401 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
412 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
167 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
232 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
278 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 ...
10
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
291 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 ...
35
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
308 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
163 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
222 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
198 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
682 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
329 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
458 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
244 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
138 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
121 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
206 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
109 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
638 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
604 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
194 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
733 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
416 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
819 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
190 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
389 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
230 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
836 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
555 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
407 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
427 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
288 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
258 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
136 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
861 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 ...
2
votes
3answers
418 views

Minted working from terminal but not Texpad

I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type pdflatex -shell-escape My_Ruby_Notes.tex it compiles fine and the resultant pdf looks perfect. ...
4
votes
2answers
346 views

Conflict between packages auto-pst-pdf and minted?

I have tried to create a document using the pdfLaTeX engine which includes graphics generated by PSTricks and resorts to the package auto-pst-pdf. Everything went right until I used the package ...
4
votes
1answer
954 views

How can I use \belowcaptionskip with listing?

\documentclass{mwrep} \usepackage{minted} \usepackage{lipsum} % question regarding this code \setlength{\belowcaptionskip}{-10pt} % end \begin{document} \lipsum[1] \begin{listing}[h] ...
4
votes
2answers
888 views

minted doesn't escape LaTeX code inside python docstring

How can I get minted to escape LaTeX code inside docstrings? Should I use some switch? \documentclass[a4paper,12pt]{article} \usepackage[italian]{babel} \usepackage[T1]{fontenc} ...
9
votes
1answer
453 views

Clean black & white style for minted

I'm using minted to format code in a book. Except for the bw theme, I only see colored styles, which is nice for producing a PDF, but not ideal for printing in black & white. Is there a clean ...
7
votes
1answer
1k views

How to get caption above listing with minted?

I'm using the minted package. How can I get the caption to show before the code in the document? \documentclass[a4paper]{scrartcl} \usepackage{minted} \begin{document} \begin{listing}[H] ...