emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [patch] Add footnote when exporting links in LaTeX
@ 2015-09-16 22:15 Lars Tveito
  2015-09-16 22:36 ` Rasmus
  0 siblings, 1 reply; 3+ messages in thread
From: Lars Tveito @ 2015-09-16 22:15 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Hi!

When exporting to LaTeX, links are exported using \href. These are
completely invisible if the document is printed out. I consider this a
problem.

I think a good solution is to add a footnote with the link, in addition
to the \href. I've added a patch with this (tiny) change.

- Lars

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-footnote-when-adding-a-link-in-ox-latex.patch --]
[-- Type: text/x-patch, Size: 1041 bytes --]

From 61871bbb04c437cfb48c0a0b77575a96d2fe9eaf Mon Sep 17 00:00:00 2001
From: Lars Tveito <larstvei@ifi.uio.no>
Date: Wed, 16 Sep 2015 23:57:49 +0200
Subject: [PATCH] Add footnote when adding a link in ox-latex

Links in LaTeX-documents are also added in verbatim as a footnote, so it
is visible on paper.
---
 lisp/ox-latex.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index ddbbd33..09a7c15 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -2344,7 +2344,7 @@ INFO is a plist holding contextual information.  See
       (format (org-export-get-coderef-format path desc)
 	      (org-export-resolve-coderef path info)))
      ;; External link with a description part.
-     ((and path desc) (format "\\href{%s}{%s}" path desc))
+     ((and path desc) (format "\\href{%s}{%s}\\footnote{%s}" path desc path))
      ;; External link without a description part.
      (path (format "\\url{%s}" path))
      ;; No path, only description.  Try to do something useful.
-- 
2.4.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-09-17  9:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-16 22:15 [patch] Add footnote when exporting links in LaTeX Lars Tveito
2015-09-16 22:36 ` Rasmus
2015-09-17  9:31   ` Eric S Fraga

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).