aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLudovic Courtès2009-01-05 15:58:59 +0100
committerLudovic Courtès2009-01-05 15:58:59 +0100
commit5b8d38f3c22a0e241568d70fdb6d372561683389 (patch)
tree6da498308b35636b30ab8811c5746d67da3ae79c /src
parentf00ddf9d153001e9f2be219af8cf804db2b06c54 (diff)
downloadskribilo-5b8d38f3c22a0e241568d70fdb6d372561683389.tar.gz
skribilo-5b8d38f3c22a0e241568d70fdb6d372561683389.tar.lz
skribilo-5b8d38f3c22a0e241568d70fdb6d372561683389.zip
html: Produce hyperlinks back to the call site of footnotes.
* src/guile/skribilo/engine/html.scm (&html-footnotes): Produce a hyperlink to `footenote-site-...'. (footnote): Produce an anchor named `footnote-site-...' for back references. Suggested by Klaus Schilling <schilling.klaus@web.de>. * NEWS: Update.
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/engine/html.scm12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm
index 3268e05..0fded86 100644
--- a/src/guile/skribilo/engine/html.scm
+++ b/src/guile/skribilo/engine/html.scm
@@ -1,6 +1,6 @@
;;; html.scm -- HTML engine.
;;;
-;;; Copyright 2005, 2006, 2007, 2008 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright 2005, 2006, 2007, 2008, 2009 Ludovic Courtès <ludo@gnu.org>
;;; Copyright 2003, 2004 Manuel Serrano
;;;
;;;
@@ -936,7 +936,10 @@
(format #t "<a name=\"footnote-~a\">"
(string-canonicalize
(container-ident fn)))
- (format #t "<sup><small>~a</small></sup></a>: "
+ (format #t "<a href=\"#footnote-site-~a\">"
+ (string-canonicalize
+ (container-ident fn)))
+ (format #t "<sup><small>~a</small></sup></a></a> "
(markup-option fn :label))
(output (markup-body fn) e)
(display "\n<br>\n")
@@ -1383,9 +1386,12 @@
(markup-writer 'footnote
:options '(:label)
:action (lambda (n e)
+ (format #t "<a name=\"footnote-site-~a\">"
+ (string-canonicalize (container-ident n)))
(format #t "<a href=\"#footnote-~a\"><sup><small>~a</small></sup></a>"
(string-canonicalize (container-ident n))
- (markup-option n :label))))
+ (markup-option n :label))
+ (format #t "</a>")))
;*---------------------------------------------------------------------*/
;* linebreak ... */