{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
274 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
158 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
205 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
179 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
640 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
4k 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
311 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
429 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
223 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
128 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
116 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
198 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
100 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
552 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
571 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
179 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
670 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
314 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
714 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
181 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
368 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
209 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
754 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
511 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
380 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
368 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
260 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
248 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
129 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
776 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
378 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
329 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
857 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
818 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
423 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
879 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
493 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
329 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
269 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
370 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
438 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
947 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 ...
7
votes
3answers
778 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
174 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 ...