patch to make figure and table captions hyperlink targets [SF:patches:66] · Issue #598 · chrisjsewell/docutils · GitHub
More Web Proxy on the site http://driver.im/
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
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 _^$~ {[]}
The text was updated successfully, but these errors were encountered: