Discussion:
"Force" location of pictures.
(too old to reply)
William Unruh
2024-07-25 21:19:37 UTC
Permalink
I have a paper with 6 figures in it. Each picture takes up about 1/2 a
page. Latex spaces out the pictures so that the second last picture
it stuck in the middle of the Acknowledgements, and last is in the
middle of the Bibliography. I would like them spaced closer to where
they actually occur in the text. Is there some way of forcing the
pictures closer to where I want them in the text?
Axel Berger
2024-07-26 08:00:36 UTC
Permalink
Post by William Unruh
Is there some way of forcing the
pictures closer to where I want them in the text?
Many. You can specify [p] in the \begin{figure} to place two of your
pictures on a separate page.

LaTeX dislikes pages with too little text and many pictures. I have this
in my standard private package loaded with every document:

\renewcommand*{\topfraction}{.85}
\renewcommand*{\bottomfraction}{.75}
\renewcommand*{\textfraction}{.15}
\renewcommand*{\floatpagefraction}{.7}
\renewcommand*{\dbltopfraction}{.85}
\renewcommand*{\dblfloatpagefraction}{.7}
\setcounter{topnumber}{6}
\setcounter{bottomnumber}{4}
\setcounter{totalnumber}{9}
\setcounter{dbltopnumber}{4}
\setlength{\@fptop}{5pt}
\setlength{\@fpsep}{12pt plus1fil minus4pt}
\setlength{\@fpbot}{0pt plus3fil}
\setlength{\@dblfptop}{\@fptop} %{5pt}
\setlength{\@dblfpsep}{\@fpsep} %{12pt plus1fil minus4pt}
\setlength{\@dblfpbot}{\@fpbot} %{0pt plus3fil}
\setlength{\floatsep}{12pt plus2pt minus4pt}
\setlength{\dblfloatsep}{\floatsep} %{12pt plus2pt minus4pt}
\setlength{\textfloatsep}{14pt plus1filll minus6pt} %plus8pt
\setlength{\dbltextfloatsep}{\textfloatsep} %{14pt plus1filll minus6pt}
\setlength{\intextsep}{12pt plus6pt minus2pt}

Of course these are my values, tweak them to your likes and needs.

And last take a good look at package
\usepackage[above,below,section]{placeins}
Again, these are my options. Set yours to your taste and needs.
--
/¯\ No | Dipl.-Ing. F. Axel Berger Tel: +49/ 221/ 7771 8067
\ / HTML | Roald-Amundsen-Straße 2a Fax: +49/ 221/ 7771 8069
 X in | D-50829 Köln-Ossendorf http://berger-odenthal.de
/ \ Mail | -- No unannounced, large, binary attachments, please! --
Dr Engelbert Buxbaum
2024-07-29 05:36:26 UTC
Permalink
In article <***@Berger-Odenthal.De>, ***@Berger-
Odenthal.De says...
Post by Axel Berger
Post by William Unruh
Is there some way of forcing the
pictures closer to where I want them in the text?
Many. You can specify [p] in the \begin{figure} to place two of your
pictures on a separate page.
LaTeX dislikes pages with too little text and many pictures. I have this
Another option is the placeins package, you can then set \FloatBarriers
for example to prevent floats from moving into another section or
chapter. That is perhaps the gentlest solution to your problem.
Holger Schieferdecker
2024-07-30 07:18:06 UTC
Permalink
Post by William Unruh
I have a paper with 6 figures in it. Each picture takes up about 1/2 a
page. Latex spaces out the pictures so that the second last picture
it stuck in the middle of the Acknowledgements, and last is in the
middle of the Bibliography. I would like them spaced closer to where
they actually occur in the text. Is there some way of forcing the
pictures closer to where I want them in the text?
Besides the already mentioned solutions there is the package "float". It
provides an option [H] for floating environments which means to place it
exactly at the position it occurs in the input. You have to decide if
this is a good solution for each individual picture.

Another possibility is \clearpage before the Acknowledgements. That
would ensure that all pending floats are printed, afterwards it will
start a new page. But I don't know if a pagebreak is ok in your case.

Holger
Peter Flynn
2024-08-29 11:02:08 UTC
Permalink
Post by Holger Schieferdecker
  I have a paper with 6 figures in it.
Besides the already mentioned solutions there is the package "float".
There are also settings which control how much of the available page
space can be allowed for floats. The defaults are:

\setcounter{topnumber}{2}
\newcommand\topfraction{.7}
\setcounter{bottomnumber}{1}
\newcommand\bottomfraction{.3}
\setcounter{totalnumber}{3}
\newcommand\textfraction{.2}
\newcommand\floatpagefraction{.5}

Peter

Loading...