[Tex/LaTex] Set a different layout for a single page in Memoir

marginsmemoirtitles

I am setting a layout with facing pages and large outer margins, in order to accomodate a lot of margin notes.

When it comes to the title page, I need to make a new layout in order to be able to center the title to the page, not only to the typeblock (which in fact is not centered, but moved to the inside of the page). I have tried \usepackage{geometry} and \newgeometry, but this creates a conflict with Memoir in the rest of my document, so that margins exceed the page.

How do you set a non default page in Memoir mid document?

Thank you,
J

\documentclass[a4paper, 10pt, twoside, showtrims]{memoir}
\usepackage{lipsum}
% \usepackage[a4paper]{geometry}


\settrimmedsize{277mm}{170.9877mm}{*}
\settrims{10mm}{17mm}
\setlrmarginsandblock{18.999mm}{37.997mm}{*}
\setulmarginsandblock{18.999mm}{44.837mm}{*}
\setmarginnotes{1.4mm}{18.999mm}{1em}
\renewcommand{\sideparfont}{\normalfont%\itshape
\footnotesize}
\sideparmargin{outer} 
\checkandfixthelayout[nearest]


\begin{document}
\begin{titlingpage}

\begin{center}

\vspace{3\baselineskip}
\vfill

{\HUGE TITLE PAGE  \\}

{\LARGE needs to be centered  \\}

\vfill

\end{center}

\end{titlingpage}

\lipsum

\end{document}

Best Answer

I recommend to prepare the title page as a standalone (one-page) document and include it using package pdfpages. In the following example, the standalone file is \jobname-title.tex. For a real document, nobody would use the filecontents environment.

In the screnshot we can see the included pdf with the title page on the left and the titlepage which is created within the document on the right. The memoir margins have been changed to make the diference very obvious.

Check if the pages are correctly numbered, i.e. odd pages on the right, even pages on the left.

56153MemoirTitlepage

\begin{filecontents}{\jobname-title.tex}
    \documentclass{article}
\usepackage[a4paper,margin=4cm]{geometry}
%https://github.com/johannesbottcher/titlepageExamples/blob/master/quail.tex
    \begin{document}
    \thispagestyle{empty}
    \begin{center}
            \setlength{\parskip}{2ex}
            \rule{\textwidth}{.4pt}\par
            {\huge\bfseries The incredible journey of Walter~Wombat \par}
            \rule{\textwidth}{.4pt}\par
            \bigbreak
            {\Large Carl Capybara\par}
        \end{center}
        \end{document}

\end{filecontents}
\documentclass[a4paper, 10pt, twoside, showtrims]{memoir}
\usepackage{lipsum}
\usepackage{pdfpages}


\settrimmedsize{277mm}{170.9877mm}{*}
\settrims{10mm}{17mm}
\setlrmarginsandblock{18.999mm}{77.997mm}{*}
\setulmarginsandblock{18.999mm}{44.837mm}{*}
\setmarginnotes{1.4mm}{18.999mm}{1em}
\renewcommand{\sideparfont}{\normalfont%\itshape
\footnotesize}
\sideparmargin{outer} 
\checkandfixthelayout[nearest]


\begin{document}
\includepdf{\jobname-title.pdf}

\begin{titlingpage}

    \begin{center}

        \vspace{3\baselineskip}
        \vfill

        {\HUGE TITLE PAGE  \\}

        {\LARGE needs to be centered  \\}

        \vfill

    \end{center}

\end{titlingpage}

\lipsum

\end{document}

Don't be confused about left and right hand pages in this screenshot.