{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

Why : Error Minted package with rule color?

I have problem about use minted package, my mwe like this : \documentclass{article} \usepackage{minted} \usepackage{xcolor} \definecolor{Rub}{HTML}{061089} \begin{document} ...
0
votes
1answer
37 views

How to dim part of the syntax-highlighted source?

I'd like to typeset a (LaTeX) source code with syntax highlighting (I guess I'm going to use minted, but I haven't decided that for sure yet). I'd like to have complete examples (with \documentclass ...
0
votes
0answers
25 views

Highlighting code lines with minted in diff like GitHub?

What I'm seeking is something like you find in this question but together with the minted package. Preferably without any extra steps. I know that it's possible to create your own pygment styles, but ...
1
vote
1answer
39 views

'Errors' using the minted VHDL environment

I recently started university, and was annoyed to find out, we had to do our reports and assignments in LaTeX... until I learned how to use it! I went from hating it to loving it in one day. :) But ...
5
votes
1answer
81 views

minted: Hiding comments in code?

Is there anyway to have minted hide code comments completely? This is related to How to strip a listing of all (line and block) comments without leaving white space? But that question is about the ...
1
vote
1answer
48 views

Python indentation lost in minted when export to bearmer/latex in orgmode [closed]

I have a strange problem when exporting to beamer in org-mode. I use minted to export python. But for a reason I don't understand, I lost sometime the indentation. For instance: ** NDVI is SciPy 1/2 ...
3
votes
1answer
51 views

mintinline command not compiling with pdflatex

Whenever I try to use the mintinline command in a source file and then compile that file with pdflatex, I get an error. Minimum example to show the error is provided below: \documentclass{book} ...
0
votes
0answers
39 views

AucTex minted package not finding pygmentize

I am trying to compile a latex document with the minted package. I can do this quite happily from the terminal (I'm using texlive on os x) with the following code: xelatex --shell-escape demo.tex ...
4
votes
1answer
63 views

Using BW style for minted code highlighting not pure BW

I'm trying to use the minted package with bw style for JavaScript code highlighting. Under the document I added \usemintedstyle{bw} and use highlighting like this: ...
4
votes
1answer
47 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: ...
7
votes
1answer
204 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
168 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
76 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
86 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
109 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
35 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
95 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
64 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
78 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
66 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
62 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
54 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
75 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
229 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
54 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
54 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
248 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
140 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
57 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
127 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
128 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
39 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
76 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
106 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
54 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
80 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
121 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
282 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
152 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
41 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
38 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
333 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
674 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
347 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
190 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
231 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
100 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
810 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: ...