0

I would like captions (which will always be above the figure, table, etc) to be placed in the same vertical position on the page. I know I can do

\makeatletter
\setlength{\@fptop}{0.16\textheight minus 0.160\textheight}
\makeatother

which makes the vertical position 16% of the way down the text height. However, I am using twocolumn report document and when a figure is placed early in a chapter, the figure appears lower. I understand that this is because it is 16% of the textheight + chapter title area height.

How can I make such figures appear on the same vertical position as other figures?

I have a MWE which achieves the effect below, but requires me to manually determine the correct height of the minipage, and to use a separate environment from figure for figures appearing on the chapter page. Is there another way? Alternatively, if this way is the best, is there a way to refer to the "chapter title area height" so that if I change the way chapters are displayed the same effect is achieved?

(If a figure is too large on a `normal' page, I am not worried if it moves up.)

\documentclass[a4paper,twocolumn,10pt]{scrreprt}
\usepackage[twocolumn,landscape,top=1cm]{geometry}

\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{placeins}

\renewcommand{\floatpagefraction}{0.1}

\makeatletter
\setlength{\@fptop}{0.16\textheight minus 0.1650\textheight}
\makeatother

\newenvironment{chapterpagefigure}{
\begin{figure}
\begin{minipage}[t][0.84\textheight]{\linewidth}
}{
\end{minipage}
\end{figure}
}

\usepackage{caption}
\captionsetup{justification=raggedright,singlelinecheck=false,skip=0pt}


\begin{document}
\chapter{A somewhat long chapter title longer than two columns}
\lipsum[1-3]

\begin{chapterpagefigure}
\caption{Figure appearing on chapter page}
\includegraphics[height=5cm]{Example-image}
\end{chapterpagefigure}

\lipsum[1-2] 
\section{Foobarbaz}

\begin{figure}[p]
\caption{Slightly larger figure appearing on normal page}
\includegraphics[height=6cm]{Example-image}
\end{figure}

\lipsum

\lipsum[1-4]

\begin{figure}[p]
\caption{Slightly larger figure appearing on normal page}
\includegraphics[height=6cm]{Example-image}
\end{figure}




\end{document}
1

On the first page of a chapter, \@colht is less than \textheight. The macro \@tryfcolumn is used to lay the floats out into each column. The change in \@fptop is local to each call.

\documentclass[a4paper,twocolumn,10pt]{scrreprt}
\usepackage[twocolumn,landscape,top=1cm]{geometry}

\usepackage{lipsum}
\usepackage{graphicx}
\usepackage{placeins}

\renewcommand{\floatpagefraction}{0.1}

\makeatletter
\setlength{\@fptop}{0.16\textheight minus 0.1650\textheight}
\let\oldtryfcolumn=\@tryfcolumn
\def\@tryfcolumn{\addtolength{\@fptop}{\dimexpr \@colht-\textheight}%
  \oldtryfcolumn}
\makeatother

\usepackage{caption}
\captionsetup{justification=raggedright,singlelinecheck=false,skip=0pt}


\begin{document}
\chapter{A somewhat long chapter title longer than two columns}
\lipsum[1-3]

\begin{figure}[p]
\caption{Figure appearing on chapter page}
\includegraphics[height=5cm]{Example-image}
\end{figure}

\lipsum[1-2] 
\section{Foobarbaz}

\begin{figure}[p]
\caption{Slightly larger figure appearing on normal page}
\includegraphics[height=6cm]{Example-image}
\end{figure}

\lipsum

\lipsum[1-4]

\begin{figure}[p]
\caption{Slightly larger figure appearing on normal page}
\includegraphics[height=6cm]{Example-image}
\end{figure}

\end{document} 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.