1

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...)

2
  • Were you able to solve the problem? Was Simon's answer helpful?
    – gernot
    Feb 10 at 15:54
  • @gernot not really. Basically, \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.
    – tobiasBora
    Feb 10 at 16:09

1 Answer 1

1

Having e.tex in the same directory as d.tex

b

and using this file you get a nice clean title page and the number of the first page in the right place.

\documentclass[./d]{subfiles} % changed from  ../e to .d <<<<

\begin{document}
    \pagestyle{empty} % supress all headers
    \savegeometry{Mem}
    \newgeometry{left=1cm, right=1cm} % changed to make a bigger difference
    %%%% Title %%%%%
    \noindent\rule{\linewidth}{1cm}
    
    My title with large margins
    
    \noindent\rule{\linewidth}{1cm}
    \clearpage
    \loadgeometry{Mem}
\end{document}
1
  • Thanks, and sorry, I don't know why but I missed your answer. You example seems to work because you removed the bottom margin in the newgeometry. But I do need need to change also the bottom margin. Try to use instead \newgeometry{left=1cm, right=1cm, bottom=1cm}, you will have the same problem as me.
    – tobiasBora
    Feb 10 at 16:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.