Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support optional short title for headings and figure captions #4409

Open
tolot27 opened this issue Feb 27, 2018 · 5 comments
Open

Support optional short title for headings and figure captions #4409

tolot27 opened this issue Feb 27, 2018 · 5 comments

Comments

@tolot27
Copy link
Contributor

tolot27 commented Feb 27, 2018

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.

@tolot27
Copy link
Contributor Author

tolot27 commented Feb 27, 2018

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

@mb21
Copy link
Collaborator

mb21 commented Feb 27, 2018

Closely related to #2978

@tolot27
Copy link
Contributor Author

tolot27 commented Feb 27, 2018

#2417 is also related.

@mb21
Copy link
Collaborator

mb21 commented Feb 27, 2018

#2417 was basically closed in favour of #3177

@mb21 mb21 changed the title support optional LaTeX arguments for headings and captions Support optional short title for headings and figure captions Sep 11, 2018
@acxz
Copy link
Contributor

acxz commented Nov 23, 2024

@link2xt I don't see why this should only be for the LaTeX format.

Quarto introduces fig-scap short for Figure Short Caption like so: https://quarto.org/docs/authoring/figures.html#short-captions

image

They only support LaTeX (which makes sense as LaTeX has a pretty easy API for it).
But you can implement this in Open Office XML (Word), see below references:
https://guides.lib.umich.edu/c.php?g=1114879&p=8128987: See Section "Long Captions in the List of Figures/Tables"
https://superuser.com/questions/287829/how-can-i-include-only-part-of-an-image-caption-in-a-table-of-figures-in-microso

And in Typst: typst/typst#1295

Repository owner deleted a comment from zameer98 Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants