2

This MWE shows what I am trying:

% arara: pdflatex
\documentclass[oneside]{book}
\usepackage{color}
\begin{document}%
\chapter*{A}%
Some text%
\clearpage%
\vspace*{-1pt}%
\noindent\begin{minipage}{\textwidth}%
\chapter*{A}%
Some text without heading, starting at the same position as above.%
\end{minipage}%
\end{document}%

I need the minipage in order to prevent page-breaking of its contents. I have two questions:

  1. Why do I need -1pt before the minipage? Is there some minipage spacing I need to adapt? In a different document, I even need -9.75 (I am using \titleformat from the titlesec package there).

  2. What can I do to hide \chapter*? I know \phantom, but this does not seem to work (does not compile). \textcolor{white} would work, but is not very nice when copying text from the pdf.

Edit: The answer to 1 is \begin{minipage}[t]{\textwidth}. God knows why the default (when omitting [t]) looks like top alignment, but yields a different result. @Herbert's answer to 2 is perfect, I had tried \phantom{\chapter*{A}}. Thanks!

1
  • 1
    the default minipage is vertically centered so its height is much more than baseline spacing so \lineskip glue is inserted. With [t] the height is small so you get the normal baseline spacing, Aug 9, 2014 at 9:33

1 Answer 1

2
\documentclass[oneside]{book}
\begin{document}
\chapter*{A}
Some text

\chapter*{\phantom{A}}
Some text without heading, starting at the same position as above.
\end{document}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .