Using the option lines=x
of geometry
does not give the expected result when the fontspec
package is used in the same document. For example, declaring lines=40
does not result in 40 lines per page but 29:
\documentclass[a4paper,11pt]{article}
\usepackage{fontspec}
\usepackage{geometry}
\geometry{lines=40}
\usepackage{lipsum,lineno}
\begin{document}
\linenumbers
\lipsum
\end{document}
This hapens with standard classes (book
, article
), but not with the KOMA classes nor with memoir
.
Loading geometry
before fontspec
and using newgeometry
instead of geometry
produces the expected result, but I would like to know what the problem is and how to resolve it.
\normalsize
before geometry. For some reason fontspec changes the baselineskip, but it needs some investigation to find out why exactly.\DeclareErrorFont
from eu2enc. You get the same problem without fontspec and e.g. LGR. The KOMA-classes are not affected as they patch \selectfont. So imho it is a geometry bug, it shouldn't rely on a correct baselineskip but call\normalsize
.\DeclareErrorFont{EU2}{lmr}{m}{n}{\baselineskip}
for example.\DeclareErrorFont
is used?