Questions tagged [pygments]

{pygments} is about questions related to Pygments, a generic syntax highlighter suitable for use in code hosting, forums, wikis or other applications that need to prettify source code.

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

(minted) pygtex file contents being output to PDF instead of formatted source code?

When I compile my tex doc, instead of getting correctly formatted code, I get what appears to be the contents of the *.pygtex files in the _minted-* folder. There are no errors with compiling. I am ...
41d3n's user avatar
  • 1
1 vote
1 answer
48 views

Error With LaTeX (TeXStudio) Package "Pygmentize"

After downloading the Minted and Pygmentize packages for TeXstudio, I am experiencing an error: File 'pygmentize.sty' not found. \begin. Here is the code for my document so far: \documentclass{...
mandjelo's user avatar
0 votes
0 answers
22 views

Minted does not detect functions and methods declared in other files

I am working with minted to make a C Language book. Functions declared after keyword void are correctly identified and styled. When I am calling functions from other files it classifies them as ...
user avatar
1 vote
2 answers
1k views

Package minted Error: You must have `pygmentize' installed to use this package, while Pygments is already installed?

Installed MacTex2023 on a new Mac and all is well except for a nagging issue with "pygmentize" that I've already installed. I cannot find how to adjust system to recognise the installed &...
RosesBouquet's user avatar
0 votes
0 answers
80 views

Pygment for minted code listings in LyX

I just installed the pygments python module to use the minted highlighting in LyX. But LyX keeps showing that driver not found, and askes me to visit a fishy site.
kobaltishblue_312's user avatar
0 votes
0 answers
232 views

Can't use minted package in TexStudio

What I get in TexStudio: My terminal setup: TexStudio command line arguments are st up: PC: MacBook Air M2, OS: Ventura 13.0.1 How to make minted work?
Vladyslav Rehan's user avatar
0 votes
0 answers
504 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 ...
ZtormTheCat's user avatar
0 votes
0 answers
141 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 ...
ShadyNotes's user avatar
0 votes
0 answers
125 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 ...
Soham Chatterjee's user avatar
0 votes
0 answers
35 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{...
Michel Charpentier's user avatar
8 votes
3 answers
1k 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 ...
jowe_19's user avatar
  • 805
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 ...
ramzeek's user avatar
  • 197
1 vote
1 answer
285 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 ...
John's user avatar
  • 627
1 vote
0 answers
238 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[]{...
3isenHeim's user avatar
  • 2,097
1 vote
2 answers
396 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{...
MichaelS's user avatar
1 vote
2 answers
215 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 ...
Ruben deV's user avatar
3 votes
1 answer
3k views

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

I discovered TeX and LaTeX recently, and I started to learn how to make math documents, but I need to write some source codes in Python3. So I choose to use the package minted, but I got this error: !...
lefaba's user avatar
  • 51
1 vote
0 answers
151 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 ...
Vasco Ferreira's user avatar
1 vote
0 answers
629 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' ...
Martin V's user avatar
6 votes
1 answer
291 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{...
Andrew Swann's user avatar
  • 94.8k
0 votes
0 answers
291 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 &...
Domi1908's user avatar
0 votes
1 answer
422 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 ...
Brendan Darrer's user avatar
0 votes
0 answers
428 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 -...
Jonas Grønbek's user avatar
2 votes
1 answer
183 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=...
Eric's user avatar
  • 507
1 vote
1 answer
187 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 ...
Kelin He's user avatar
3 votes
1 answer
610 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{...
Yinzhe Chen's user avatar
1 vote
1 answer
212 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 (...
jowe_19's user avatar
  • 805
0 votes
2 answers
320 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): \...
m.dec's user avatar
  • 48
0 votes
0 answers
51 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]{...
Zizheng Yang's user avatar
2 votes
2 answers
8k 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 ...
js bibra's user avatar
  • 20.2k
0 votes
1 answer
205 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]{...
jujuBee's 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]{...
MadyYuvi's user avatar
  • 13.2k
0 votes
2 answers
3k 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 ...
Put1demerde's user avatar
0 votes
0 answers
752 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....
schrodingerscat's user avatar
2 votes
1 answer
423 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}{...
Jason Gross's user avatar
  • 2,085
5 votes
1 answer
8k 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 ...
ecjb's user avatar
  • 873
3 votes
1 answer
1k 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....
Adam Williams's user avatar
0 votes
0 answers
113 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 = ...
susliks2's 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 ...
jowe_19's user avatar
  • 805
0 votes
0 answers
1k 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-...
Encipher's user avatar
  • 518
18 votes
3 answers
23k views

Package minted Error: Missing Pygments output

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() ...
BlackBear's user avatar
  • 281
1 vote
0 answers
3k 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 ...
A. Kali's user avatar
  • 141
4 votes
2 answers
5k 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 ...
kexxcream's user avatar
  • 2,765
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, ...
Jules Randolph's 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 `...
Christian Lorenz's user avatar
2 votes
2 answers
231 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{...
jbroedel's 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'...
sovon's user avatar
  • 133
1 vote
0 answers
484 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-...
Revolucion for Monica's user avatar
0 votes
1 answer
305 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....
Amir Qasemi's user avatar
6 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 ...
Tobi's user avatar
  • 55.6k