右对齐 LoF 条目

右对齐 LoF 条目

是否有一种简单的方法来对齐 LoF 条目的 RHS;例如使用连字符、随意间距或类似方法?

\documentclass{scrreprt}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}
\usepackage{tocloft}

\overfullrule=10mm

\makeatletter
\renewcommand{\@tocrmarg}{3em}
\makeatother

\begin{document}

\microtypesetup{protrusion=false}
\listoffigures
\microtypesetup{protrusion=true}

\begin{figure}
\caption{2D anisotropic velocity model used for objective function analysis anisotro\-pic}
\end{figure}

\begin{figure}
\caption{2D anisotropic velocity model used for objective function analysis 2D anisotropic velocity model used for objective function analysis 2D anisotropic velocity model used for objective function analysis}
\end{figure}

\end{document}

答案1

有时,您必须对已有的参数进行一些调整。在以下示例中,将页码框放大可获得良好的结果,但会使后续条目的情况变得更糟。在这种情况下,获得良好结果的唯一机会是自己动手并稍微更改文本。

hdebensLofEntryAlign

\documentclass{scrreprt}

\usepackage[english]{babel}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{microtype}

\overfullrule=10mm

\makeatletter
\renewcommand*\@pnumwidth{2.55em}
\makeatother

\hyphenation{an-iso-tro-pic}
\begin{document}

\microtypesetup{protrusion=false}
\listoffigures
\microtypesetup{protrusion=true}

\begin{figure}
    \caption{2D anisotropic velocity model used for objective
    function analysis anisotropic}
    \caption{2D anisotropic velocity model used for objective
    function analysis 2D anisotropic velocity model used for
objective function analysis 2D anisotropic velocity model used
for objective function analysis}
\end{figure}

\end{document}

相关内容