# Examples — Popular

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

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
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
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
A longtable example
An example using the longtable environment to create tables that span multiple pages.
LianTze Lim
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
Nice-looking, fresh template for student's assignments, oriented on electrical engineering. Enjoy!
Igor Shevtsov
Package Example: wrapfig
Here we present a short example of how to use the 'wrapfig' package to automatically wrap text around a figure (including the figure caption). The example shows left and right aligned figures with wrapped text, and is available to open as a template if you want to try it for yourself.
Overleaf / WriteLaTeX
Gantt Charts with the pgfgantt Package
These examples show how to make Gantt charts for project planning in LaTeX with the pgfgantt package. They are from the package documentation. The pgfgantt package provides many useful macros for generating the calendar for the Gantt chart for either absolute or relative dates. It also provides macros for grouping and linking tasks, and for full control over the styling of the chart.
Wolfgang Skala
A simple example showing how to create Harvard style referencing in LaTeX
The following examples show how to produce Harvard style references using biblatex. See this post on TeX StackExchange for further discussion on the Harvard referencing style, and this post for more details on switching to biblatex if you're more familiar with e.g. natbib.
John Hammersley