{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

4
votes
1answer
139 views

Can the listings package be set up to highlight Prolog code like minted does?

I am interested to know how listings can be customized to mimic the Pygments's Prolog lexer (i.e. make Prolog code represented by listings look the same as it is done with minted) I previously asked ...
3
votes
0answers
96 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 ...
3
votes
1answer
77 views

Problem on minted package on Windows 7

I exactly followed the instruction and I also tried those solutions on this link: How to install syntax highlight package minted on Windows 7? Unfortunately, I could not run minted package on ...
3
votes
1answer
29 views

FancyVerb Error when using minted in a \ifthenelse

I'm new to LaTeX and wand to add some code with minted, which will only be rendered, when a \boolean variable is true. Here's my code: \documentclass{article} \usepackage {minted} \usepackage ...
2
votes
3answers
321 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. ...
2
votes
2answers
32 views

How can I prevent the label / frame to be split from source code in minted?

Question How can I prevent the label / frame to be split from source code in minted? What I am talking about is this: MWE mwe.tex: \documentclass[a5paper]{scrartcl} \usepackage{amssymb, ...
12
votes
5answers
7k views

How to install syntax highlight package minted on Windows 7?

I followed the instruction from this link: http://tug.ctan.org/tex-archive/macros/latex/contrib/minted/ Firstly, I install Python 2.7, then create a folder named Scripts in the directory: ...
0
votes
0answers
31 views

minted package call from function

My aim is to call source(highlighted by minted package) in one of the input.tex file instead of master tex. This one does not work : \documentclass{uoyths} \usepackage{minted} \begin{document} ...
2
votes
1answer
69 views

How can I solve “Float(s) lost” when using afterpage / minted packages?

I'm writing a document where I have a lot of long listings. I use the package minted to typeset the listings, which I always embed in a float. Since the listings are quite long, and LaTeX usually does ...
3
votes
1answer
143 views

LaTeX packages minted and scrhack

I'd like to use the minted package and the scrhack package in the same LaTeX document, that is: \usepackage{scrhack} \usepackage{minted} However, I get the following error: ...
4
votes
2answers
321 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
2answers
203 views

Beamer \pause in LaTeX minted

How can I \pause in the middle of a minted source code in Beamer? \documentclass[12pt]{beamer} \usepackage{minted} ... \newminted{csharp}{bgcolor=gray!25,fontsize=\footnotesize,mathescape} ... ...
4
votes
2answers
77 views

How to make a minted code listing centered on a page?

So, I am writing a report with Prolog code listings in it. I have been using lstlisting to make my listings and I made my code centered on the page, such as this: \renewcommand{\figurename}{Listing} ...
1
vote
0answers
42 views

Cannot get 'pygmentize' to work correctly on mac

I am using TeXworks on Mac osX 10.7.5 and I'm trying to compile some python code within my tex file but with limited success. My tex file looks like: \documentclass[12pt,A4]{article} ...
0
votes
1answer
42 views

minted : changing fontfamily to support UTF8 chars

I'd like to print out the output of a "/usr/bin/tree" command. For instance : /etc/puppet/hieradata/ ├── common.yaml └── virtual ├── false.yaml └── true.yaml My idea was to put this in a ...
5
votes
2answers
267 views

I can't get minted package to work under Ubuntu (pygments error)

I'm currently using ubuntu13.10, TeXlive and Texmaker editor, and I found out that minted package is the best way to get source code highlighting on LaTeX. So I installed python-pygments via terminal ...
29
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
0answers
44 views

Why does Minted color the first method of a c++ class differently?

I am using minted to list c++ source code in LaTeX. When I compile the following sample I get a strange result. \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{minted} ...
3
votes
0answers
51 views

Minted PHP with line numbers

I've added minted and inserted PHP code. The result is that I must put < ?php and ?> tags to get the code colored, then if I want to display line numbers it starts from < ? php line like ...
6
votes
2answers
789 views

minted truncates the code if it doesn't fit into one page

minted works well when the code snippet is short, or fit into one page. The problem occurs when I pasted a code snippet with several hundred lines. Sometimes it processed but the output was truncated; ...
4
votes
1answer
84 views

tcolorbox minted library with python3 non-determinism

Later versions of the package tcolorbox allows formatting source code with its minted library (which uses the minted package). When a document is compiled, a temporary file with extension .pyg is ...
20
votes
5answers
920 views

Speeding up minted compilation

I've been looking into speeding up my pdflatex compilation time and it's lighting fast now. Only one thing's still very slow: compiling source code using the minted package. I was wondering if ...
2
votes
0answers
32 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 ...
35
votes
4answers
2k views

Has the time come for a LaTeX3 successor to 'listings'?

I'm currently looking for a nice and challenging open-source project to work/collaborate on after my thesis. I don't have a Comp. Sci. background, but I'd like to learn more about compiler ...
4
votes
1answer
72 views

Minted does not escape beamer's \end{frame}

It seems that the following code does not work as expected (ie. printing the \end{frame} as a verbatim colored code. Instead, the \end{frame} is interpreted by LaTeX: ...
0
votes
0answers
20 views

minted custom numbering

Is it possible to define custom numbers to each source code line, like: 1 string title = "This is a Unicode π in the sky" 22 /* 23 Defined as $\pi=\lim_{n\to\infty}\frac{P_n}{d}$ where $P$ is the ...
2
votes
1answer
882 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 ...
3
votes
1answer
56 views

In a multicol with a separating border, set a margin between the border and the content

I have a minted code listing, displayed in a multicol environment with a separating border between the columns: The border is too close to some of the content, like stracka(1,sg,ka). and ...
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}{} ...
1
vote
0answers
198 views

Beamer doesn't compile on windows using minted

Have the same problem than him: Beamer presentation fails to compile after TeX Live upgrade I'm on windows using miktex (texworks), compiling with --shell-escape. I have the same message: LaTeX ...
0
votes
0answers
77 views

No caption label using minted with caption and hyperref

I'm trying to use the caption and hyperref with the listing environment and the minted package. If you compile the MWE, the listing will only show a number but no name. hyperref inserts a link, ...
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 ...
3
votes
1answer
95 views

How to wrap floated minted listing in my own environment?

Here's what I'd like to do: \begin{code}{c}{Hello World in C}% I would prefer the caption to be optional #include <stdio.h> int main(void) { printf("Hello, world!\n"); return 0; } ...
1
vote
0answers
201 views

beamer + minted most basic example fails (not the “fragile” problem)

I'm failing to get the simplest possible beamer+minted example to work. Here's my latex code \documentclass{beamer} \usepackage{minted} \begin{document} \begin{frame}[fragile] \begin{minted}{python} ...
0
votes
1answer
109 views

Using listing with minted gets wrong listoflistings

I wanted to make a \begin{minted} block to show on the ToC in Listings section with a link to its label. So I did (with links to my Github working repo) \begin{listing}[!h] \begin{minted}[ ...
2
votes
1answer
95 views

Lyx minted environment layout

Before I resolved a problem to set up a minted environment in LaTeX. Now, I would like to add this environment as a LyX layout. I have tried with Style MatlabCode Category MainText ...
1
vote
2answers
64 views

Simple minted \newenvironment

I'm trying to do a minted \newenvironment I looked at this post new-environment-with-minted, but I would like to know if there's a more simple way to do that, like \newenvironment{matlabcode} ...
5
votes
1answer
717 views

New environment with minted

I want to create a new environment to transform this: \begin{listing} \caption{some caption} \label{code:label} \begin{minted}[options]{language} My code here \end{minted} \end{listing} ...
4
votes
1answer
100 views

minted and Unicode: symbols missing

Code: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}[mathescape, linenos, numbersep=5pt, gobble=2, ...
2
votes
1answer
130 views

Adding caption and counter to source code environment

I have a source code listing with minted environment. How can I make a counter/caption to be shown as follows. I also need to make \tableofsourcecode to enlist all the source code references. The ...
3
votes
1answer
99 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} ...
1
vote
1answer
271 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
0answers
62 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 ...
3
votes
1answer
174 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 ...
1
vote
1answer
92 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.
1
vote
1answer
99 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} ...
2
votes
1answer
102 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 ...
4
votes
1answer
5k views

How to install minted in Ubuntu [duplicate]

Possible Duplicate: How do I install an individual package on a Linux system? I'm very new to Latex and have understood basic concepts. Now I would like to get syntax highlighting. minted ...
5
votes
1answer
69 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, ...
12
votes
2answers
1k 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 ...