fontenc, inputenc, fontspec and font packages
inputenc and fontenc are not needed and are accepted without effect, since the source is always read as UTF-8. In ordinary documents, fonts are fixed to Latin Modern and New Computer Modern Math: fontspec's \setmainfont and packages such as times or libertine are ignored, and only a switch to sans serif with \familydefault (optionally with helvet) works.
What the packages do
inputenctells pdfLaTeX how the source file is encoded.\usepackage[utf8]{inputenc}was needed for typed accents before 2018; current LaTeX reads UTF-8 by default.fontencpicks the font encoding.\usepackage[T1]{fontenc}gives pdfLaTeX fonts with accented letters built in, which improves hyphenation and copying text from the PDF.fontspec(XeLaTeX and LuaLaTeX) loads any installed OpenType font:\setmainfont{...},\setsansfont{...},\setmonofont{...},\newfontfamily.- Font packages such as
lmodern,times,mathptmx,helvet,libertineornewtxtextswitch pdfLaTeX documents to another typeface.
What works here
| Feature | In Scissor LaTeX | Notes |
|---|---|---|
| UTF-8 source with ä, é, ł, Greek, Cyrillic, CJK ... | Works | Always, with or without inputenc. |
\usepackage[utf8]{inputenc}, \usepackage[T1]{fontenc}, lmodern | Left out | Accepted; nothing to do. |
\renewcommand{\familydefault}{\sfdefault} | Works | Body text in Latin Modern Sans. |
helvet or tgheros with the line above | Works | Sans serif in TeX Gyre Heros, a Helvetica look-alike. |
sfmath | Works | Formulas in sans serif. |
\texttt{...}, \ttfamily | Works | Latin Modern Mono. |
\textbf, \textit, \emph | Works | |
\textsc{...} | Partly | In the default Latin Modern font, normal letters. With helvet and in the conference layouts (except LNCS, which uses Latin Modern), real small capitals. |
\textsf{...}, \sffamily inside the text | Left out | The text stays serif. |
fontspec: \setmainfont, \setsansfont, \setmonofont | Left out | Accepted in the preamble, no effect. |
\newfontfamily\name{Font} | Not supported | Skipped with a message, and the font name is printed. |
times, mathptmx, palatino, libertine, newtxtext, charter ... | Left out | The text stays in Latin Modern. |
\fontsize{14}{16}\selectfont | Works | The nearest of the common sizes from 5 to 144 pt; the line spacing follows the size. |
\fontfamily{...}\selectfont | Left out | No message; the text keeps its font. |
\small, \large, \Huge ... | Works | Outside the conference and journal layouts, which keep their own sizes. |
unicode-math: \setmathfont | Left out | The math font stays New Computer Modern Math. |
unicode-math: \symbf, \symit in a formula | Not supported | The formula is shown in red. Use \mathbf, \boldsymbol or bm. |
The body font size comes from the class option (10pt, 11pt or 12pt); see Page layout.
Examples
The preamble lines many documents start with are accepted and change nothing; typed accents work either way:
inputenc, fontenc and lmodern are accepted
\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\begin{document}
Hans Mustermann bestellt Crème brûlée, Smørrebrød und Pierogi z
kapustą. \texttt{Monospaced}, \textbf{bold} and \textit{italic}
work as usual.
\end{document}fontspec loads without errors, but the text stays in Latin Modern:
\setmainfont has no effect
\documentclass{article}
\usepackage{fontspec}
\setmainfont{TeX Gyre Pagella}
\begin{document}
This paragraph would be set in Pagella by XeLaTeX or LuaLaTeX.
Here it stays in Latin Modern, the default font.
\end{document}The one font switch that works: the whole document in sans serif.
Sans serif with \familydefault and sfmath
\documentclass{article}
\usepackage{helvet}
\usepackage{sfmath}
\renewcommand{\familydefault}{\sfdefault}
\begin{document}
\section{Results}
John Doe measured $v = 44\,\mathrm{m/s}$, which matches the
estimate $v \approx \sqrt{2 g h}$.
\end{document}Compatibility
- From a TeX installation to here: the text and formulas are kept, in Latin Modern. Fonts set with
fontspecor font packages are not used, and documents written for XeLaTeX typeset without changes. - From here to a TeX installation: documents compile with pdfLaTeX, XeLaTeX or LuaLaTeX as their packages require, and the chosen fonts then take effect.
The full manuals are on CTAN: fontspec, fontenc, inputenc and unicode-math. See also Other languages and fonts.
Questions and answers
Do I need \usepackage[utf8]{inputenc}?
Not here: the source is always read as UTF-8. Keeping the line does no harm, and older TeX installations still need it.
How do I use Times New Roman or Arial?
Not in an ordinary document. The text font is Latin Modern; the only switch is to sans serif with \renewcommand{\familydefault}{\sfdefault}, which with \usepackage{helvet} gives TeX Gyre Heros, a Helvetica look-alike. The conference templates bring their own fonts: TeX Gyre Termes (a Times look-alike) for most of them, Libertinus for ACM.
Does fontspec work in Scissor LaTeX?
It loads without errors, so XeLaTeX documents open and typeset, but \setmainfont and the other font settings are ignored.
Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-07.