Skip to main content

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
28 views

XeLaTeX: fallback specifically for monospace

I'm using a package that ends up delegating to pygments for some code rendering. I use ≡ and ∈ as symbols within the code, which lmmono10-regular complains about not having. What can I add to the ...
Aly's user avatar
  • 111
1 vote
0 answers
41 views

Problem using minted option from tcbuselibrary

I'm still a newbie using LaTeX and I need to add a line of code in my document. For this, I use the library listings from the package tcolorbox. I always get the same error, so I put this example from ...
Michael Rosales Vilca's user avatar
0 votes
0 answers
83 views

Local LaTeX won't compile: Fatal error occurred, no output PDF file produced!

So after i've ran out of compile time in overleaf, i started to use pycharm with textify to create latex documents. However, when i run the code, i get this: Fatal error occurred, no output PDF file ...
Tim W's user avatar
  • 1
0 votes
1 answer
40 views

TeX compilers cannot find mathematica Pygments style

I am trying to compile a .tex file and typeset some Mathematica code using the minted package. I get the following error: (./out/_minted-thesis/mathematica.pygstyle)Could not find style module '...
Green05's user avatar
  • 141
1 vote
0 answers
184 views

! Package minted Error: You must have `pygmentize' installed to use this packag e. \begin{document}

How to fix this error please? ! Package minted Error: You must have `pygmentize' installed to use this packag e.\begin{document} I applied the answer of hpesoj626 in this question, but the same ...
ayla's user avatar
  • 183
3 votes
1 answer
44 views

Weird coloring with @ symbol (LaTeX Minted for Python)

The @ symbol is used by NumPy (a Python module) for matrix multiplication. I got a weird coloring when writing this in a LaTeX document using Minted: \documentclass{article} \usepackage{minted} \...
Héhéhé's user avatar
  • 131
1 vote
1 answer
153 views

Minted styling not working : no pygstyle file created

I want to start this post by telling that I already know the answer to the question. I just came here to post the solution I found so it hopefully helps someone without having to spend an hour ...
Allemand Instable's user avatar
0 votes
0 answers
40 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
224 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
23 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
4 votes
3 answers
9k 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
463 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
824 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
1 vote
0 answers
184 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
147 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
2k 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
  • 939
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
392 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
  • 667
1 vote
0 answers
275 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,107
1 vote
2 answers
527 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
293 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
  • 61
1 vote
0 answers
198 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
1 answer
883 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
310 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
  • 96.1k
0 votes
0 answers
333 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
460 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
645 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
212 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
  • 683
1 vote
1 answer
230 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
766 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
245 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
  • 939
0 votes
2 answers
401 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
9k 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
  • 21.4k
0 votes
1 answer
213 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
3k 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.9k
0 votes
2 answers
5k 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
842 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
488 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,169
5 votes
1 answer
9k 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
  • 925
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
118 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
  • 939
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
  • 548
22 votes
3 answers
27k 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
  • 321
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,835
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