8000 patch to make figure and table captions hyperlink targets [SF:patches:66] · Issue #598 · chrisjsewell/docutils · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

patch to make figure and table captions hyperlink targets [SF:patches:66] #598

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

Open
chrisjsewell opened this issue Aug 9, 2020 · 0 comments

Comments

@chrisjsewell
Copy link
Owner

author: terry_n_brown
created: 2009-11-25 18:10:15
assigned: None
SF_url: https://sourceforge.net/p/docutils/patches/66

This patch makes figure and table captions hyperlink targets. It was difficult to set the \label{} inserted into the latex longtable in the required place (after the \caption, but not at the end where it added trailing garbage) so the patch assumes the id in get_caption().

Only HTML and (old)latex supported.


commenter: terry_n_brown
posted: 2009-11-25 18:10:15
title: #66 patch to make figure and table captions hyperlink targets

attachments:

patch to make figure and table captions hyperlink targets


commenter: milde
posted: 2011-06-07 15:18:34
title: #66 patch to make figure and table captions hyperlink targets

Thanks for the patch. However,
I'd prefer manual labeling over the auto-labels for all figures and tables.

Also,
+++ docutils/docutils/writers/latex2e/__init__.py 2009-11-25 12:05:28.000000000 -0600
@@ -743,8 +743,9 @@
if not self.caption:
return ''
caption = ''.join(self.caption)
+ label = "\\label{%s}" % '-'.join(caption.lower().split())

will fail if the caption contains any special ("forbidden") characters like _^$~ {[]}

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

1 participant
0