Skip to main content
To write a French document in LaTeX with pdfLaTeX, load \usepackage[T1]{fontenc} and \usepackage[french]{babel}. If you need system or OpenType fonts, switch to XeLaTeX or LuaLaTeX with fontspec and polyglossia. Both setups enable French hyphenation, localized headings such as Table des matières, French dates, and automatic nonbreaking space before high punctuation (:, ;, ?, !)—with a wider space before a colon than before ;, ?, or ! by default.

Minimal pdfLaTeX setup

LaTeX has read UTF-8 source files by default since the April 2018 release (older pdfLaTeX installations still need \usepackage[utf8]{inputenc}). Under pdfLaTeX, T1 font encoding gives accented letters their own glyphs so words containing them can be hyphenated, and babel selects French language rules.
pdflatex-french.tex
Ready to use this syntax? Continue in the browser editor when you want to adapt the example in a real project.Open LaTeX Cloud Studio
Use french as the babel option rather than older aliases like frenchb or francais. When a document mixes French and English, list the primary language last: \usepackage[english,french]{babel} makes French the default and lets you wrap English phrases in \foreignlanguage{english}{...}.

XeLaTeX and LuaLaTeX setup

Choose XeLaTeX or LuaLaTeX when you want OpenType fonts, direct Unicode handling, or cleaner copy-paste of ligatures like œ and æ. Do not load fontenc or inputenc with these engines; fontspec handles font encoding directly.
xelatex-french.tex
You can also use \usepackage[french]{babel} under XeLaTeX or LuaLaTeX instead of polyglossia if another package in your template expects babel hooks.

Accents, guillemets, and French typography

With UTF-8 input and T1 encoding (or fontspec), type French characters directly from your keyboard: é, è, ê, ë, à, â, ç, œ, ù, û, ô, ï. If you ever need ASCII fallback commands (for example inside a macro or on a non-French keyboard), use these: For French quotation marks (guillemets), load csquotes with autostyle=true and write \enquote{...}. It automatically picks French guillemets with the right non-breaking thin spaces when French is active, and switches style if you change languages. The babel-french module also provides \og ... \fg{} for guillemets and ordinal helpers like 1\ier{}, 2\ieme{}, and M\up{me}.
french-typography.tex
babel-french also changes itemize list markers to dashes (–) and adjusts spacing before a colon or semicolon automatically. If you want to customize those defaults, call \frenchsetup{...} in the preamble (for example \frenchsetup{StandardLists=true} to keep default bullet lists).

Common mistakes

  • Omitting \usepackage[T1]{fontenc} under pdfLaTeX: Without T1, TeX builds accented letters as composite glyphs from the 7-bit OT1 encoding. Words containing é, è, or ç stop hyphenating properly and copy-paste from the PDF breaks.
  • Active punctuation breaking TikZ or labels: Under pdfLaTeX, active high punctuation can conflict with TikZ syntax; load \usetikzlibrary{babel} to prevent it. For literal text that picks up unwanted spacing, wrap the affected text in a group with \NoAutoSpacing (for example {\NoAutoSpacing ...}).
  • Adding manual punctuation spacing: With the default babel-french settings, type mot : or mot: and let the package handle the nonbreaking space automatically.

In LaTeX Cloud Studio

LaTeX Cloud Studio compiles with TeX Live 2026 and defaults each project’s LaTeX Engine setting to Auto (Recommended). With Auto selected, LaTeX Cloud Studio starts the examples above with pdfLaTeX or XeLaTeX, as labeled. Preinstalled fonts include TeX Gyre Termes, TeX Gyre Pagella, Liberation Serif, DejaVu Serif, CMU Serif, and Noto Serif. If your French template relies on a commercial or institution-specific font outside that set, upload the .ttf or .otf files into your project and load them with fontspec. Ready to write a French document in the browser? Start from the Basic Article template in LaTeX Cloud Studio and replace main.tex with whichever complete example above fits your setup.