4

I would like to do the same thing as described here : Automatic way to use the first sentence of the figure caption as the short caption.

Which mean that I need to limit the title of the figures in \listoffigures to the first sentence of the caption.

The solution provided in the question above try to split the caption with . and only insert the first part of the list as a title. It does not work for me and I don't have the Latex skills to tweak and make it work the piece of code.

The solution was to add this :

\let\oldcaption\caption
\def\splitter #1. #2@@{\oldcaption[#1]{#1. #2}}
\def\caption#1{\splitter #1@@}

Because I use Pandoc and a Markdown syntax I can't use the latex syntax and then use the short caption mechanism.

Linked to https://github.com/jgm/pandoc/issues/2417

hadim
  • 189
  • Have you seen the --parse-raw flag for pandoc? It looks like it may solve your problem by allowing you to put raw LaTeX into your markdown document. http://pandoc.org/README.html – Nathanael Farley Sep 26 '15 at 11:52
  • That's not the problem here because I use a preamble.text where I put some custom Latex command. I inserted in this file the solution provided but the previous question but it does not work as I said. – hadim Sep 26 '15 at 11:54
  • Could you answer your own question @HadiM? It is not clear how you solved it! Where did you add those lines? – lf_araujo Sep 01 '16 at 21:31

0 Answers0