Examples — Popular

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

Euclid's algorithm: An example of how to write algorithms in LaTeX
Euclid's algorithm: An example of how to write algorithms in LaTeX
Euclid's algorithm written out using the algorithmic environment in LaTeX.
John Hammersley
Quadratic Function
Quadratic Function
A leaflet created for a Math class that I conduct during this term.
Maciej
A short example presentation on molecules / molecular chemistry in LaTeX
A short example presentation on molecules / molecular chemistry in LaTeX
This example shows how a striking chemistry presentation can be created with a few simple LaTeX commands. I've used two great chemistry packages that are freely available for LaTeX: mhchem and Chemfig to create the diagrams.
John Hammersley
Brown University Letterhead - Example Letter
Brown University Letterhead - Example Letter
This is an example letter to illustrate the use of the brownletter.cls LaTeX class file. Copyright 2003, (tatbul@cs.brown.edu) For more Brown University LaTeX resources, please see: http://cs.brown.edu/about/system/managed/latex/
Nesime Tatbul
Bibliographies with biber and biblatex
Bibliographies with biber and biblatex
This example shows how to automatically generate citations and a bibliography with biblatex and biber. Biblatex and biber work together to automatically format references and citations like the older cite or natbib and bibtex tool chain, but they offer more powerful and easier to use formatting and better support for special characters (unicode). For a full list of biblatex styles, see the user guide in the biblatex manual.
writeLaTeX
A longtable example
A longtable example
An example using the longtable environment to create tables that span multiple pages.
LianTze Lim
Syntax Highlighting in LaTeX with the listings Package
Syntax Highlighting in LaTeX with the listings Package
This example shows how to set the options for automatic syntax highlighting for code in LaTeX with the listings package (which provides the lstlisting environment). The listings package supports many languages, including Java, C, C++, MATLAB/Octave and Python, and you can set the language option globally with \lstset or for each listing, when you have listings in multiple languages.
writeLaTeX
LaTeX Bibliography Example: The natbib Package
LaTeX Bibliography Example: The natbib Package
The natbib package provides automatic numbering, sorting and formatting of in text citations and bibliographic references in LaTeX. It supports both numeric and author-year citation styles. The natbib package is the most commonly used package for handling references in LaTeX, and it is very functional, but the more modern biblatex package is also worth a look.
writeLaTeX
Introduction to Electrical Engineering - example assignment template
Introduction to Electrical Engineering - example assignment template
Nice-looking, fresh template for student's assignments, oriented on electrical engineering. Enjoy!
Igor Shevtsov