The reason has to do with an oversize image. As LaTeX cannot fit it on a page it will float to the end. These type of figures are best to insert them manually
. You will need to define a different environment for this. Try modifying the \twopagepicture
by copying it a renaming it and just comment out the begin{figure}
and \end{figure}
.
\newcommand*{\twopagepicture}[4]{% copy twopagepicture an comment out
.....
% \begin{figure}[#1]
....
% \end{figure}%
% \begin{figure}[#1]
.....
% \end{figure}%
......
}
This ensures that the images will be shown exactly where placed.
To have a correctly placed two page spread firstly, one needs a method to clear to an even page, normally I would code it as follows:
\usepackage[strict]{changepage}
\makeatletter
\newcommand{\cleartoevenpage}{%
\clearpage%
\ifoddpage\c@page\hbox{}\clearpage\fi}
The second issue to take into consideration, is that the image width is always larger than the \textwidth
dimension and hence any scaling must be done on the \textheight
. This is important, otherwise you will get a new page.
The even page image is simply placed normally but issuing a \cleartoevenpage
before the placement and a \newpage after
it, producing the image shown above.
\cleartoevenpage
\includegraphics[height=0.95\textheight]{petra}
\newpage
The odd page image, will have to be shifted to the left by \textwidth
.
\hspace*{-\textwidth}\includegraphics[height=0.95\textheight]{petra}\hspace{1em}
The caption can be placed using a parbox
or a minipage
. In this case I have used a parbox
. If your captions will have more than a paragraph of text, then use a minipage. Depending on the amount of text you have it may look better if you shift it slightly up or down. This can be done either using a vspace
command or use a rule (I prefer the latter as I can have a visual clue and only zero the width at the final copy).
\parbox[b]{0.25\textwidth}{\lipsum*[1-2]\par\rule{1pt}{50pt}}
You can see the rule in the last image below.
Full MWE
\documentclass{book}
\usepackage[left=0pt,right=0pt,top=0.5in,bottom=0.5in]{geometry}
\usepackage{graphicx,lipsum,caption,crop}
\usepackage[strict]{changepage}
\makeatletter
\newcommand{\cleartoevenpage}{%
\clearpage%
\ifoddpage\c@page\hbox{}\clearpage\fi}
\begin{document}
First page
\cleartoevenpage
\includegraphics[height=0.95\textheight]{petra}
\newpage
\hspace*{-\textwidth}\includegraphics[height=0.95\textheight]{petra}\hspace{1em}
\parbox[b]{0.25\textwidth}{\lipsum*[1-2]\par\rule{1pt}{50pt}}
\end{document}
Hope this helps.
With tikz
\documentclass{article}
\pagestyle{empty}% for cropping
\usepackage{tikz}
\makeatletter
\newcommand\rottext[4][center]{
\tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
\node (X) {#2};
\foreach \i in {1,...,#3}
\node[rotate around={#4*\i:(X.#1)}] {#2};
}
}
\begin{document}
Lorem ipsum
\tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
\node (X) {Blume};
\foreach \i in {1,...,4}
\node[rotate around={20*\i:(X.south west)}] {Blume};
\node[red,draw,fill,circle,inner sep=1pt] at (X.south west) {};% mark rotation point
}
dolor sit amet
Lorem ipsum
\tikz[baseline=(X.base),every node/.style={inner sep=0pt}]{
\node (X) {Blume};
\foreach \i in {1,...,4}
\node[rotate around={20*\i:(X.north west)}] {Blume};
\node[red,draw,fill,circle,inner sep=1pt] at (X.north west) {};% mark rotation point
}
dolor sit amet
As a macro:
\rottext{Blume}{10}{12}
\rottext[north east]{Blume}{2}{30}
\end{document}
Best Answer
If TeX knows the correct size of the figure it will reserve the right amount of space and you will not see an overlap with text. Thus, if this happens then the amount of space that is reserved is smaller than the actual priniting space of the figure. This can happen
As you explicitly give a
bb=
setting and the problem doesn't appear if you don't do this you are in the first case and your setting is simply wrong. But the question is why do you specify it in the first place. Normally you don't need (nor should) set this if you want to place the full picture and the bounding box of that picture is correct.If your intention is to clip the picture so that only parts of it are shown then you need to additionally use the parameter
clip
in which case youbb=
values are used to define the part that is shown.