Examples of powerful LaTeX packages and techniques in use — a great way to learn LaTeX by example. Search or browse below.
Drawing coloured boxes using tcolorbox
The package provides an environment for coloured and framed text boxes with a heading line. Optionally, such a box may be split in an upper and a lower part; thus the package may be used for the setting of LaTeX examples where one part of the box displays the source code and the other part shows the output. Another common use case is the setting of theorems. The package supports saving and reuse of source code and text parts.
Thomas F. Sturm (uploaded by LianTze Lim)
Test LaTeX file for the Rice University / Coursera Algorithmic Thinking (Part 1).
This example is being developed collaboratively in response to this question on the TeX StackExchange. Improvements welcome!
Benny Neugebauer and the TeX StackExchange Community
Source Code Highlighting with Minted in LaTeX
The minted package provides automatic syntax highlighting for source code listings. It uses the excellent pygments highlighter, which provides very high quality highlighting for a wide range of languages.
This example also shows how you can use minted to typeset LaTeX math embedded in your source code.
Package Example: apacite
This example shows how to load and use the apacite package. The apacite package uses LaTeX and BibTeX to generate citations and a reference list, formatted according to the rules of the American Psychological Association.
Table cells with diagonal lines
This example demonstrates how to produce diagonal lines in table cells using the slashbox and diagbox packages.
The diagonal line produced by the slashbox package is rather jagged and unwieldy.
The diagbox package does a better job in general.
Try loading only one of these packages to see
the difference — if diagbox is loaded at all,
it overrides slashbox's behavior./p>
LianTze Lim (using sample text from slashbox.tex)