- Combine
<=
to ≤
- All languages
- listings vs minted
- in table
- text copyable
- lines numbers not are not selectable
- verbatimn without escape characters ⇒ portable, copyable
Syntax
- ⟨global style⟩: configure all code snippets
- ⟨code language⟩: configure language for code highlighting
- ⟨inline source code⟩: verbatim code to be printed within text
- ⟨block source code⟩: verbatim code to be printed as a tile
- ⟨file with source code⟩: relative path of the file to be printed
- [p] minimal formatting information when creating the snippet; style definitions are moved to the preamble
- [p] the code is independent of the project: no user-defined macros; clearly shows which package highlights the code
Input code from file, block, or inline
Layouts
dots, colorful
Longcode split
Documentation
Latex code
code in table
Supported languages
Create custom language
Multiple languages
Examples
Add inline code within a paragraph.
Create a code block
Print a source file’s content
Add a snippet caption and a label for cross references
Add custom styling
Use key-value pairs to configure code snippets of the listings package
Styling setup
Manually add the file yetenol-styles.sty
Alternatives
Create an abbreviation macro for \lstinline
Deprecated latex listings
Sources:
Related:
Tags:
Graphical elements - Standardize tables, images, plots