{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
3answers
437 views

Minted working from terminal but not Texpad

I'm using the minted package in latex on my mac (running lion). Now when I use the terminal to type pdflatex -shell-escape My_Ruby_Notes.tex it compiles fine and the resultant pdf looks perfect. ...
4
votes
2answers
354 views

Conflict between packages auto-pst-pdf and minted?

I have tried to create a document using the pdfLaTeX engine which includes graphics generated by PSTricks and resorts to the package auto-pst-pdf. Everything went right until I used the package ...
4
votes
1answer
1k views

How can I use \belowcaptionskip with listing?

\documentclass{mwrep} \usepackage{minted} \usepackage{lipsum} % question regarding this code \setlength{\belowcaptionskip}{-10pt} % end \begin{document} \lipsum[1] \begin{listing}[h] ...
4
votes
2answers
921 views

minted doesn't escape LaTeX code inside python docstring

How can I get minted to escape LaTeX code inside docstrings? Should I use some switch? \documentclass[a4paper,12pt]{article} \usepackage[italian]{babel} \usepackage[T1]{fontenc} ...
9
votes
1answer
465 views

Clean black & white style for minted

I'm using minted to format code in a book. Except for the bw theme, I only see colored styles, which is nice for producing a PDF, but not ideal for printing in black & white. Is there a clean ...
7
votes
1answer
1k views

How to get caption above listing with minted?

I'm using the minted package. How can I get the caption to show before the code in the document? \documentclass[a4paper]{scrartcl} \usepackage{minted} \begin{document} \begin{listing}[H] ...
4
votes
1answer
937 views

Highlight certain texts in listings or minted [duplicate]

Possible Duplicate: Manual highlight of TeX code in a verbatim environment I want to highlight certain parts of a program output listing which represent user input. For example I want to ...
15
votes
1answer
557 views

Can I print only some functions with minted?

I often have to print Source Code, but quite often only some parts of a project. Now I got a task to improve two functions and I have to print out what I change. I use minted for printing source code. ...
2
votes
1answer
335 views

Prevent caption to appear on separate page

I'm using a custom listing environment which does not float taken from Code spanning over two pages with minted, inside listing with caption. The caption is done with the caption package. The ...
2
votes
2answers
292 views

Adding additional blank lines in Minted

I currently have two minted environments in each their minipage environment, so that they can be situated next to each other: \begin{figure}[!h] \centering \begin{minipage}{0.45\linewidth} ...
2
votes
1answer
115 views

How can I prevent the \listof command from the float package scrambling my headers?

I'm using the minted package, which uses the float package. When I add the 'List of Listings' in my thesis, the \listoflistings command calls the \listofcommand from the float package. My problem is ...
4
votes
1answer
394 views

Emphasize line in minted code

Is there a way to stress/emphasize a line (or part of it for that matter) in minted code? The listings package has the moredelim-option for that purpose.
1
vote
1answer
471 views

Minted: am I using illegal characters?

I have the following simple LaTeX document... \documentclass[letterpaper, 10pt]{article} \usepackage[margin=1in]{geometry} \usepackage{minted} \usepackage{hyperref} \hypersetup { colorlinks=false, ...
4
votes
1answer
1k views

Code over two Pages and continue counting Lines

I'm using Minted to show my Javascript Code. It seems not possible to spread a code with Minted over two pages. So i do it like shown in Algorithm over two pages, with itemized lists. But the Code ...
7
votes
3answers
902 views

How can I produce black and white source code using the minted package?

I just started using the minted package, to produce formatted source codes. I thought the style bw is a black and white style of pygmentize and it just uses italic and bold to format the code (I ...
2
votes
1answer
183 views

Use of \\minted@pygmentize doesn't match its definition

Having followed the installation instructions for the minted package (CTAN), I keep encountering the error, and variations thereof, listed in the title when trying to compile the document. The ...
5
votes
2answers
4k views

minted not working on mac

I am using texmaker on a Mac and I tired to use the minted package with this code \documentclass[12pt,A4]{article} \usepackage{minted} \begin{document} \begin{minted}{python} def __init__(self, ...
17
votes
1answer
984 views

In the minted package, how do I enforce straight single quotes?

Basically I want \mint{python}|'banana'| to produce straight single quotes, rather than the curly ones it normally produces (in pdflatex).
10
votes
2answers
2k 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}{} ...
10
votes
1answer
2k views

How to customize the default xelatex command in TexShop for OSX

I am trying to make use of the minted package for source code highlighting, and am running into an error telling me I need to install pygmentize combined with an message regarding the --shell-escape ...
2
votes
1answer
636 views

Beamer columns won't align minted code and TikZ diagram

I'm trying to create a two column Beamer slide, with the first column displaying a short minted code listing, and the second column displaying a TikZ diagram. Unfortunately the minted code listing is ...
13
votes
1answer
2k views

How do I import a source file using minted

Currently, I have something like this: \begin{minted}{csharp} public static void Main (string[] args) { Console.WriteLine ("Hello World!"); } \end{minted} Where the source code is copy/pasted ...
5
votes
1answer
1k views

Showing only specific lines using the listings package

I am very new to TeX. My source code is in an external file, let's call it source.java, and I use \lstinputlisting{source.java}. How could I use only the lines 3-5 for my code listing? (and not the ...
3
votes
0answers
363 views

The [H] “put it here” placement option doesn't work with floatrow [closed]

I'm using the minted, floatrow, caption, and listing packages to create code blocks like these: To do this, I'm using a hack based on this answer. Here is what I have: ... \usepackage{listings} ...
1
vote
1answer
338 views

How can I assign a node name while wrapping minted environment?

I was thinking how can I frame particular pieces of minted environment for beamer slides. I had a choice either to use overlays and split code across several blocks ( Beamer vs. Minted: overlays ) or ...
5
votes
1answer
807 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} ...
3
votes
1answer
654 views

Wrapping minted in a Tikz box with a command

I'm familiar with the Defining a command for a minted environment question. In addition to defining the mint parameters I also want to wrap the minted code inside a Tikz box for its nice looks. I've ...
1
vote
0answers
61 views

Minted split code into two pages [duplicate]

Possible Duplicate: minted truncates the code if it doesn't fit into one page I am using minted in order to write some Objective-C code inside a report I am trying to create. I use it ...
4
votes
1answer
6k views

How to install minted in Ubuntu [duplicate]

Possible Duplicate: How do I install an individual package on a Linux system? I'm very new to Latex and have understood basic concepts. Now I would like to get syntax highlighting. minted ...
7
votes
1answer
398 views

polyglossia and minted - The current roman font does not contain the Hebrew script!

Trying to use minted with Hebrew as the default language with polyglossia: \documentclass{article} \usepackage{minted} \usepackage{polyglossia} \setdefaultlanguage[calendar=hebrew, ...
3
votes
1answer
1k views

Error when using both minted and TikZ externalize with xelatex

See the following MWE. \documentclass{article} \usepackage{minted, tikz} \usepackage{fontspec} \setmainfont{Arial} \usetikzlibrary{external} \tikzset{external/system call={% xelatex ...
4
votes
1answer
149 views

How to let minted highlight a whole file from disk

I am using the minted package to highlight source code in LaTeX. It works well for a piece of code embedded in \begin{minted} ... \end{minted}. Now the question is if it is possible to highlight a ...
1
vote
0answers
114 views

Print programs with its proper syntax by minted [closed]

I have post a question several weeks ago: Print programs with its proper syntax, and I finally decided to use the package minted. I summarize a little bit my needs here: the language I define has its ...
6
votes
3answers
491 views

Is it possible to compile minted under Emacs?

I am trying to use minted package... Here is an example minimal.tex: \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{c} int main() { printf("hello, world"); return 0; 4 } ...
3
votes
1answer
468 views

minted chokes on umlauts

I would like to use ü in the caption of my listings. It works with the lstinputlisting command, but not with inputminted: \documentclass[11pt]{report} \usepackage{geometry} \geometry{a4paper, ...
3
votes
1answer
455 views

Belowskip on minted?

Is it possible to remove the spacing below the code of a minted environment? When I have a block of code underneath another it doesn't produce any spacing (which is what I want), but it does for text ...
3
votes
3answers
1k views

Using minted with mixed Python code and output

I'm using minted to highlight code in Python. In some cases I want to mix code with output that the user will see. This gives me the red syntax error boxes, for example like so: And sometimes it ...
8
votes
1answer
910 views

Using minted and tabs

I just started using the minted package. When I insert tabs as indentation, it gives me a bunch of characters instead: However, when I copy the example from the documentation it seems to work fine. ...
2
votes
1answer
342 views

Force minted to insert new space in code that won't fit on the page

Essentially I would like to have listings' breaklines option on minted. I can't seem to find it. I could manually insert new lines but it becomes difficult when the code comes from an external file.
7
votes
2answers
1k views

How to place two code snippets next to each other with minted?

The minted package for code highlighting comes with a float environment called listing. Now I would like to place two of this code listings next to each other, but I have no idea how to do this. I ...
1
vote
1answer
663 views

minted: Force comments to be displayed in a more console-like font

In minted's default style, as well as a few others (emacs for instance), comments and other stuff like C preprocessor commands show up in a very un-code-like italic font, as shown in the 2 examples ...
7
votes
1answer
561 views

Make the vim minted style use light terminal-like highlighting instead of dark

Whenever I'm highlighting code with the minted package, I use \usemintedstyle{vim}, which looks okay aside from the fact that it looks like a dark VIM color scheme applied onto a light background and ...
6
votes
1answer
691 views

Is it possible to find methods in source code using \inputminted?

My document MWE: \documentclass[12pt,a4paper]{mwrep} \usepackage{minted} \begin{document} \inputminted[gobble=4,firstnumber=3,firstline=3,lastline=9,linenos,tabsize=4]{java}{Foo.java} \end{document} ...
4
votes
2answers
3k views

Minted, setstretch and font size

I'm using minted package. My problem is \usepackage[nodisplayskipstretch]{setspace} \setstretch{1.5} line. I do need this line stretch, but I don't want it to affect code sources generated by minted. ...
4
votes
0answers
478 views

Syntax highlighting blocks of code with LaTeX and literate programming tools [closed]

Using packages like minted (thanks to Pygments), LaTeX can generate beautifully highlighted/colored source code. Literate programming tools such as noweb and cweb can generate beautifully typeset and ...
2
votes
2answers
1k views

Setting font for a minted environment in a beamer frame

I'm having a problem setting the font of a minted environment in a beamer frame to the particular font I want. I want the area to be in Inconsolata (or at least a monospaced font with a slash through ...
3
votes
1answer
1k views

Way to present programming code side by side to show the differences to the reader?

I am trying to make a side by side comparison of the result of listing-mode and minted-mode for a piece of Ruby and Java-code. I have problems making this look 'side by side'. Any suggestions to make ...
3
votes
1answer
523 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} ...
6
votes
4answers
1k views

Beamer vs. Minted: overlays

How to use beamer overlay inside minted code? The obvious solution does not work: \documentclass{beamer} \usepackage{minted} \begin{document} \begin{frame}[fragile] \frametitle{Foo} ...
4
votes
1answer
1k views

Defining a command for a minted environment

How can I define a newcommand macro or an environment for minted? What is causing the problem that the following does not work? \newcommand{\CppSourceCode}{ \begin{minted}[linenos=true, mathescape, ...