我怎样才能使我的图表列表仅显示图表标题的第一句话/标题?

我怎样才能使我的图表列表仅显示图表标题的第一句话/标题?

我有如下图形标题:

\documentclass{book}
\usepackage{graphicx}

\begin{document}
    
    \listoffigures
    
    \begin{figure}
        \centering
        \includegraphics[width=12cm]{example-image-a}
        \caption{Vacuum electrostatic surface potential of bovine lactoferrin (1BLF). The circled blue area corresponds to the N1 subdomain and contains the antimicrobial peptide precursors for lactoferricin and lactoferrampin. Vacuum electrostatic surface potential was generated in PyMOL.}
        \label{fig:Lf_electrostatic}
    \end{figure}

\end{document}

但在我的论文开头的图表列表中,它们呈现如下:

在此处输入图片描述

我希望图表列表仅显示“牛乳铁蛋白 (1BLF) 的真空静电表面电位”。我应该将其分离到不同的标记标签中吗?或者我该如何做才能不写出整个标题?

答案1

请注意,您需要编译两次。

\documentclass{book}
\usepackage{graphicx}

\begin{document}
    
    \listoffigures
    
    \begin{figure}
        \centering
        \includegraphics[width=12cm]{example-image-a}
        \caption[Vacuum electrostatic surface potential of bovine lactoferrin (1BLF)]{Vacuum electrostatic surface potential of bovine lactoferrin (1BLF). The circled blue area corresponds to the N1 subdomain and contains the antimicrobial peptide precursors for lactoferricin and lactoferrampin. Vacuum electrostatic surface potential was generated in PyMOL.}
        \label{fig:Lf_electrostatic}
    \end{figure}

\end{document}

在此处输入图片描述 在此处输入图片描述

答案2

您可以选择将图表的图例粘贴在图表本身下方,并使标题文字简短明了。这样做的一个好处是您不必摆弄可选参数\caption

在此处输入图片描述

\documentclass{book}
\usepackage{graphicx}
\hyphenation{anti-microb-ial}
\begin{document}
    
\listoffigures
    
\chapter{Uno}

\begin{figure}[ht!]

\includegraphics[width=\textwidth]{example-image-a}
        
The circled blue area corresponds to the N1 subdomain and contains 
the antimicrobial peptide precursors for lactoferricin and lactoferrampin. 
Vacuum electrostatic surface potential was generated in PyMOL.

\caption{Vacuum electrostatic surface potential of bovine lactoferrin (1BLF). }
\label{fig:Lf_electrostatic}

\end{figure}

\end{document}

答案3

只是为了好玩:

\documentclass{book}
\usepackage{graphicx}

\newcommand{\savenumberline}{}% reserve global name

\makeatletter
\renewcommand*\l@figure[2]% #1 = title with \numberline, #2 = page number
{\bgroup% use local registers
  \setbox0=\vbox{\setlength{\hsize}{\dimexpr \textwidth-\@pnumwidth-3.8em}%
    \def\numberline##1{\xdef\savenumberline{##1}}%
    #1}%
  \ifdim\ht0>\baselineskip
    \setbox1=\vsplit0 to \ht\strutbox
    \setbox2=\vbox{\unvbox1}% restore original height
    \@dottedtocline{1}{1.5em}{2.3em}{\numberline{\savenumberline}\box2}{#2}%
  \else
    \@dottedtocline{1}{1.5em}{2.3em}{#1}{#2}% default
  \fi
\egroup}
\makeatother

\begin{document}
    
    \listoffigures
    
    \begin{figure}
        \centering
        \includegraphics[width=12cm]{example-image-a}
        \caption{Vacuum electrostatic surface potential of bovine lactoferrin (1BLF). The circled blue area corresponds to the N1 subdomain and contains the antimicrobial peptide precursors for lactoferricin and lactoferrampin. Vacuum electrostatic surface potential was generated in PyMOL.}
        \label{fig:Lf_electrostatic}
    \end{figure}

\end{document}

相关内容