1

I am using the VSCode Extension LaTeX Workshop v8.4.2 in Docker with the tianon/latex image. I am trying to use the minted package for some source code highlighting, however during compilation I'll get a build error:

I did some research an apparently there is a file where I can add the --shell-escape flag, I was not able to find that file tho. Can someone guide me on how I can fix the error? Or, alternatively, is there a better docker image that already has all these packages included, which might save me some headache?

EDIT: I got rid of the --shell-escape flag error by modifying the settings.json file as described here. However I still can't seem to properly install pygmentize, the log still tells me it is not installed. I have it installed on my local machine, however I assume it has to be installed in the docker container somehow. How can I do this?

2
  • Apparently I got rid of the --shell-escape flag error by modifying the settings.json file. However I still have the pygmentize error.
    – Kyu96
    Commented Dec 11, 2019 at 22:01
  • @DavidCarlisle Fixed.
    – Kyu96
    Commented Dec 12, 2019 at 0:37

1 Answer 1

1

I solved it. First I created a custom docker image, based on tianon/latex, but with pygmentize installed.

Dockerfile:

FROM tianon/latex
LABEL description="Modded tianon"
RUN apt-get update -y && \
    apt-get install -y python-pygments && \
    rm -rf /var/lib/apt/lists/*

After building, I added that image in the LaTeX workshop. Then it worked fine.

Note: After changing the docker image from latex/tianon to my custom one, the settings.json file got reset, so I had to add the --shell-execute flag again, as described in the post linked above.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .