Page LayoutBad page number alignment in list of figures

Information and discussion about page layout specific issues (e.g. header and footer lines, page formats, page numbers).
Post Reply
greybadger
Posts: 13
Joined: Fri Aug 21, 2009 2:36 pm

Bad page number alignment in list of figures

Post by greybadger »

Hi,

I have a figure caption that ends with some math environment stuff. The last math bit should be on a new line in the list of figures, but it's not, which pushes the page number out of alignment. I minimal working example is shown below. Can anybody suggest how to force a new line?

Thanks, GB.

Code: Select all

\documentclass[a4paper,11pt,twoside,openright]{report}
\usepackage[a4paper,top=3.1cm,bottom=2.5cm,inner=4.0cm,outer=2cm]{geometry}
\usepackage{amsmath}
\usepackage[font=small,labelfont=bf]{caption}
\usepackage{palatino}
\usepackage{tocloft}
\setlength{\cftsecnumwidth}{2.5em}
\setlength{\cftsubsecnumwidth}{2.8em}
\setlength{\cftfignumwidth}{2.6em}
\setlength{\cfttabnumwidth}{2.6em}

\newcommand\addloflot[1]{
  \addcontentsline{lof}{chapter}{\protect\makebox[1.4em][l]{\thechapter}#1}
  \addcontentsline{lot}{chapter}{\protect\makebox[1.4em][l]{\thechapter}#1}}

\begin{document}
\listoffigures
\chapter{New chapter}
\addloflot{New chapter}
\begin{figure}[htbp]
\centering
\caption{This caption is fine}
\end{figure}

\begin{figure}[htbp]
\centering
\caption{p-value distribution for signal + background pseudoexperiments with $200\,\mathrm{pb}^{-1}$}
\end{figure}
\end{document}

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

User avatar
Stefan Kottwitz
Site Admin
Posts: 10323
Joined: Mon Mar 10, 2008 9:44 pm

Bad page number alignment in list of figures

Post by Stefan Kottwitz »

Hi,

\newline will work inside \caption.

Stefan
LaTeX.org admin
Post Reply