I am writing a book and would like each page to be cut in half with red at the top and blue at the bottom (not including front page of initial front book matter). and then add separate text to each of the half of the page (was thinking minipage might be able to do this? – imagine bad advice top half and good advice bottom half of the page. Is this possible?
[Tex/LaTex] How to split latex page horizontally, and have a different colour background to the two halves
minipagetikz-styles
Related Solutions
I recently wanted to do something similar: produce a5 cards but printed on a4 paper, with the a5 pages lining up so that page 2 was on the back of page 1 and so forth. The package pgfpages
is almost what I wanted to do this, but it can only deal with one physical page at a time.
So I hacked it.
The result is a package which I've imaginatively called pgfmorepages
(CTAN and github) which can deal with more than one physical page at a time. It has the same logic as pgfpages
: it gathers a certain number of pages into a set of boxes and then deals them out onto physical pages in accordance with a template. The difference is that in the dealing out process, it can put them on more than one physical page.
So for your index cards, we gather in the first ten "logical" pages, and then place them on two physical pages so that they are in the right layout and so that page 2 is on the back of page 1, and so forth.
The relevant layout is already part of the package. Put that in the same directory as your file, a sample is:
\documentclass{article}
\usepackage[paperheight=4.75in,paperwidth=2.75in]{geometry}
\usepackage{pgfmorepages}
\usepackage{lipsum}
\pgfpagesuselayout{5 index cards}[a4paper]
\begin{document}
\small
\lipsum[1-20]
\end{document}
Note that the size of the index cards is set using the geometry package so that TeX thinks that the pages are the size of the index cards. The a4paper
option to the layout says what the real page size is.
Compiling that, I get the following:
Here's one option, using the floatrow
and subfig
packages; depending on the actual size of your images, you might need to adjust some lengths:
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{floatrow}
\usepackage{subfig}
\begin{document}
\begin{figure}
\ffigbox[7.8cm]{%
\begin{subfloatrow}
\hsize0.7\hsize
\vbox to 6.35cm{
\ffigbox[\FBwidth]
{\caption{small subfigure A}}
{\includegraphics[width=3cm,height=3cm]{smallfigure1}}\vss
\ffigbox[\FBwidth]
{\caption{small subfigure B}}
{\includegraphics[width=3cm,height=2cm]{smallfigure2}}
}
\end{subfloatrow}\hspace*{\columnsep}
\begin{subfloatrow}
\ffigbox[\FBwidth][]
{\caption{A large subfigure}}
{\includegraphics[width=3cm,height=6cm]{largepicture}}
\end{subfloatrow}
}{\caption{three subfigures}}
\end{figure}
\end{document}
The demo
option for graphicx
simply replaces actual figures with black rectangles; do not use that option in your actual document.
Boxing the larger image, one can automatically calculate the needed height (some small manual adjustment will still be needed for the \vbox
):
\documentclass{article}
\usepackage[demo]{graphicx}
\usepackage{floatrow}
\usepackage{subfig}
\newlength\imageht
\newlength\imagedp
\begin{document}
\newsavebox\Image
\savebox\Image{\includegraphics[width=4cm]{largefigure}}
\settoheight\imageht{\usebox{\Image}}
\settodepth\imagedp{\usebox{\Image}}
\addtolength\imageht{\imagedp}
\begin{figure}
\ffigbox[7.8cm]{%
\begin{subfloatrow}
\hsize0.7\hsize
\vbox to \dimexpr\imageht+10pt\relax{
\ffigbox[\FBwidth]
{\caption{small subfigure A}}
{\includegraphics[width=3cm,height=1cm]{smallfigure1}}\vss
\ffigbox[\FBwidth]
{\caption{small subfigure B}}
{\includegraphics[width=3cm,height=1cm]{smallfigure2}}
}
\end{subfloatrow}\hspace*{\columnsep}
\begin{subfloatrow}
\ffigbox[\FBwidth][]
{\caption{A large subfigure}}
{\usebox{\Image}}
\end{subfloatrow}
}{\caption{three subfigures}}
\end{figure}
\end{document}
Best Answer
You could use
eso-pic
.The following assumes, that the half of the text field is at the same height as the half of the paper. This is not necessarily true (and is false for default
book
page layout, roughly half of the last line of the first half of the text field lies in the second half of the page).We first define an environment (
advisepage
in the following) for a coloured page. This environment does only colour a single page (top half red, bottom half blue). In this environment we use another environment (advise
in the following) that is essentially just aminipage
of fixed height.5\textheight
and width\textwidth
.Code: