I'm working on a two-sided document which collates a number of files using the subfiles package, some of which require wider margins for margin notes. However, the \newgeometry command consistently fails to apply to the last page of each subfile in the main document, despite applying correctly in each of the individual subfiles. Here's a vastly simplified example to illustrate:
Main file (name.tex):
\documentclass{book}
\usepackage{subfiles}
\usepackage{geometry}
\usepackage{lipsum}
\usepackage{showframe}
\begin{document}
\subfile{name2}
\end{document}
subfile (name2.tex):
\documentclass[/name]{subfiles}
\begin{document}
\newgeometry{
top=72pt, inner=72pt, bottom=72pt, outer=216pt, marginparwidth =144pt
}
\lipsum[1-10]
\end{document}
Which results in this pdf compiled from the subfile:
And this pdf compiled from the main file:
Does anyone know how this might be resolved?