Table of Contents, Floats – How to List Only First Sentence or Title of Figure Caption

floatstable of contents

I have figure captions like this:

\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}

But in my list of figures at the start of my thesis, they render like so:

enter image description here

I would like the list of figures to only show "Vacuum electrostatic surface potential of bovine lactoferrin (1BLF). Should I separate this into a different markup tag? Or how can I go about doing this so it doesn't write out the whole caption?

Best Answer

Note you need to compile twice.

\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}

enter image description here enter image description here