{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
37 views

minted and tabs

I can get a code block including tab characters in a minted environment to work with the obeytabs option, which results in a tab size of 8. The tabsize option, however, will mess up the tab alignment. ...
2
votes
0answers
28 views

custom syntax highlight for minted [closed]

I am trying to get a custom syntx highlight for minted. My actual code for this style looks like this: from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, ...
5
votes
1answer
56 views

Correctly highlighting custom html tags in listings

Problem statement I have several code listings containing HTML markup in my latex files. These listings contain multiple custom html tags (created in combination with corresponding AngularJS ...
2
votes
0answers
28 views

Cyrillic in minted label

Is it posible to use the Cyrillic text for the label option in minted source code listing? I try to compile this piece of latex code with xelatex: ...
4
votes
0answers
56 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
34 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
61 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): ...
4
votes
1answer
59 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
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
47 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
49 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 ...
3
votes
0answers
44 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
51 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
160 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, ...
3
votes
1answer
35 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
31 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
232 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
107 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
43 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
74 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} ...
1
vote
1answer
52 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 ...
2
votes
0answers
27 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
64 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
87 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
38 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
44 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
65 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
182 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 ...
4
votes
1answer
83 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
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, ...
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} ...
3
votes
1answer
200 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 ...
2
votes
1answer
287 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 ...
4
votes
1answer
240 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 ...
4
votes
2answers
124 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
108 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
68 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 ...
3
votes
1answer
431 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: ...
1
vote
0answers
51 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
91 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 ...
4
votes
1answer
121 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 ...
4
votes
1answer
106 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: ...
1
vote
1answer
32 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 ...
37
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 ...
3
votes
1answer
74 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 ...
1
vote
0answers
261 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 ...
5
votes
2answers
758 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 ...
0
votes
0answers
97 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, ...
4
votes
2answers
292 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
1answer
153 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; } ...