{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
298 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 ...
6
votes
2answers
214 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
123 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
114 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
191 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
94 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
501 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
543 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
172 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
629 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
292 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
650 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
175 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
993 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
357 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} ...
10
votes
1answer
6k 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
204 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
701 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
486 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
355 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
344 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
237 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
240 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
5k 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
1k 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
123 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
724 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
360 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
314 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
794 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
780 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} ...
7
votes
1answer
411 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 ...
6
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] ...
4
votes
1answer
843 views

Highlight certain texts in listings or minted [duplicate]

Possible Duplicate: Manual highlight of TeX code in a verbatim environment I want to highlight certain parts of a program output listing which represent user input. For example I want to ...
15
votes
1answer
469 views

Can I print only some functions with minted?

I often have to print Source Code, but quite often only some parts of a project. Now I got a task to improve two functions and I have to print out what I change. I use minted for printing source code. ...
2
votes
1answer
323 views

Prevent caption to appear on separate page

I'm using a custom listing environment which does not float taken from Code spanning over two pages with minted, inside listing with caption. The caption is done with the caption package. The ...
2
votes
2answers
258 views

Adding additional blank lines in Minted

I currently have two minted environments in each their minipage environment, so that they can be situated next to each other: \begin{figure}[!h] \centering \begin{minipage}{0.45\linewidth} ...
2
votes
1answer
114 views

How can I prevent the \listof command from the float package scrambling my headers?

I'm using the minted package, which uses the float package. When I add the 'List of Listings' in my thesis, the \listoflistings command calls the \listofcommand from the float package. My problem is ...
4
votes
1answer
360 views

Emphasize line in minted code

Is there a way to stress/emphasize a line (or part of it for that matter) in minted code? The listings package has the moredelim-option for that purpose.
1
vote
1answer
426 views

Minted: am I using illegal characters?

I have the following simple LaTeX document... \documentclass[letterpaper, 10pt]{article} \usepackage[margin=1in]{geometry} \usepackage{minted} \usepackage{hyperref} \hypersetup { colorlinks=false, ...
4
votes
1answer
909 views

Code over two Pages and continue counting Lines

I'm using Minted to show my Javascript Code. It seems not possible to spread a code with Minted over two pages. So i do it like shown in Algorithm over two pages, with itemized lists. But the Code ...
5
votes
3answers
741 views

How can I produce black and white source code using the minted package?

I just started using the minted package, to produce formatted source codes. I thought the style bw is a black and white style of pygmentize and it just uses italic and bold to format the code (I ...
2
votes
1answer
170 views

Use of \\minted@pygmentize doesn't match its definition

Having followed the installation instructions for the minted package (CTAN), I keep encountering the error, and variations thereof, listed in the title when trying to compile the document. The ...
5
votes
2answers
3k views

minted not working on mac

I am using texmaker on a Mac and I tired to use the minted package with this code \documentclass[12pt,A4]{article} \usepackage{minted} \begin{document} \begin{minted}{python} def __init__(self, ...
15
votes
1answer
836 views

In the minted package, how do I enforce straight single quotes?

Basically I want \mint{python}|'banana'| to produce straight single quotes, rather than the curly ones it normally produces (in pdflatex).
10
votes
2answers
1k views

Inline code and short verb with minted

I it possible to use minted for inline code and to add a short verb sing for minted? Like \lstMakeShortInline| in listings.sty? \documentclass{article} \usepackage{minted} \newminted{tex}{} ...
9
votes
1answer
2k views

How to customize the default xelatex command in TexShop for OSX

I am trying to make use of the minted package for source code highlighting, and am running into an error telling me I need to install pygmentize combined with an message regarding the --shell-escape ...
2
votes
1answer
604 views

Beamer columns won't align minted code and TikZ diagram

I'm trying to create a two column Beamer slide, with the first column displaying a short minted code listing, and the second column displaying a TikZ diagram. Unfortunately the minted code listing is ...
11
votes
1answer
2k views

How do I import a source file using minted

Currently, I have something like this: \begin{minted}{csharp} public static void Main (string[] args) { Console.WriteLine ("Hello World!"); } \end{minted} Where the source code is copy/pasted ...