Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pygments]

The tag has no usage guidance.

0
votes
1answer
26 views

TexStudio doesn't find the package “Pygments” although it is installed

I'm try to use the minted package in latex to display code in latex document. From Texstudio, I get an error message you must have pygmentize installed to use this package. If I type pip3 install ...
1
vote
1answer
39 views

Custom Pygments styles in minted not taking effect

I have a fairly minimal document: \documentclass[]{article} \usepackage{minted} \usemintedstyle{github} \begin{document} \begin{minted}{java} public static void main(String[] args) { System.out....
0
votes
0answers
22 views

\PYGdefault undefined error in TeXstudio - how to remove the __minted_* folder?

I installed TeXstudio and texlive with sudo apt install texlive-full afterwards I installed the pygments with sudo apt-get install python-pygments and I used the command % !TeX TXS-program:compile = ...
2
votes
1answer
133 views

Issue with Pythontex using a LaTeX editor (MacOS - Anaconda)

I just achieved a clean install of MacOS Mojave. I have reinstalled Pythontex with the help of TeX Live Utility. Python 3 is installed with Anaconda. The package works fine when the typesetting is ...
0
votes
0answers
134 views

pygments error Texstudio in Windows 10

I want to use minted package to highlighted my code block which is written in TexStudio. I installed minted package. Secondly I got error shell-escape-flag which is solved after research How-to-invoke-...
2
votes
1answer
2k views

Package minted Error: Missing Pygments output [closed]

I installed minted today as well as Python and Pygments, which I can run from the cmd. When I try this code \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{c} int main() {...
1
vote
0answers
772 views

Error compiling with minted package

I'm trying to use the minted package in a document. When I compile the document I get the following error: The minted package is installed under MiKTeX, and Pygemnts is also installed (when I -m pip ...
0
votes
1answer
560 views

Error with pygmentize when using minted package

Problem: I get multiple undefined control sequences when using the package minted and I believe it is caused by pygmentize. Background I use the software Texpad and the active LaTeX distribution is ...
0
votes
1answer
396 views

TeX won't recognize Pygments for use in minted

So a little bit of background: I'm fairly new to LaTeX, I've been writing up homework in it for 3 years and that's it. I'm writing my undergrad thesis with it because it's a departmental requirement, ...
1
vote
1answer
871 views

Minted package not working [closed]

I am having some problems with the package minted. I installed the package and also the package Pygments for python. However I keep getting this error: Package minted Error: You must have `...
2
votes
2answers
127 views

Compilation fails using pygment/minted on texlive 2017

On Debian (testing) with texlive 2017.20170818-1, using "pdflatex --shell-escape mwe.tex" the following MWE does not compile: \documentclass[a4paper,10pt]{article} \usepackage{color} \usepackage{...
0
votes
1answer
2k views

error: `pygmentize.sty' not found

I am trying to use minted package, which has a dependency of the program called pygmentize. I installed this but did not working well. Then i did this But still showing the error: File `pymentize.sty'...
1
vote
0answers
297 views

Undefined Sequence in Texmaker when using minted and -shell-escape package [closed]

I had some issue when using the minted package on Texmaker I read on an answer on tex.stackexchange that it was maybe better to download TeXStudio but it wasn't. I heard it was something about -shell-...
0
votes
1answer
165 views

Showing English numbers with XePersian and Minted

This is my code: \documentclass{article} \usepackage{xcolor} \usepackage{minted} \usemintedstyle{colorful} \usepackage{xepersian} \settextfont{B Nazanin} \definecolor{mintedbackground}{rgb}{0.95,0....
4
votes
1answer
437 views

Pygments/minted highlight environment name in bold

Is it possible to adapt minted or Pygments to also highlight names of environments? I would like to have this output But all I get is this I.e. {itemize} is not bold. I guess it is possible by ...
2
votes
1answer
2k views

Minted Color Themes Display Improper Colors

I'm trying to get simple code highlighting working using minted, however the background color is always off. My source: \documentclass[a4paper]{article} \usepackage{minted} \usemintedstyle{monokai} \...
5
votes
1answer
7k views

How to install pygments on windows 7

When I run LaTeX file its gives error as "! Package minted Error: You must have pygmentize installed to use this package", you must have pygments installed. when I go through minted documentation ...
9
votes
1answer
4k views

Minted Error “Undefined control sequence. \PYG” with TeXmaker

I have a Windows 10 computer and try to use the minted package to insert vhdl code into my LaTeX file. I did install Python and Pygments and added Python/scripts to the path. I also change the command ...
4
votes
0answers
359 views

How to you properly specify an alternative to the pygmentize external command for minted?

A while ago I asked how to extend minted to colour-highlight my chosen key words. The consensus was "make the changes in the external pygment program" -- so I did. The changes are small and the ...
3
votes
2answers
2k views

Add keyword to language in minted

I use minted to highlight some javascript code. I use \documentclass{article} \usepackage{minted} \begin{document} \begin{minted}{js} const mySchema = new Schema({ name: String, is_true: ...
3
votes
1answer
505 views

How to use minted code syntax highlighting on 2 columns document?

The code is not wrapped and overlaps over the second column of text, as shown in the next image. Currently I'm just using it as follows: \begin{minted}{smalltalk} \end{minted} Is there any easy way ...
1
vote
1answer
131 views

minted and different coloured pragmas

I try to see if is possible to use minted to colour #pragma statements differently based on what comes after the pragma, omp, acc. I am aware of this Highlight #pragma in code listing using minted ...
3
votes
0answers
777 views

Minted doesn't work properly: random characters in code [closed]

I'm trying to get the minted package to work with a simple example code (java) on macOS: \documentclass{article} \usepackage{minted} \usepackage[utf8]{inputenc} \begin{document} \begin{minted}[frame=...
2
votes
1answer
3k views

shell escape is disabled

I am trying to use minted for code highlighting. Now to use this package I need to enable shell escape. So I have set the compiler options as follows: However, I am still getting the same error from ...
2
votes
2answers
5k 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 ...
5
votes
2answers
6k 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} \...
0
votes
1answer
2k 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 ...
1
vote
1answer
139 views

Using minted to highlight Mako templates

When attempting to use the minted package to highlight a piece of source code in the Mako templating language: \documentclass{article} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \...
3
votes
1answer
625 views

minted with Texmaker on OS X

I'm trying to use minted with texmaker. The weird thing is, that it works, when I invoke pdflatex --shell-escape testfile in the system shell, but not from texmaker, though Options -> Configure ...
16
votes
2answers
1k views

Showing nice indentation of Python code

I use pythontex to typeset my Python listings. I'd like to have some kind of L-shaped lines, like the ones I added in the image below to clearly exhibit the indentation level of every line of code. ...
5
votes
0answers
2k views

Undefined Control Sequence with minted [closed]

For some reason, minted is giving me a "Undefined Control Sequence" error on every line that I used "\usepackage". I searched about it but I couldn't see an answer that fits me. The error: ! ...
3
votes
1answer
380 views

Anyone have experience with PythonTeX?

I have been trying to get PythonTeX working, but can't seem to solve the errors I'm getting. My current Minimum Broken Example is this: % !TEX TS-program = xelatex \documentclass{article} \...
7
votes
2answers
2k 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 ...
4
votes
1answer
1k views

Typeset colored terminal output using minted

I need to reproduce the output of a command in a LaTeX document. The command uses ANSI escape codes to produce colored output. I'd like to use minted, but using \inputminted{shell}{coloredoutput} ...
3
votes
1answer
809 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 ...
1
vote
1answer
973 views

pythontex on Ubuntu 14.04

After installing the package pythontex via latex pythontex.ins, I tried the following example to test it: \documentclass[10pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage{amsmath} \...
6
votes
0answers
2k 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, ...
3
votes
2answers
3k 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 Texmaker....
2
votes
1answer
4k 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} \usepackage{...
1
vote
1answer
332 views

Pygments/pythontex : how to disable red boxes around non usual characters?

Sometimes pygments puts characters in red boxes, and I'd like to disable this feature. In the following example: \documentclass[a4paper,10pt]{report} \usepackage[latin1]{inputenc} \usepackage[...