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

How to use Serbian cyrillic script with Polyglossia and minted

I'm using polyglossia for writing a document in Serbian cyrillic script, but when I try to use minted for source code syntax highlighting there's an error (although pdf is generated): polyglossia: ...
0
votes
0answers
5 views

Problem with Pygmentize and Minted on Wndows 7 [migrated]

I want to use minted package, but when I'm xelatexing in TexStudio, there's an error: minted: You must have `pygmentize' installed to use this package. pip seems unable to find pygmentize: In my ...
7
votes
1answer
86 views

Emacs org-mode minted export with #+ATTR_LATEX

When I try to export a file like this: #+LaTeX_CLASS: tufte #+ATTR_LaTeX: :float t :options label={test} #+begin_src c #include <iostream> using namespace std; int main() { ...
4
votes
2answers
76 views

Break Lines in minted environment

Usually when adding code in a LaTeX document, I use the listings package. When trying to modify and personalise styles in listings, @1010011010 suggested to use the minted package. To be quite frank, ...
2
votes
1answer
50 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
53 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
81 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
30 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
75 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
46 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
67 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
53 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
53 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 ...
4
votes
0answers
48 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
57 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 ...
16
votes
3answers
207 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
43 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
41 views

Minted Listings don't behave the way they should

I'm quite new to La/TeX and I have a question about the 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 well ...
14
votes
1answer
238 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?
9
votes
2answers
124 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
51 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
97 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
70 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
32 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
70 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
97 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
43 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
57 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
88 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
217 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
105 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
39 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
36 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
265 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
427 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
272 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
143 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
154 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
75 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
600 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
56 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
117 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
144 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
117 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
33 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 ...
38
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
81 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
276 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 ...