0

I'm preparing some text where pictures shall be placed really "H"ere. Due to the mix of text and images, that actually works pretty well. But I keep one page with not enough content (larger image starts on the next page) and I would love to push the remaining paragraphs to the top of the page, and not spread them evenly; I'd actually favour to have some free space at the bottom of the page than between the paragraphs. A simple \vfill (see example below) didn't help me though:

\documentclass[a5paper,twoside]{article}
\usepackage[demo]{graphicx}
\usepackage[framefit=yes,heightadjust=all,framearound=all]{floatrow}
\usepackage{float}
\usepackage{lipsum}

\begin{document}
\lipsum[2]
\lipsum[3]\vfill
\begin{figure}[H]
        \centering
        \begin{floatrow}
                \ffigbox[0.5\textwidth]{
                            \includegraphics[width=\linewidth,keepaspectratio=true]{74.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }
                \ffigbox[0.5\textwidth]{
                            \includegraphics[angle=90,width=\linewidth,keepaspectratio=true]{75.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }
        \end{floatrow}
\end{figure}

\lipsum[2]
\end{document}

Any hint how to get the \vfill to work? Thanks!

  • 2
    A \newpage instead of \vfill will keep the paragraphs without space. Then you can add space for all paragraphs with \parskip or to specific paragraphs with \vspace – koleygr Oct 26 '17 at 23:45
  • 1
    Another possibility: add the \raggedbottom directive in the preamble. – Bernard Oct 27 '17 at 00:27
  • 1
    @Bernard But if you add \raggedbottom you get ragged bottoms, which aren't very nice. – ShreevatsaR Oct 27 '17 at 03:54
  • You can see the difference only in even and odd facing pages. The probability you see a difference in a scientific text with formulæ, figures, tables, &c. is rather low, I think, and anyway in case it's visible, you always can add \enlargethispage{some length}. In ordinary text, usually there should be no difference (except perhaps due to controlling of widows and orphans). – Bernard Oct 27 '17 at 09:45

2 Answers2

1

i suspect that you are willing to tweak your document manually clear page where you see that is necessary ...

try:

\documentclass[a5paper,twoside]{article}
\usepackage[demo]{graphicx}
\usepackage[framefit=yes,heightadjust=all,framearound=all]{floatrow}
\usepackage{float}
\usepackage{lipsum}

%-------------------------------- show page layout, only for test
\usepackage{showframe}
\renewcommand\ShowFrameLinethickness{0.15pt}
\renewcommand*\ShowFrameColor{\color{red}}
%---------------------------------------------------------------%

\begin{document}
\lipsum[2]
\lipsum[3]\clearpage%where is necessary
\begin{figure}[H]
        \centering
        \begin{floatrow}
                \ffigbox[0.45\textwidth]{
                            \includegraphics[width=\linewidth]{74.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }\hfil
                \ffigbox[0.45\textwidth]{
                            \includegraphics[angle=90,width=\linewidth]{75.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }
        \end{floatrow}
\end{figure}

\lipsum[2]
\end{document}

enter image description here

Zarko
  • 296,517
0

Just for fun:

\documentclass[a5paper,twoside]{article}
\usepackage[demo]{graphicx}
\usepackage[framefit=yes,heightadjust=all,framearound=all]{floatrow}
\usepackage{float}
\usepackage{lipsum}

\begin{document}
\bgroup
\advance\baselineskip by 0pt plus 1fil %bwaa-ha-ha-ha
\lipsum[2]
\lipsum[3]
\egroup
\begin{figure}[H]
        \centering
        \begin{floatrow}
                \ffigbox[0.5\textwidth]{
                            \includegraphics[width=\linewidth,keepaspectratio=true]{74.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }
                \ffigbox[0.5\textwidth]{
                            \includegraphics[angle=90,width=\linewidth,keepaspectratio=true]{75.jpeg}
                }{
                        \caption{some}
                        \label{fig:74}
                }
        \end{floatrow}
\end{figure}

\lipsum[2]
\end{document}
John Kormylo
  • 79,712
  • 3
  • 50
  • 120