![]() ![]() You've probably seen pygments in action already. It uses the pygments project to parse and highlight. Moving beyond its predefined scopes (or easily discoverable internet styles) is a challenge, though, because parsing and tokenizing code in LaTeX is just about as hard and ridiculous as it sounds. You can define new languages yourself, add different keywords, and style to your heart's content. ![]() Out the box, it supports a broad range of languages. The next step up (or rather many steps up) is the listings package. Its ease of use comes at the cost of basically all the context clues well-formatted and styled code can provide. It's quick, it preserves formatting, and it requires no set up. The easiest way to present code in LaTeX is to use the verbatim environment. You can view the code related to this post under the post-01-overview tag. The post provides a few examples of things you can do with minted, details the installation process, and covers some basic security. Adding pygments to LaTeX streamlines so many things. This post serves as an introduction to minted, a pygments-based syntax highlighter for LaTeX.
0 Comments
Leave a Reply. |