What is LaTeX?
LaTeX is a free multi-platform markup language for typesetting documents, allowing professional formatting of .tex files. The source code in the .tex files generates printable PDFs that comply with the editorial and typographical standards.
The TeX language was created in 1977 by Donald Knuth. LaTeX, created by Leslie Ramport in 1985, simplified TeX by including macro packages.
The structured documents in LaTeX are WYSIWYM (What You See Is What You Mean), unlike Microsoft Word, a WYSIWYG (What You See Is what You Get) word processor.
There are several types of files associated with LaTeX:
- .tex: LaTeX or TeX file that describes the structure and the presentation of the document;
- .bst: bibliographic style for in-text citations and bibliography (ex.: IEEEtran.bst);
- .bib: file (also called database) containing the bibliographic references;
- .sty: package (macro), containing extra LaTeX commands, which is loaded with \usepackage (ex.: ieeetrantools.sty);
- .cls: class, which controls the formatting of the document and is selected with \documentclass (ex.: ieeetran.cls, beamer: LaTeX class for creating slides and presentations, etc.).
See the Publishing a Thesis or Dissertation guide for templates, the Guide for Presenting Theses and Dissertations and for information on theses and dissertations by articles.
We recommend Overleaf, a very popular online no-installation-necessary LaTeX editor, which provides for sharing projects and collaborating.
To work locally and not online, users need to install an editor and a TeX distribution. We recommend the MiKTeX distribution, which includes:
⦁ TeXworks, a multi-platform text editor to create and compile .tex documents;
⦁ A program to install add-on packages;
⦁ A PDF reader. (If this one does not work well, try the free reader SumatraPDF.)
TeXworks interface is available in French and can be displayed with: Edit → Preferences ... → General → Local Interface: French.
To check the available packages in MiKTeX, click Start → Package Manager. To install other packages, select them and choose Task → Install.
If necessary, install additional packages (ex.: macros .sty). Consult the Comprehensive TeX Archive Network (CTAN), which includes over 6,500 packages.
Other TeX distributions and editors for Windows, Mac and Linux exist: WinEdt (which supports the "automatic translation", for example, from "é" to "\'e", and so the resulting LaTeX file is portable), Texmaker, TeXstudio, LyX, MacTeX, etc.
Do not use accents or spaces in the name of .tex files!
How to write some special symbols and accented letters:
Ex.: don\'ee; r\`eglement; \'Ecole; h\^opital; d\^iner; \`a faire; \`A Montr\'eal
(* The package inputenc: \usepackage[utf8]{inputenc} recognizes accented letters, so they can be typed directly: é, à, etc.)
Warning! Some packages can be incompatible with one another. Consult the documentation of each package you use.
For more information, consult the recommended books and websites.
Open MyDocument.tex to see a concrete example.
• Produce a reference list with references cited in the text
• Produce a bibliography including references that have not been cited in the text
For error messages and troubleshooting, consult LaTex and Friends (pp. 35-37), Overleaf - Errors and LaTeX/Errors and Warnings.
Example:
NOTE: MyDocument.tex and MyReferences.bib include many comments (%) that explain the command lines.
The two files can be used as templates for creating other .tex documents and .bib files in TeXworks with File → New from Template...