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

Impact of #177 on Captions and Labels #194

Open
cdhutch opened this issue Nov 24, 2020 · 2 comments
Open

Impact of #177 on Captions and Labels #194

cdhutch opened this issue Nov 24, 2020 · 2 comments

Comments

@cdhutch
Copy link
Contributor

cdhutch commented Nov 24, 2020

Prior to the incorporation of #177 if I made a table such as :

Name Role
Arthur King of All Britons
Sir Robin Chicken
[Knights of the Round Table][knights]

the resulting LaTeX would include the following caption and label lines:

\caption{Knights of the Round Table}
\label{knights}

Since #177, the code becomes:

\caption[knights]{Knights of the Round Table}
\label{knights}

The effect of this change seems to be that the table's short caption and label are now linked. This requires me to either change my internal table/graphics labels to be "prettier" show they show up nicely in the ToC.

Does the current MMD code offer syntax that allows the user to specify a different value for the short caption field than from the label field or to forego the short caption capability?

Thanks for the great software development.

@fletcher
Copy link
Owner

Does the current MMD code offer syntax that allows the user to specify a different value for the short caption field than from the label field or to forego the short caption capability?

No. I agreed with @MArpogaus that the full caption should not be used in the ToC for images and tables, which should include more of a description of the image/table than the full caption.

My first suggestion would be to use a "prettier" short caption/label. This can still be succinct and memorable, but provides a cleaner list of figures and still enables cross-reference linking.

Alternatively, you can always modify MultiMarkdown to work differently in the manner you prefer (the benefit of open source code....)

(Presumably you could also redefine the \caption[]{} LaTeX command to ignore the first argument, which would effectively revert the behavior to the old approach of using only the long caption, but I have not tried this myself.)

@cdhutch
Copy link
Contributor Author

cdhutch commented Nov 24, 2020

Thanks for the response. Your first suggestion would work well going forward, but I have so many documents that are "pre #177" that it would be a lot of work to go back and change them. Modifying MMD code itself would provide a low ROI, given that I haven't touched C since 1991. Instead, I'll pursue redefining \caption[]{} in my MMD latex config files.

I'll report back with that solution once I get it working.

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