luong-komorebi / Begin-Latex-in-minutes

📜 Brief Intro to LaTeX for beginners that helps you use LaTeX with ease.
https://luong-komorebi.github.io/Begin-Latex-in-minutes/
3.28k stars 272 forks source link

Suggestion: look at minted for code listings #12

Closed mbaz closed 7 years ago

mbaz commented 7 years ago

IMHO minted is much better than lstlistings for code: https://www.ctan.org/tex-archive/macros/latex/contrib/minted/

luong-komorebi commented 7 years ago

Thank you for your suggestion. I will try it then update the guide if possible. Until then I will leave this issue open ;)

vermiculus commented 7 years ago

As a general rule, packages that use external tools (gnuplot is another example) are generally faster and easier to use, but the initial setup can be intimidating.

There are sometimes integration problems as well (as is the case with gnuplot and font integration).

Minted leverages the Python package Pygments to do its syntax analysis and highlighting. Believe it or not, LaTeX is not cut out for this job (even though the listings package is impressive, stable, and time-tested).