# Examples — Popular

Examples of powerful LaTeX packages and techniques in use — a great way to learn LaTeX by example. Search or browse below.

Example of rotated text in LaTeX
A minimal example of rotated text in LaTeX. All you need is \usepackage{rotating} in the preamble, and \begin{turn}{45} ... \end{turn} around the text you wish to rotate (in this case, by an angle of 45 degrees). This example was originally posted at: http://texblog.org/2013/10/01/rotate-an-image-table-or-paragraph-in-latex/
Tom at TeXblog
Pictures
Pictures
AlgThink_LaTeX_Test_1
Test LaTeX file for the Rice University / Coursera Algorithmic Thinking (Part 1).
Bob R
algorithmicx (algpseudocode) example
An example using the predefined algpseudocode command set from the algorithmicx package, for typesetting pseudocode or algorithms.
LianTze Lim
Drawing coloured boxes using tcolorbox
The pack­age pro­vides an en­vi­ron­ment for coloured and framed text boxes with a head­ing line. Op­tion­ally, such a box may be split in an up­per and a lower part; thus the pack­age may be used for the set­ting of LaTeX ex­am­ples where one part of the box dis­plays the source code and the other part shows the out­put. Another com­mon use case is the set­ting of the­o­rems. The pack­age sup­ports sav­ing and reuse of source code and text parts.
Thomas F. Sturm (uploaded by LianTze Lim)
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.
Overleaf
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&gt;
LianTze Lim (using sample text from slashbox.tex)
Multiple Bibliographies with multibib
Example creating multiple bibliography/reference lists in the same document, using the multibib package.
LianTze Lim
Listings Code Style for HTML5 (CSS, HTML, JavaScript)
This example shows how to use the listings package to syntax highlight code in LaTeX. It highlights multiple languages: CSS, HTML and JavaScript. This example is being developed collaboratively in response to this question on the TeX StackExchange. Improvements welcome!
Benny Neugebauer and the TeX StackExchange Community