2022 Developer Survey is open! Take survey.

Questions tagged [pygments]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
30 views

Texmaker Minted Error: You must have pygmentize installed

I know there are a lot of similar questions out there, but sadly I wasn't able to solve my problem with any of the given answers. I am using Texmaker on a company owned Laptop running Windows 10. I ...
user avatar
0 votes
0 answers
40 views

Using minted package on specific devices

I have been using the minted package on my laptop and PC for many months without issue, but recently I reinstalled Python and it has broken the minted package on my PC. Tex files that compile ...
user avatar
0 votes
0 answers
52 views

Problem in writing Haskell Codes in Minted Package in Texstudio

I used this \documentclass[12pt]{article} \usepackage{minted} \begin{document} \begin{minted}{haskell} --type Stack a = [a] --push :: Stack a -> a -> Stack a --push xs x = x:xs --pop :: Stack ...
user avatar
0 votes
0 answers
33 views

minted stops working, no clear error [duplicate]

After a series of updates (Pygments, TeXLive, OS), minted stopped working. I can't spot any error in the log. On this input: %!TEX TS-options = -shell-escape \documentclass{article} \usepackage{...
user avatar
8 votes
3 answers
494 views

Minted ` \begin{minted}{...}` KO but `\inputminted` OK

Since a few days I can't color anymore python code with minted; I don't have any error message in the log file, only the minted output doesn't appear in the pdf file. On the other hand, everything ...
user avatar
  • 695
0 votes
0 answers
12 views

Is there a way to use pygtex files without rerunning pygmentize? [duplicate]

I have written a document describing a Python module and used minted with pygmentize. I have now hit an unexpected roadblock, as I need to hand control of the document to my company's publishing ...
user avatar
  • 197
1 vote
1 answer
57 views

Standalone with verbatim - highlighting code with pygments

Issue: The width of the generated pdf does not match the width of the code The Python package Pygments is used to generate a syntactically highlighted code in LaTeX format. As an example, the input ...
user avatar
  • 607
0 votes
0 answers
58 views

Minted language "text" doesn't obey to breaklines

I'm trying to render code inline using minted. Given that it can be any code, I'm using the text language. However, I've realized it doesn't obey to line breaks, as other language do. \documentclass[]{...
user avatar
  • 1,955
1 vote
2 answers
111 views

TeXworks: Minted cannot find file or directory

I cannot get minted running with TeXworks on Windows 10 and I dont know why... This is my .tex file: \documentclass{article} \usepackage{graphicx} \usepackage{minted} \begin{document} \begin{...
user avatar
1 vote
2 answers
102 views

minted and tcblisting give a strange error with pygments missing output

Ok so basically I am just trying to get some code shown in my document. I usually use windows but i have been trying to get latex to work properly on my debian install. I have created a minimal ...
user avatar
1 vote
1 answer
825 views

Error with minted and TeXMaker : You must have `pygmentize' installed to use this package

I have discover TeX and LaTeX recently, and I start to learn it to make math documents, but I need to write some source codes in Python3. I choose to use the package minted, but I have this error : !...
user avatar
  • 21
1 vote
0 answers
56 views

Set minted/pygments language as text if the language isn't supported

When I use minted/pygments to highlight code-blocks, if I have a code-block with plantuml language or org for Org-Mode in Emacs, the code-block becomes empty. Is it possible to tell minted/pygments to ...
user avatar
1 vote
0 answers
287 views

How do I convince MikTex that pygments is actually installed?

[This is a follow-up question to this question.] I am trying to use the minted package in MikTex to format the Python script. I am getting the error ! Package minted Error: You must have `pygmentize' ...
user avatar
5 votes
1 answer
209 views

pythontex not rendering pygments output under beamerswitch

The following beamer file compiles fine under the sequence pdflatex -shell-escape file pythontex file pdflatex -shell-escape file file.tex: \documentclass{beamer} \usepackage{pythontex} \begin{...
user avatar
  • 91.7k
0 votes
0 answers
144 views

Trouble using pygmentize as standard user in Windows

i have some problems with pygmentize. I know that there are already a few questions in this forum concerning pygmentize but i can't find a solution for my problem. I'm using Texmaker with Miktex as &...
user avatar
0 votes
1 answer
244 views

How to include minus and hyphen sign in colored python code lisiting?

The post: How to highlight Python syntax in LaTeX Listings \lstinputlistings command produced answer from redmode, that gives a colored python code listing. Although the text produces minus/hyphens in ...
user avatar
0 votes
0 answers
144 views

minted not finding pygments.sty after --shell-escape set

when I run pygmentize -V in my terminal I get Pygments version 2.3.1, (c) 2006-2017 by Georg Brandl. my Options -> Configure TexStudio -> Commands -> PdfLaTeX is set to pdflatex -synctex=1 -...
user avatar
2 votes
1 answer
113 views

Using the minted escapeinside option with the pycon lexer

What's going on here? \documentclass{article} \usepackage{minted} \begin{document} % I want to show the output as latex, this is a minimal repro without any output at all \begin{minted}[escapeinside=...
user avatar
  • 413
1 vote
1 answer
89 views

Can't show source code by using pygment to highlight code

I choose the package pygmentex to highlight my source code in LaTeX. I compile the test.texusing the following command: xelatex -shell-escape test.tex But it doesn't work, there is no code on the ...
user avatar
3 votes
1 answer
294 views

How to use escapeinside in a json file while using minted package

\documentclass{article} \usepackage{minted} \begin{document} This is a python \begin{minted}[escapeinside=||]{py} def f(x): y = x|\colorbox{green}{**}|2 return y \end{...
user avatar
1 vote
1 answer
144 views

Pythontex/Pygments : choose an other pygopt style for inline code \py{} \pyv{}

I'm using a mdframed environment in order to add a dark background to the pythontex environments pyverbatim, pyblock, pycode, etc.. The code is printed with the monokai style. For inline codes (...
user avatar
  • 695
0 votes
2 answers
228 views

Strange behaviour of tcolorbox using the minted library

So I've been loosing my mind over typesetting a document with some code examples. After a few days of investigations I was able to narrow down the issue. This is the preamble (edit: shorter code): \...
user avatar
  • 48
0 votes
0 answers
50 views

I am having problem to construct minted style listings with tcolorbox. Please help! [duplicate]

Here's my latex project on Overleaf.com and errors and logs: I created a .cls by loading the class file \LoadClass[12pt, a4paper]{book} And then I add some packages essential \RequirePackage[utf8]{...
user avatar
2 votes
2 answers
3k views

Pygmentize error while compiling with minted package

The pygment package has been placed in the python folder as well as in the scripts sub-folder within python folder; also added to the PATH; still getting error as below Request educate how to get ...
user avatar
  • 18.6k
0 votes
1 answer
129 views

Minted error for XML containing long lines

Sorry for the cross-posting if any. I'm trying to use minted to print the XML file. \title{My document} \author{Mr. World} \date{\today} \documentclass[a4paper, 12pt]{article} \usepackage[utf8]{...
user avatar
  • 103
1 vote
1 answer
2k views

Minted package :: Package minted Error: Missing Pygments output

My tags are follows: \documentclass[]{book} \usepackage[many,documentation]{tcolorbox} \tcbuselibrary{skins, breakable, minted} \usetikzlibrary{calc} \usepackage{minted} \usemintedstyle[jasonagent]{...
user avatar
  • 10.9k
0 votes
2 answers
829 views

How to solve the `pygmentize' Error in LaTex after installing pygments and minted on Mac OS

I am currently trying to resolve the issue of outputting my Python code in my LaTex document via the minted package. Originally, I ran into the issue of the "shell-escape flag" Error which, after ...
user avatar
0 votes
0 answers
503 views

Minted package on MacOSX

I am doing some troubleshooting on a Macbook Air (Linux user here) that has got an issue with running minted on MacOSX Mojave. I've been doing so successfully in Ubuntu, and never had any issues there....
user avatar
2 votes
1 answer
291 views

How do I avoid \PYG{err} in minted with pygments when using unicode/UTF-8 input?

Consider the following code: \documentclass{minimal} \usepackage[utf8x]{inputenc} \usepackage{minted} \usepackage{newunicodechar} \newunicodechar{→}{\ensuremath{\to}} \begin{document} \begin{minted}{...
user avatar
  • 2,013
3 votes
1 answer
6k views

TexStudio doesn't find the package "Pygments" although it is installed [duplicate]

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 ...
user avatar
  • 779
3 votes
1 answer
944 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....
user avatar
0 votes
0 answers
82 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 = ...
user avatar
2 votes
1 answer
1k 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 ...
user avatar
  • 695
0 votes
0 answers
828 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-...
user avatar
  • 518
14 votes
1 answer
16k 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() ...
user avatar
  • 241
1 vote
0 answers
2k 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 ...
user avatar
  • 141
4 votes
1 answer
3k 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 ...
user avatar
  • 2,603
0 votes
1 answer
1k 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, ...
user avatar
1 vote
1 answer
1k 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 `...
user avatar
2 votes
2 answers
195 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{...
user avatar
0 votes
1 answer
4k 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'...
user avatar
  • 133
1 vote
0 answers
445 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-...
user avatar
0 votes
1 answer
253 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....
user avatar
5 votes
1 answer
1k 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 ...
user avatar
  • 53.3k
4 votes
1 answer
8k 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} \...
user avatar
12 votes
1 answer
17k 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 ...
user avatar
  • 3,225
26 votes
1 answer
11k 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 ...
user avatar
  • 581
3 votes
0 answers
660 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 ...
user avatar
  • 1,491
4 votes
2 answers
5k 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: ...
user avatar
  • 3,347
4 votes
1 answer
1k 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 ...
user avatar