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.).
Using a template is mandatory!
A template is a style sheet that greatly facilitates your work and ensures that Polytechnique publication requirements are followed.
• MS-Word Template in English (last updated March 4, 2019)
• MS-Word Template in French (last updated March 4, 2019)
▸ Comment télécharger et appliquer une feuille de style / How to Download and Apply a Template (français + English)
• Bilingual LaTeX Template (last updated March 13, 2019)
▸ Polytechnique does not provide an APA style in French for LaTeX, so we recommend that you use the IEEE style in French, which is included in this template.
▸ This template is not compatible with the subcaption package. Use subfigure (see 1 and 2).
▸ If you started writing your dissertation or thesis using an old version of the template:
▸ Use the new Document.tex;
▸ Replace the old IEEEtran-francais.bst and MemoireThese.sty files with the new ones;
▸ Modify the definition of the jury in 0-Definitions_Etudiant.tex according to the new template;
▸ Write the titles of appendices in 9-Annexes.tex in lowercase letters.
Are you about to start writing your thesis or dissertation?
Consult the Graduate Studies' Thesis and Dissertation page and these guides:
NOTE: These guides will be updated soon. See the updated title pages in the box "Examples".
* When a Call Number is displayed, the library also has a print copy of the document.
Microsoft users need to minimally install a TeX editor and a TeX distribution.
We recommend the MiKTeX distribution (the current version is 2.9), which includes:
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,000 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.
Note: Open MyDocument.tex to see a concrete example (see next box).
To produce a reference list with references cited in the text:
To produce a bibliography including references that have not been cited in the text:
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...
Note: The compilation steps may be different if you use another TeX editor.
To transform a .tex file open in TeXworks in a PDF document, it should be compiled successively with:
If you make changes and you need to compile the .tex file again, first delete all the auxiliary files created during the previous compilation: .aux, .bbl, .blg, .log, .out, .pdf, .synctex.gz.
If there are compilation errors related to the .sty packages, copy these packages in the directory where the LaTeX document is located.
For error messages and troubleshooting, consult section 1.12 (pages 35-37) of LaTex and Friends and the sections The Joy of TeX errors and LaTeX/Errors and Warnings.