General ⇒ Force images/tables to verso
-
paulvanderheijden
- Posts: 4
- Joined: Sun Feb 17, 2008 2:34 pm
Force images/tables to verso
I'd like my tables/images on the left and my text on the right.
Thanks!
Learn LaTeX easily with newest books:
The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis
The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more
LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis
Force images/tables to verso
Code: Select all
\documentclass[twoside]{article}
%-----------------------------------------------------------------------------
% Put this block in the preamble
% This package defines the \EveryShipout command
\usepackage{everyshi}
% We redefine some parameters to avoid floats on even pages (twosided document)
\EveryShipout{\ifodd\value{page}\gdef\topfraction{0.7}\else\gdef\topfraction{0}\fi}
\EveryShipout{\ifodd\value{page}\gdef\bottomfraction{0.3}\else\gdef\bottomfraction{0}\fi}
\EveryShipout{\ifodd\value{page}\gdef\textfraction{0.2}\else\gdef\textfraction{1}\fi}
\EveryShipout{\ifodd\value{page}\gdef\floatpagefraction{0.5}\else\gdef\floatpagefraction{1}\fi}
\gdef\topfraction{0}\gdef\bottomfraction{0}\gdef\textfraction{1}\gdef\floatpagefraction{1}
%-----------------------------------------------------------------------------
% Only for testing purposes
\usepackage{lipsum} % To generate text
\newcommand{\InsertAFigure}{% To generate figures
\begin{figure}
\centering \fbox{\parbox[][5cm][c]{5cm}{\centering A figure}}
\caption{A figure}
\end{figure}}
\begin{document}
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure \InsertAFigure \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-3] \InsertAFigure
\lipsum[1-10]
\end{document}Code: Select all
\EveryShipout{\ifodd\value{page}\gdef\textfraction{0.2}\else\gdef\textfraction{1}\fi}-
mister_pink
- Posts: 2
- Joined: Sat Dec 13, 2008 8:38 pm
Re: Force images/tables to verso
Apologies for dragging up an old post, but the original question is exactly the same one as I'm now trying to solve! The above solution nearly works for me (with the line removed as described) but text still appears on left hand pages when there are no figures. I'd like to be able to have all the text on the right, leaving left pages blank if required.
As an added complication, if its possible I'd like to be able to define some smaller floats to go inline using text wrapping.
Thanks for your help in advance.
Force images/tables to verso
Perhaps you may try a more exigent set of parameters:I'd like to be able to have all the text on the right, leaving left pages blank if required.
Code: Select all
\EveryShipout{\ifodd\value{page}\gdef\topfraction{1}\else\gdef\topfraction{0}\fi}
\EveryShipout{\ifodd\value{page}\gdef\bottomfraction{1}\else\gdef\bottomfraction{0}\fi}
\EveryShipout{\ifodd\value{page}\gdef\textfraction{0}\else\gdef\textfraction{1}\fi}
\EveryShipout{\ifodd\value{page}\gdef\floatpagefraction{0}\else\gdef\floatpagefraction{1}\fi}
\gdef\topfraction{0}\gdef\bottomfraction{0}\gdef\textfraction{1}\gdef\floatpagefraction{1}
Code: Select all
\newcommand{\InsertPhantomFigure}{\begin{figure}[p]\phantom{x}\end{figure}}
Don't use the figure or table environment for this. Just directly include graphics with \includegraphics or tables with tabular. You may add captions with the \captionof command defined in the capt-of or caption packages.As an added complication, if its possible I'd like to be able to define some smaller floats to go inline using text wrapping.
-
mister_pink
- Posts: 2
- Joined: Sat Dec 13, 2008 8:38 pm