• About
    • Cookie Policy
  • Code Snippets
    • Beamer (presentation)
    • Figures
    • Lists
    • Standard classes
    • Tables
  • Consulting
  • LaTeX Installation
  • Posting Questions
  • TeX/LaTeX Resources

texblog

because LaTeX matters

lstset

LaTeX syntax highlighting examples

11. June 2011 by tom 15 Comments

Syntax highlighting in LaTeX using the listings package is very powerful. Below, I will provide a few examples for your convenience. First, let me briefly summarize the usage of the listings package. So below you’ll find a few complete code examples to reuse and modify for your purposes: “The Pseudo Code Box” This code was … [Read more…]

Share this:

  • Twitter
  • Facebook
  • Reddit
  • LinkedIn
  • Skype
  • Email

Like this:

Like Loading...
Posted in: LaTeX, Package, Tips & tricks Tagged: backgroundcolor, caption, code, color, commentstyle, definecolor, java, keywordstyle, language, LaTeX, listings, lstinputlisting, lstset, otherkeywords, stringstyle, syntax highlighting, usepackage




Join 6,532 other subscribers

Consulting

Need help with your thesis or book project? Let’s discuss.

doi2bib




Top Posts & Pages

  • Changing the font size in LaTeX
  • Multi-column and multi-row cells in LaTeX tables
  • Normal text in math mode
  • Control the width of table columns (tabular) in LaTeX
  • Number sets (prime, natural, integer, rational, real and complex) in LaTeX

Tags

addcontentsline array article bibliography Bibtex & biblatex book caption chapter citation cite code color definecolor description documentclass draft enumerate equation fancyhdr figure graphicx hyperref includegraphics item itemize label landscape LaTeX letter listoffigures listoftables math minipage reference renewcommand report section subfigure table tableofcontent tabular text TikZ usepackage xcolor

Copyright © 2021 texblog.

Omega Child WordPress Theme by ThemeHall

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.
%d bloggers like this:
    This site uses cookies: Find out more.