MorganBauer / tufte-latex

Automatically exported from code.google.com/p/tufte-latex
0 stars 0 forks source link

figure and lstlisting positioning #76

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I love tufte style very much.  But I have some positioning problem cannot
get solve.  When I have a figure which is not big to cover a whole page
but for some reason I want to keep it in a single page, it is always
positioned at the middle (vertically) of a page.  Similarly, for a listing
which is not long enough to cover a whole page but I issue a page break
after it, it is always positioned at the middle (vertically) of a page.

For a figure, it may be ok being in the middle of a page, but in some
ocassion it need to be at the begining of a section, then it looks odd
with such a big space between the section and the figure.  For listing,
its always looks odd not positioning it starting from the top of a
page.

I've tried \vfil or \vfill, neither works.

E.g.,

\begin{figure*}[h]
\centering{
    \includegraphics[scale=.45]{screenDump/100304b040.png}
    \caption{App without child table}
    \label{fig:100304b040}
}
\end{figure*}

\vfill
\vfill

\section{Sample Code}
\lstset{breaklines=true}
\lstset{boxpos=t}
{\tt
\begin{lstlisting}[frame=single, language=SQL]
-- =============================================
-- Author:              SK
...
\end{lstlisting}
}

I'm using TeXLive-2011 (dated 2011-07-31) on Mac OS.

Thanks in advance.

SK

Original issue reported on code.google.com by sai...@gmail.com on 6 Feb 2012 at 2:02

GoogleCodeExporter commented 9 years ago
It sounds like those figures and listings may be placed on a page by themselves 
in the same manner they would be if you used the \begin{figure}[p] placement 
option.  If a figure, table, or listing takes up more than a certain amount of 
the page, then LaTeX automatically places that figure/table/listing on its own 
page.

Section 10.4 of the Memoir manual 
<http://mirror.ctan.org/macros/latex/contrib/memoir/memman.pdf> has a good 
description of the parameters you can adjust to try to coax LaTeX into being 
more lax about its placement of floats.

Original comment by godbyk@gmail.com on 9 Feb 2012 at 5:12