Skip to Main Content

Formulaire de recherche

BibTeX

Presentation

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.

Why LaTeX? Click here.

Types of files

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.).

Dissertation and Thesis Templates @ Polytechnique

Using a template is mandatory! Read it carefully before you start writing!
A template is a style sheet that greatly facilitates your work and ensures that Polytechnique publication requirements are followed.

Note: If you are writing a dissertation or a thesis by articles in French, which includes articles in English, use the Word template in French.

MS-Word Template in English (last updated February 13, 2023**)
MS-Word Template in French (last updated February 13, 2023**)
**When the documents based on the previous January 20, 2023 templates were saved as PDFs, the Table of Contents was not complete.
      ▸ 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 August 18, 2023)
      ▸ If you started writing your thesis or dissertation using the 2019 or 2022 versions of the LaTeX template, copy your text into the latest template.

      ▸ The document to compile in the template is Document.tex!

In Overleaf, make Document.tex the Main document under Menu, if it is not already this way:

Guides

Are you about to start writing your thesis or dissertation?

Consult the Graduate Studies' Thesis and Dissertation page and these guides:

NOTE: The guide in French is up to date, whereas the guide in English will be updated soon. Presently, the examples of title pages in the guide in English are outdated. See the "Mandatory Title Pages" box in this guide for up-to-date title pages.

Online resources

Books

Installation

Microsoft users need to minimally install a TeX 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 Com­pre­hen­sive TeX Archive Net­work (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.

Create .TeX documents

Do not use accents or spaces in the name of .tex files!

How to write some special symbols and accented letters:

  • uppercase letters: {IEEE}
  • nonbreak space: ~\cite{Thornton2012}
  • French accents: \accentletter *

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.

Create a reference list or a bibliography

Note: Open MyDocument.tex to see a concrete example (see next box).

To produce a reference list with references cited in the text:

  • Include the references in a .bib file (see BibTeX → Entry Types and Required Fields and Recommendations for .bib Files);
  • Cite references in your .tex document with \cite{BibTeX_key} (e.g., \cite{Brydson1999});
  • Choose the reference list style with \bibliographystyle{name_of_style} (e.g., \bibliographystyle{IEEEtran});
  • Specify the name of the .bib file that contains the references cited in the .tex file with \bibliography{name_of_.bib_file} (e.g., \bibliography{References}; see MyDocument.tex for more information on the \bibliography command);
  • Compile the .tex file by following the steps in the Compilation box below.

To produce a bibliography including references that have not been cited in the text:

  • Include all these references in a .bib file (see BibTeX → Entry Types and Required Fields and Recommendations for .bib files);
  • Cite references in your .tex document with \cite{BibTeX_key} (e.g., \cite{Brydson1999});
  • Choose the bibliography style with \bibliographystyle{name_of_style} (e.g., \bibliographystyle{IEEEtran});
  • Specify the name of the .bib file that contains these references with \bibliography{name_of_.bib_file} (e.g., \bibliography{References}; see MyDocument.tex for more information on the \bibliography command);
  • Use \nocite{*} for a bibliography that will comprise all references in the .bib file, even those that have not been cited in the text;
  • Compile the .tex file by following the steps in the Compilation box below.

Sample files that can be used to practice creating a reference list or bibliography

Example:

  • Download the files MyIEEEabrvconf.bib and MyIEEEfullconf.bib in the same folder. (For more information about these files, refer to the box IEEE Abreviations for Conferences under the BibTeX tab.);
  • Open MonDocument.tex in TeXworks;
  • Compile it following the steps described in the Compilation box below and the file MonDocument.pdf, including a reference list, will be created.

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...

Compilation

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:

  1. pdfLaTeX to create the .aux file;
  2. BibTeX to link the .bib file containing the references and the bibliographic style .bst with the .aux file and produce the .bbl file;
  3. pdfLaTeX to format the bibliography;
  4. pdfLaTeX to properly display the bibliography.

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 Overleaf - Errors and LaTeX/Errors and Warnings.

Follow the Library on... Facebook Instagram YouTube LinkedIn
Ask a question