6

I am using zwpagelayout (see this question) but if I put a minipage with a line or paragraph break, I get weird two-page output.

\documentclass{article}
\usepackage[papersize={,10.5in},spine=1in,cropmarks,textwidth=7in,topmargin=.5in,leftmargin=0in,nopagenumbers,color]{zwpagelayout}
\begin{document}
\pagestyle{empty}
\hbox to \textwidth{%
  \vbox to \textheight{\hsize \UserWidth \centering
\begin{minipage}{5in}
This\\
Overflows
\end{minipage}

}\hss
\vbox to \textheight{\hsize \CropSpine \centering
        }\hss
\vbox to \textheight{\hsize \UserWidth \centering
}\hss}
\end{document}

How do I use linebreaks in a minipage in this case?

3
  • Use \vbox to 0.9\textheight at all places.
    – user11232
    Commented Apr 1, 2014 at 7:05
  • why are you using \vbox and \hbox at all? they should never be used at the top level in a latex document, just use minipage. Commented Apr 1, 2014 at 9:23
  • zwpagelayout uses thems as examples, this makes a book cover on a single page. Is there a better way?
    – bombcar
    Commented Apr 1, 2014 at 16:58

1 Answer 1

4

As David said in the comments, just a minipage is enough. Although this is omitted in many tutorials, you can also fix the height of the minipages, so you do not need at all vertical boxes of \textheight, since it is possible for a minipage take even the complete text area of a single page (for example, to make the cover).

mwe

\documentclass{article}
\usepackage[papersize={6in,5in},spine=1in,cropmarks,  
textwidth=5in,topmargin=.5in,leftmargin=.25in,
nopagenumbers,color]{zwpagelayout}
\begin{document}
\pagestyle{empty}
\fboxsep10pt\fboxrule1pt
\fcolorbox{black}{yellow}{
\begin{minipage}%
[t][\dimexpr\textheight-21pt]%
[t]{\dimexpr\textwidth-21pt}%
This\\
Not\\
Overflows
\end{minipage}}
\end{document}

You must log in to answer this question.

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