Questions tagged [pygments]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
47 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 &...
0
votes
0answers
23 views

Texmaker cannot find pygmentize when using minted package

This question has been asked a few times but I have tried all the solutions I could find. I have tried to do this on both windows and mac OS and I am having no luck. It worked on windows until my ...
0
votes
1answer
74 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 ...
0
votes
0answers
19 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 -...
0
votes
0answers
65 views

Package minted Error: Missing Pygments output; \inputminted was [\end{mycode}]

My Tex files are follow: \documentclass{article} \usepackage{geometry} \geometry{left=2.5cm,right=2.5cm,top=2.5cm,bottom=2.5cm} \usepackage[dvipsnames, svgnames]{xcolor} \usepackage[minted]{tcolorbox}...
2
votes
1answer
34 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=...
1
vote
1answer
27 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 ...
2
votes
1answer
76 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{...
1
vote
1answer
51 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 (...
0
votes
0answers
19 views

Editing highlighting rules for bash in the minted package

I use the minted package for syntax highlighting of bash scripts. I use texlive. I have some problems of the typeset output. Where can I find the rules for bash scripts? Are those in the Pygments ...
0
votes
2answers
100 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): \...
0
votes
0answers
44 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]{...
1
vote
2answers
705 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 ...
0
votes
1answer
68 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]{...
1
vote
1answer
1k 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]{...
0
votes
1answer
237 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 ...
0
votes
0answers
201 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....
2
votes
1answer
160 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}{...
2
votes
1answer
3k 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 ...
3
votes
1answer
544 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
65 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
617 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
493 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-...
7
votes
1answer
9k 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
1k 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 ...
4
votes
1answer
2k 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
939 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
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 `...
2
votes
2answers
163 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
3k 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
415 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
218 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....
5
votes
1answer
836 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 ...
3
votes
1answer
6k 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} \...
9
votes
1answer
13k 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 ...
22
votes
1answer
8k 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 ...
3
votes
0answers
510 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
4k 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: ...
4
votes
1answer
843 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
174 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
980 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
5k 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 ...
4
votes
2answers
10k 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 ...
7
votes
2answers
9k 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
189 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
2answers
800 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
2k 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. ...
8
votes
0answers
3k 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
602 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} \...