In a document (memoir
class), I need to have a title page with large margins compared to the rest of the document. To do that, I use \savegeometry/\loadgeometry
. However, if I include this title using subfile
(that allows individual compilation of chapters), the first page numering is misplaced (way too below, actually in the MWE it even touches the border of the page, making it hard to even see).
MWE:
in e.tex
:
\documentclass[../e]{subfiles}
\begin{document}
\savegeometry{Mem}
\newgeometry{margin=2.7cm}
%%%% Title %%%%%
\noindent\rule{\linewidth}{1cm}
My title with large margins
\noindent\rule{\linewidth}{1cm}
\clearpage
\loadgeometry{Mem}
\end{document}
in d.tex
:
\documentclass[a4paper,12pt]{memoir}
%% To change the size of the title page
% https://tex.stackexchange.com/questions/308795/in-memoir-remove-all-margins-from-a-page
\usepackage[pass]{geometry}
%% ========== Page numbering, headers/foooters ==========
% The pages are numbered consecutively at the bottom centre of the page
\makepagestyle{myvf}
\makeoddfoot{myvf}{}{\thepage}{}
\makeevenfoot{myvf}{}{\thepage}{}
% Chapter is written on even pages (left aligned), sections are written on odd pages (right aligned)
\makeheadrule{myvf}{\textwidth}{\normalrulethickness}
\makeevenhead{myvf}{\small\textsc{\leftmark}}{}{}
\makeoddhead{myvf}{}{}{\small\textsc{\rightmark}}
\pagestyle{myvf}
\usepackage{xr-hyper} %% Allow cross references between files in subfiles
\usepackage{subfiles}
\externaldocument{\subfix{}}
\begin{document}
\subfile{e}
\pagenumbering{roman}
Blabla
\newpage
Blabla
\end{document}
EDIT
In my larger document, I also have the same issue when I use \input
, but this is not reproducible in this MWE... I've no idea what's going on...
EDIT2
According to Different typeblocksize in the same document with memoir it seems that using \twocolumn\onecolumn
forces TeX to recompute the layout... and actually it seems to work... except that it seems to add some blank pages (but only in my actual document, this is not visible on the MWE, not sure why...)
\twocolumn\onecolumn
solves the position in the page in the MWE, but in my actual document it seems to add two blank pages (no idea why, I need to investigate). On the other hand, Simon's answer does not really work as he actually removed the bottom margin in the\newgeometry
. And I actually need to change the bottom margin as well.