Closed zapashcanon closed 2 years ago
minted
can't use any styles whose names contain characters besides a-z
,A-Z
, plus -
and _
. This ultimately goes back to the characters that LaTeX allows in (normal) macro names, plus a little customization. So the numbers in the style name are causing failures...I'm surprised this didn't result in an error message.
There is an existing issue (https://github.com/gpoore/minted/issues/294) that, when resolved, should fix this as well. I have no idea when that will be possible, however.
For now, your best option if you really need the alternate style is to create a custom copy with a name that doesn't involve numbers.
Thanks @gpoore, @jfbu and @muzimuzhi ! :)
Hi,
I'm running an up-to-date debian unstable. I installed base16-pygments by running
pip3 install pygments-base16
.When I try the following:
xelatex -shell-escape -halt-on-error main.tex
on this file :It produces a file with default minted color scheme. It doesn't use the specified
base16-onedark
.If I change the name to something that doesn't exist like
fjesfkljesklfjklesf
, I have a proper error:So, minted finds that my style exists but just seems to ignore it. So I asked myself : maybe the style is wrong ?
I tried to call pygments myself, using:
pygmentize -f html -O full,style=base16-onedark -l ocaml -o out.html code.ml
on this file:I checked the result with
xdg-open out.html
and the color scheme is the right one.OK, maybe minted is just ignoring all my styles ? So I changed the
\usemintedstyle{base16-onedark}
to\usemintedstyle{monokai}
(monokai is installed by default with pygment on my system) and this one is working.So for some reasons, minted knows that
base16-onedark
exists (otherwise it would fail saying it can't find it) but ignores it completely and I can't see why...Everything works fine with pygmentize so I believe the issue comes from minted. Do you have any clue ?
Cheers.