{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

1
vote
0answers
33 views

Centering code listings in tabular

I'm inserting code listings using mint into a tabular, but the text and listings in corresponding columns aren't centered. How do I center them? Here's my table code: \begin{center} ...
0
votes
2answers
70 views

Converting latex highlighted code listing to image

Does someone know how I could submit a paper to a journal which contains source code highlighting with minted https://github.com/gpoore/minted ? I really like the highlighting and don't want to go ...
12
votes
2answers
4k views

Inline code and short verb with minted

I it possible to use minted for inline code and to add a short verb sing for minted? Like \lstMakeShortInline| in listings.sty? \documentclass{article} \usepackage{minted} \newminted{tex}{} ...
1
vote
1answer
39 views

minted: how to highlight java method at class

I'm trying to highlight a method at a Java class with minted. The usual notation (at least in Javadocs) for a method at a class is classname#method, but when I do something like: ...
3
votes
1answer
208 views

Pygmentize not working properly with minted package in TexShop on OS X

I am using TexShop on mac OS X 10.11.1 and I'm trying to output some Python code inside my LaTeX document. Here is an example of a document I would want to produce : \documentclass[12pt]{article} ...
7
votes
1answer
86 views

! I can't find file `['

I am writing my thesis by using LaTeX and the toptesi package. I am mostly writing on my laptop, but sometimes I need to switch to my other PC. I encounter some problems here when generating the pdf ...
5
votes
1answer
37 views

Avoid space when using mintinline wrapped in a new command

I want to wrap mintinline into a new command \cc but it produces an additional whitespace when using it: \documentclass{article} \usepackage{minted} \newcommand{\cc}[1]{{\mintinline{latex}{#1}}} ...
1
vote
0answers
20 views

Best options to highlight Geogebra syntax

I want to write something about geogebra in LaTeX. I usually use the minted package for listings. Is there any language supported by minted which which is very close to the Geogebra Syntax (as used in ...
1
vote
3answers
180 views

Configure Minted Color XML

I'm using minted package for code listing, however I don't like some of the colors too much. Is it possible to configure these colors? For example, When I display the colors to view XML color, the ...
3
votes
1answer
39 views

New environment for Python source code

I am trying hard to create an environment for my source code. Here's my current state \documentclass[a4paper,fontsize=12pt]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} ...
8
votes
4answers
2k views

Red box drawn around question-mark operator in minted Erlang code

I'm trying to include some Erlang code samples in a document using the minted package which include the ? operator to denote a message being received from a process. The code \documentclass{minimal} ...
3
votes
1answer
22 views

Natural width when centering a minted environment

I'm writing a report in which I have some code snippets. Using the following code, I'm able to create, and centre, a good-looking minted environment: \documentclass{article} % Required for minted ...
1
vote
1answer
32 views

Background color for a range of lines in Minted

I have a long piece of code that highlight with minted. I would like to have a background only around a block of code. How can I achieve that? I tried to use something like escapeinside=|| to create ...
16
votes
5answers
17k 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: ...
2
votes
1answer
222 views

Using minted package on Ubuntu: .w18 file not found error

I am trying to run the following code through XeLaTeX, using the -shell-escape option: \documentclass{article} \usepackage{minted} \begin{document} \end{document} The file is named guess.tex and ...
3
votes
2answers
37 views

“Figure” as name of listings in listoflistings with minted and newfloat

The following MWE gives me a List of Listings with "Figure" as name of listings. \documentclass{scrreprt} \usepackage{classicthesis} \usepackage[newfloat]{minted} \begin{document} ...
2
votes
1answer
1k views

Minted not working

I'm trying to use the minted package on Windows 8. I installed python and Pygment, added C:\Python34 and C:\Python34\Scripts on my path. When I try to compile the following latex code: ...
3
votes
2answers
111 views

How to draw over minipage in tikz?

I've got a code snippet, that I'd like to annotate with arrows, boxes, and bubbles pointing to the various parts of the code. Right now, I've got the code in a minted environment, inside a minipage, ...
1
vote
2answers
44 views

Displaying minted code line numbers from within preview environment

I'd like to have the line numbers corresponding to code highlighted using the minted package displayed in the output of a preview environment. Perhaps because the line numbers are set in the margin, ...
0
votes
0answers
38 views

Is it possible to use tikzmark inside minted?

As I've pointed out in a related question, I'd like to have some arrows pointing to parts of a source-code listing. I know this is possible with the listings package, but is it possible with minted? ...
2
votes
2answers
60 views

xelatex: Minted code block represents tabs as ^^I

I am producing LaTeX output with org mode. My code snippets wind up being indented with tabs, because of my c-mode settings. Changing these would be inconvenient. Although the snippet I am posting ...
4
votes
1answer
87 views

Difficulties with Minted and UTF-8

I'm trying to typeset Python programs with LaTeX and the Minted package. I'm under Ubuntu 15.10, with TeXlive installed from Ubuntu standard repositories. The python-pygment package is at version ...
15
votes
2answers
4k views

How to use minted under MikTeX and Windows 7?

According to minted documentation: Windows support is sketchy / untested at the moment. There are two complications: installation and usage....... This question seeks a step by step ...
11
votes
1answer
1k views

break lines in minted code

Thanks to this question minted is able to break long source code lines. It is working really fantastic, except in one case: When already indented code gets breaked into two lines, than line two gets ...
6
votes
1answer
735 views

How to have inline code and line numbering with minted?

I'm using the code found in this answer to allow minted to provide inline code. But, unfortunately, this breaks line numbering, which is not shown anymore. How can I have both inline code and line ...
3
votes
2answers
64 views

How to supress chktex errors in minted environment?

Is there a way to make chktex play nice with the minted package? Right now, it seems to assume that normal checks apply to the content of the minted environments and produces a lot of warnings.
0
votes
1answer
145 views

Python error while generating code snippets with minted and Pygments in Anki

On the command line everything works fine but in in Anki I get a python error. My computer: MacBook Air (13-inch, Mid 2012) Processor 2 GHz Intel Core i7 Memory 8 GB 1600 MHz DDR3 My operating ...
11
votes
2answers
228 views

Extract source code on the fly to a file?

I'm trying to create a programming text to use for my students. My goal is to have an environment (say, "code", for instance), so, if I type the following in my .tex file: \begin{code}{Sample script} ...
5
votes
1answer
66 views

Connecting vertical box drawing characters

I've been working on some diagrams for a slide deck using beamer and minted (and buliding the PDF with Xelatex). When using the Unicode box-drawing characters, the vertical bars are not actually ...
3
votes
1answer
57 views

minted fails with breaklines and obeytabs

The following example with a minted enviroment fails with the error message _minted-test/7587C145B52367AE51CACC4AFB0EC13D2F785CCAC2A2CC760CA216BD1781DF79.pygtex:3: Extra }, or forgotten \endgroup. [ ...
4
votes
1answer
29 views

Minted breakautoindent changes behaviour on OverLeaf

I am trying to typeset some of my source code using the minted package, this works fine that is to say there is no outright error but something strange happens why I typeset locally. For various ...
1
vote
2answers
23 views

Minted “underfull \hbox (badness 10000) in paragraph” when using bgcolor [closed]

When I use minted to highlight BASH code like this \documentclass[a4paper, 11pt, twoside]{article} \usepackage{xltxtra} \usepackage{xunicode} \usepackage{polyglossia} \usepackage[svgnames]{xcolor} ...
0
votes
0answers
30 views

Forcing page break of a minted listing with \centering on

I am using minted to create a code listing. I need the listing to be centered so according to this solution, I use the \RecustomVerbationEnvironment to escape the verbatim environment so that it can ...
2
votes
2answers
31 views

How to get continuos line numbers for minted code blocks

I use minted in following way: \documentclass[a4paper, 11pt, twoside]{article} \usepackage{xltxtra} \usepackage{xunicode} \usepackage{polyglossia} \usepackage[svgnames]{xcolor} % Syntax higlight ...
4
votes
1answer
25 views

Problem with \mintinline{latex} and ToC

I'd like to use code highlighting for LaTeX in my sectional titles. In the titles themselves it works, but the it does not in the Table of Contents. Here a minimal example: \documentclass{scrartcl} ...
4
votes
1answer
37 views

Get minted up and running with clean thesis

I am currently working with the cleanthesis package. Customizing this thing was ok so far, but now I encountered a real problem. While trying to use minted, I wasted a lot of time till I found out it ...
4
votes
1answer
62 views

Generate tikz coordinate for each line from minted file included

I want to include a file ../basename.end via minted and automatically generate a tikz-coordinate basename-$LINENUMBER for the beginning of each line of the included file... I fumbled around with ...
1
vote
2answers
130 views

How to invoke minted with python3

I have 2 versions of Python on my machine. Version 2.7.10 can be invoked with python, whereas python3 uses 3.5.0 under the hood. I'd like to use minted with python3, which is why I installed Pygments ...
4
votes
0answers
37 views

Copyable tabs in minted

I'm preparing tutorial for students with code fragments that they will copy to a text editor. Is there a way to make syntax-highlighted code copyable to text editor so that indentation is preserved, ...
2
votes
1answer
36 views

Work-around for minted code highlighting in arXiv?

I am currently trying to submit my bachelors thesis to arXiv. However, it does not work: (/texlive/2011/texmf-dist/tex/generic/oberdiek/etexcmds.sty)) Package ifplatform Warning: shell escape is ...
1
vote
0answers
27 views

tcolorbox, not displaying symbols in listings (using minted) [closed]

I have the following latex code \begin{ipythonnb} \begin{ipyin} A = np.array([[3, 2, -1], [2, -2, 4], [-1, 0.5, -1]]) b = np.array([1, -2, 0]) np.linalg.solve(A,b) \end{ipyin} \begin{ipyout} array([ ...
1
vote
0answers
48 views

Can't enable breakanywhere option

I'm trying to activate breakanywhere option (tried with both breaklines enabled/disabled) but I get this message: ! Package xkeyval Error: `breakanywhere' undefined in families `minted@opt@cmd' ...
3
votes
1answer
749 views

Loading babel with the 'hungarian' (magyar) option breaks 'pygments' code highlighting

Given the following TeX file everything works as expected: the (Hungarian) text Árvíztűrő Tükörfúrógép typesetted as expected and the code snippet also formatted brilliantly. \documentclass{article} ...
1
vote
0answers
64 views

Problem with Minted using Mactex

I'm having an issue using Minted, the following error appears: Package minted Error: You must have `pygmentize' installed to use this package. But I've already installed Pygmentize. I've tried ...
2
votes
0answers
19 views

\mintinline expands to a single newline

I'm using Minted 2.1, that I have installed through tlmgr, and Texmaker 4.1. Compiling the following piece of code (straight from the documentation) : \documentclass{report} ...
1
vote
0answers
29 views

Count lines of multiple files (Using minted for formatting.)

I am using minted to show source code in my document like this: \section{Image functions} \inputminted{python}{src/imagefuncs.py} \section{Matrix operations} \inputminted{python}{src/matrices.py} ...
2
votes
1answer
56 views

Minted Package, inline background color

MWE: \documentclass[10pt]{article} \usepackage[english]{babel} \usepackage[paperwidth=6in,paperheight=9in, margin=1in]{geometry} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} ...
7
votes
1answer
1k views

New environment with minted

I want to create a new environment to transform this: \begin{listing} \caption{some caption} \label{code:label} \begin{minted}[options]{language} My code here \end{minted} \end{listing} ...
2
votes
0answers
142 views

minted package - keyval error: breaklines undefined

On Fedora 22 system: I installed texlive-scheme-full, Python 2.7 (and pygments 2.0.2) as well as all the pre-requisites for minted. I am trying to use the breaklines command with the minted package. I ...
10
votes
3answers
338 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} ...