[OS X TeX] Typesetting program code in LaTeX - what packages to use?
Herbert Schulz
herbs2 at mac.com
Wed Apr 9 12:25:00 EDT 2025
> On Apr 9, 2025, at 10:49 AM, Luís Sequeira <lfsequeira at gmail.com> wrote:
>
> Dear All
>
> Apologies for this question that is only tangentially mac related.
>
> I like the minted package to typeset Python or other code in LaTeX, it's straightforward to use,
> includes syntax coloring and looks beautiful.
>
> However, it does requires external programs and the --shell-escape option to typeset.
>
> There is no problem when using it for my own work in TeXShop, but I have students that use school computers where the software installation and modification is not easy, or possible.
>
> What alternatives can you recommend? The only one I could find is the old lstlistings package, but its output is downright ugly, and lacks syntax coloring (unless I'm missing something...).
>
> TIA
>
> Regards
>
> Luís Sequeira
Howdy,
For TeX Live 2025 the minted package supplies it's own script, latexminted, which has been added to the available apps in restricted shell-escape mode (the default mode with TL installed by MacTeX). Therefore you no longer need to use shell-escape with minted.
One note though: if you modified that list to add local apps to the list and installed that in /usr/local/texlive/texmf-home/web2c as texmf.cnf you may need to edit that file to match what's in /usr/local/texlive/2025/texmf-dist/web2c/texmf.cnf for that variable.
Good Luck,
Herb Schulz
herbs2 at mac.com
More information about the MacOSX-TeX
mailing list