{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
0answers
43 views

(Clickable) cross-reference in lstlisting

To generate documentation for an 'application programming interface', I would like to have a syntax highlighted area (with the class declaration), which has clickable links to the documentation (which ...
3
votes
1answer
31 views

Minted In A New Environment

I'm trying to enclose Minted in a new environment as follows: \documentclass{article} \usepackage{minted} \usepackage{mdframed} \usepackage[varqu]{zi4} \definecolor{codebggray}{rgb}{0.95,0.95,0.95} ...
2
votes
0answers
60 views

Basic minted example prints out latex code, not source code [duplicate]

I have this very basic .tex file: \documentclass{book} \usepackage{vendor/minted} \begin{document} \title{My Book} \author{Jonathan Lipps} \maketitle \begin{minted}{python} def boring(args = None): ...
3
votes
1answer
56 views

Formatting code into the style used in Stackoverflow

I know that there is minted and listings for displaying nice code in .tex documents. However, I'd like to use the style that is used for Stackoverflow code: example. Are there any packages for this, ...
1
vote
1answer
44 views

How to render LaTeX (math) in Sweave (R) code comments

background A asked this question on SO yesterday because it seemed to be more programming-oriented, but there weren't any responses. Perhaps someone here might have an idea? I am writing a Sweave ...
1
vote
0answers
17 views

Displaying pdf in TeXStudio with minted package [duplicate]

I'm using the minted package to add code to my report. I'm using TeXStudio and I've followed the instructions given here by hpesoj626. The .pdf can be generated with a minor error: Process started: ...
1
vote
0answers
43 views

Error in minted package

I am using minted to display code in my LaTeX report, and after following the instructions given here by hpesoj626, I get the error Process started: pdflatex.exe -synctex=1 -interaction=nonstopmode ...
4
votes
1answer
46 views

Minted Environment inside Tabular

I want to create a table with Tabular and put a minted environment into it, just like here: How to embed a minted environment inside a tabular environment?. However, as shown in that post, the minted ...
2
votes
0answers
39 views

Minted inside tabular

I know this question has been asked before, but it didn't quite solve my issue. (How to embed a minted environment inside a tabular environment?) The described workaround (bringing \end{minted} to a ...
2
votes
0answers
46 views

Possible bug in minted package

(just now while typing the topic title I found possible related but my post is too long to discard it now :-) ) (the minipages is only to show side by side. I'll not use it) I'm using minted package ...
9
votes
3answers
151 views

Fancy code environment

I'm writing a small tutorial about LaTeX. So I'd like to insert some code and obtain the result on the right. I'm almost there. I got the desired output but I'd like something more clear, that is, ...
13
votes
2answers
588 views

Combine minted and tcolorbox

I have the idea to combine minted with tcolorbox. At first, I have created my own minted environments: \newminted[mycsharp]{csharp}{tabsize=2,fontsize=\footnotesize} ...
3
votes
1answer
30 views

Minted custom label and reference

I use minted for listing Objective-C code and I need to replace the label text from Listing 1. to Source Code #chapter_number#.#subsection_number#.#subsubsection_number#.#label_number# like "Source ...
1
vote
0answers
28 views

Minted Listings don't behave the way they should

i'm quite new to la/tex and i have a question about the latex package minted and it's listing feature. i'm using a latex template from someone else who gave it to me. He used the listing feature as ...
14
votes
1answer
220 views

How does minted work from a point of LaTeX-User?

The package minted is one of the most famous package for highlighting source code. But how does it work?
8
votes
2answers
105 views

Emphasise a particular keyword in minted

In minted, how do I highlight a particular set of keywords by making them bold. Say for example consider the MWE, \documentclass[a4paper , 12pt]{article} \usepackage{minted} \usemintedstyle{manni} ...
1
vote
1answer
42 views

Listings in Minted not working

To surround the code with a box, the documentation suggested to use listing environment. But the code has no effect at all. What is the issue here: My MWE: \documentclass[a4paper , 12pt]{article} ...
4
votes
2answers
67 views

Usage of macros inside \mintinline

I tried to use a macro inside \mintinline. This is the result: \documentclass{article} \newcommand\ab{expanded stuff} \usepackage{minted} \begin{document} ...
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 ...
2
votes
0answers
26 views

Conditional syntax highlighting for the same function, possibly using delimiters [closed]

Is there any way to conditionally highlight syntaxes in minted? I have the same name for an argument of a function as well as a function itself, messing up the syntax highlighting pretty badly. A ...
3
votes
1answer
57 views

Usage of minted inside newenvironment in minted 2.0a³

As a followup question to Lstinline macro inside another environment, I kind of want to do the same thing for minted as well, but I'm held back by the following: I used the code from Using minted to ...
1
vote
2answers
83 views

How can I invoke a macro inside minted inline code?

How can I use a command inside a minted one-liner? This code \newcommand{\HADOOPUSER}{hduser} \mint{console}|sudo groupadd \HADOOPUSER| currently produces sudo groupadd \HADOOPUSER whereas ...
2
votes
1answer
36 views

Usage of minted inside a new environment, inside IfFileExists

I want to conditionally load minted and define an environment, but after using IfFileExists I'm running into an error: FancyVerb Error: Extraneous input `resetoptions \setkeys ...
1
vote
0answers
42 views

Unexplainable error using minted [closed]

After changing one argument in math.py and running _mapping.py, I managed to break minted: LaTeX Error: File `temp.out.pyg' not found. Type X to quit or <RETURN> to proceed, or enter new ...
2
votes
0answers
60 views

Syntax highlighting in minted - how does it work? [closed]

I want to customize the minted syntax highlighting, but neither the minted package documentation, nor the existing topics on syntax highlighting in minted on TeX.SX, nor google offer explanation on ...
8
votes
1answer
163 views

Problem in adding a background color in a minted environment

I want to add a background color to the minted environment in my LaTeX document. However, when I add the the background color the environment does not start in a new line. Could someone help me fix ...
1
vote
1answer
31 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 ...
4
votes
1answer
226 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
127 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
175 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
72 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
361 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
37 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, ...
13
votes
5answers
8k 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
35 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
223 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
377 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
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
2answers
275 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
114 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
98 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
63 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
670 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 ...
32
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
47 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
85 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 ...
7
votes
2answers
888 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
115 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
965 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
33 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 ...