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

Style Pygments at PythonTeX

Can I use style pygmentize with Pygments at PythonTeX. Let MWE like this : \documentclass{article} \usepackage{pythontex} \begin{document} \begin{pygments}[style= murphy]{python} % murpyhy is style ...
0
votes
0answers
24 views

Different minted styles for different languages

I am trying to add two different snippets of code to a document, one in Java and one in ObjC. I have been able to set up the languages the way I like them, but I would like to set a different style ...
0
votes
0answers
10 views

Avoid converting doublequotes in minted environment

The code \documentclass{article} \begin{document} \begin{minted}[]{scala} "test" \end{minted} \end{document} compiles to ”test” The doublequotes are the wrong ones.
1
vote
0answers
44 views

tcolorbox line numbers

I am trying to make a generic environment to use for all my boxes in my document. I want all my boxes to have line numbers. I can only get this to work some of the time. I don't get line numbers when ...
4
votes
2answers
42 views

minted Perl with dollar symbol

I'm using minted to display some Perl, however the "unmatched" '$' in it is breaking compilation. Escaping it with a '\' results in the \ being displayed with the rest of the code block. Is there a ...
0
votes
0answers
18 views

Minted crop lines from beggining and end of file

I am having a following problem with minted and LaTeX: I would like to include (a bunch) of c header files in my document, but since they are actual implemetantions, they have header guards, such as ...
2
votes
1answer
44 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
38 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
33 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
43 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
83 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
65 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
67 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
54 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
81 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
61 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
258 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
256 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
92 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
101 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
125 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
106 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
75 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
83 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
77 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
64 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
83 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
240 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
55 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
254 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
150 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
63 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
151 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
151 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
85 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
111 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
61 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
100 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
126 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
322 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
172 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
42 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
379 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 ...