jgm/pandoc

Support optional short title for headings and figure captions

tolot27 opened this issue · 4 comments

LaTeX supports short titles in headings and captions with the following commands (maybe incomplete list):

\part[<short title>]{<title>} 
\chapter[<short title>]{<title>} 
\section[<short title>]{<title>} 
\subsection[<short title>]{<title>} 
\subsubsection[<short title>]{<title>} 
\paragraph[<short title>]{<title>} 
\subparagraph[<short title>]{<title>}

\caption[<short caption>]{<caption>}

These short titles/captions are then printed in the table of contents (TOC), page headers, list of figures, list of tables and list of listings. In case of PDF output, the heading titles are also used to create the bookmark list.

Sometimes, titles or captions are too long and span multiple lines in the list of ... Sometimes they contain special content or formatting as described in #2935, #3555 and #3932, which may fail to render correctly or prevent conversion to PDF completely. For PDF bookmarks, \texorpdfstring is used to handle many cases, but not all.

A solution would be, if pandoc would support the short title/caption with the optional argument as shown above.

Part of this was already discussed in https://groups.google.com/d/msg/pandoc-discuss/JUem3NZUMB8/iIt2zwcZAwAJ.

Related, but removes optional argument in LaTeX reader: #1335

mb21 commented

Closely related to #2978

#2417 is also related.

mb21 commented

#2417 was basically closed in favour of #3177