0

Problem:

I am using two instances of the same environment and would like that the environment adds a blank page after each instance. Currently, it only does that for the last environment.

Minimal Working Example (MWE):

\documentclass{book}

\newenvironment{dedication}
{
  \vspace*{5em}
  \begin{flushright}
} {
  \end{flushright}
  \newpage
  \thispagestyle{empty}
  \phantom{.}
  \let\cleardoublepage\relax    
}

\begin{document}

% Dedictation ---------------------------------------------------

% A

\begin{dedication}
    \fontsize{12}{16}\selectfont
    \textit{To X and Y}\par
\end{dedication}

% B

\begin{dedication}
    \fontsize{12}{16}\selectfont
    \textit{To X and Y}\par
\end{dedication}

% ----------------------------------------------------------------------

\end{document}

Output:

The first dedication does not get a blank page, but the second does.

Desired output:

A blank page should be inserted after each dedication.

  • 2
    You need to put an extra \newpage after the \relax to end the empty page. – Marijn Mar 12 '18 at 16:11
  • @kexxcream: Should the dedication itself also be on a new page? – Werner Mar 12 '18 at 16:19
1
\documentclass{book}

\newenvironment{dedication}
{
  \vspace*{5em}
  \begin{flushright}
} {
  \end{flushright}
  \newpage
  \thispagestyle{empty}
  \phantom{.}
  \newpage %<----------------------
}

\begin{document}

% Dedictation ---------------------------------------------------

% A

\begin{dedication}
    \fontsize{12}{16}\selectfont
    \textit{To X and Y}\par
\end{dedication}

% B

\begin{dedication}
    \fontsize{12}{16}\selectfont
    \textit{To X and Y}\par
\end{dedication}

% ----------------------------------------------------------------------

\end{document}

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.