Questions tagged [pygmentize]
14 questions
6
votes
2 answers
How to syntax highlight a bash output (some help information)?
Very often I get some help information with the --help flag of a command, which gives the output at the terminal like:
$ vmtkimagereader --help
Creating vmtkImageReader instance.
Automatic piping vmtkimagereader
Parsing options…

purplezzh
- 97
- 2
- 9
3
votes
1 answer
"pygmentize: command not found" Even though I already installed pygments on my system
I tried installing pygments on Debian 9 using both apt-get install python3-pygments and pip install Pygments but no method makes it work on the command line.
My suspicion is that my PATH doesn't contain the path of the installations. I added…

Laraconda
- 667
- 6
- 15
3
votes
0 answers
LaTeX minted package not working with `\begin{minted}` anymore on win10?
I've been using minted without any problem for years.
I'm an Windows 10 and MacOS.
Here's a minimal example compiled with xelatex:
\documentclass{article}
\usepackage{unicode-math}
\usepackage{minted}
Hi…

UGLi
- 71
- 4
2
votes
1 answer
Python pygmentize ignores style options
I'm trying to syntax highlight Python 3 code with the pygments pygmentize command line program, but it just ignores all the style options. I have tried the following:
pygmentize -S colorful -l python3 e:\work\Python\repl.py
pygmentize -O…

Superdooperhero
- 7,584
- 19
- 83
- 138
2
votes
0 answers
Indentation marks for Python with Pygments TeX formatter
This is a followup of a question of mine at tex.se that got an answer at TeX level.
I use pygments to typeset in TeX my Python code listings. I'd like to have some kind of L-shaped lines, like the ones I added in the image below to clearly exhibit…

cjorssen
- 877
- 2
- 7
- 22
1
vote
1 answer
Why is neither the executable nor its launcher script found despite being added to PATH
I followed the instruction to install pygmentize in order to use syntax highlight in Latex environment, however TexMaker always produces an error says pygmentize is not found. I then tested to run the .cmd file itself using command prompt and the…

roxrook
- 13,511
- 40
- 107
- 156
1
vote
0 answers
Highlight custom language on MediaWiki page
My goal is add syntax highlighting for a custom language on my wiki page. In order to do that, I installed Pygments and added my own lexer file (mylexer.py). Since I don't want to pull request the lexer and wait for it to be merged, how do I edit…

user3701929
- 11
- 1
1
vote
1 answer
Set the html fontsize in `pygmentize`, the command line tool of `pygments`
I'm trying to convert a python file into an html file using pygments via the command line tool pygmentize with the following command:
pygmentize -f html -O full -O linenos=1 out_file.html in_file.py
Unfortunately, the default fontsize is too small…

NewNewton
- 1,015
- 1
- 10
- 22
1
vote
0 answers
How to get pygmentize CLI to use the Python3 lexers?
I'm having a problem debugging and issue lexing of a language using Python3 and pygments. I had the setup working with Python2 but failing to combine it correctly for Python3.
MY primary question is how do I get the CLI pygmentize to use the Python3…

edA-qa mort-ora-y
- 30,295
- 39
- 137
- 267
1
vote
1 answer
Code syntax highlighting in my Rails 4.0.4 app using Redcarpet & Pygments.rb?
The objective
I am trying to render markdown documentation with snippets of code in it, and I'd like to highlight the syntax like on Github or BitBucket.
My Environment
Rails 4.0.4
Ruby 2.1.1
In my gemfile
gem 'haml-rails'
gem 'redcarpet' #…

zabumba
- 12,172
- 16
- 72
- 129
0
votes
1 answer
How to install the pygmentize module on Python 3.3.6
I'm trying to install the pygmentize module on a Windows XP computer which uses Python 3.3.6 (Sep 29th, 2012)
When I did pip install pygmentize it returned windows XP Fatal error in launcher: Unable to create process so I've applied this solution…

Terry
- 1,206
- 1
- 10
- 26
0
votes
1 answer
using alias ccat='pygmentize -g -O style=colorful,linenos=1' with line numbers
I'm using this alias to color my cat results. However, I want to add line numbers to the output, but using ccat -n is not working.
I can achieve it by ccat | cat -n but I can't create an alias for that (I expect an alias such…

CIsForCookies
- 12,097
- 11
- 59
- 124
0
votes
1 answer
Associate additional extension with existing lexer
Is there an easy way to add a filename and/or extension for existing lexer in pygments? I don't want to write or subclass existing one, as the language is the same, but the file has different extension/name.
I've tried to hack it and add it to the…

grundic
- 4,641
- 3
- 31
- 47
0
votes
0 answers
Use IOSTREAM instread of file in Pygmentize
I have following in my Python script:
What I try to do is
read a partial source code(e.g. line 20 to line 40) to buffer and pip/apply the IOSTREAM to pygmentize so that I can generate code highlighting for the partial source code.(e.g. line 20 to…

elliptic00
- 427
- 4
- 13