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

What is the purpose of Table's ShortCaption? #103

Closed
rnwst opened this issue Oct 21, 2022 · 6 comments
Closed

What is the purpose of Table's ShortCaption? #103

rnwst opened this issue Oct 21, 2022 · 6 comments

Comments

@rnwst
Copy link

rnwst commented Oct 21, 2022

The Table Block currently includes the Caption data type, which is made up of an optional ShortCaption. I didn't see any mention of a short caption in the User Guide and also no way to specify one for a table in Pandoc's Markdown. I then assumed that this would be a field utilised by pandoc's LaTeX reader and writer for storing a short caption in LaTeX tables for use in a List of Tables, like so:

\caption[short caption]{long caption}

However, when I try this using an example .tex file containing a table with a caption of the above form, the resulting AST's Table element does not contain a ShortCaption. Hence my assumption that the ShortCaption would be utilised by pandoc's LaTeX reader and writer is wrong. I am thus left wondering what the purpose of the ShortCaption is.

@jgm
Copy link
Owner

jgm commented Oct 21, 2022

That is the purpose. We just haven't yet supported all the new AST features in the readers and writers. Adding support to the LaTeX reader should be relatively straightforward, but this won't help much until writers also support this.

@rnwst
Copy link
Author

rnwst commented Oct 21, 2022

Understood, thank you.

@rnwst rnwst closed this as completed Oct 21, 2022
jgm added a commit to jgm/pandoc that referenced this issue Oct 21, 2022
See jgm/pandoc-types#103.

This is not too useful yet, because writers don't do anything with
the short caption.
@jgm
Copy link
Owner

jgm commented Oct 21, 2022

I just added some code to the LaTeX reader so that the short caption will be parsed and put into the AST.

@rnwst
Copy link
Author

rnwst commented Oct 21, 2022

That was quick! Thank you!
I guess it's only a question of time now until someone will complain that the ShortCaption is correctly read in but not used by the LaTeX writer 😄

@jgm
Copy link
Owner

jgm commented Oct 21, 2022

The LaTeX writer actually does handle it already.

@rnwst
Copy link
Author

rnwst commented Oct 21, 2022

Thanks for clarifying, based on your first comment I had assumed that wouldn't be the case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants