From: Lars Tveito <larstvei@ifi.uio.no>
To: emacs-orgmode@gnu.org
Subject: [patch] Add footnote when exporting links in LaTeX
Date: Thu, 17 Sep 2015 00:15:30 +0200 [thread overview]
Message-ID: <m2pp1iovst.fsf@ifi.uio.no> (raw)
[-- 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
next reply other threads:[~2015-09-16 22:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 22:15 Lars Tveito [this message]
2015-09-16 22:36 ` [patch] Add footnote when exporting links in LaTeX Rasmus
2015-09-17 9:31 ` Eric S Fraga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2pp1iovst.fsf@ifi.uio.no \
--to=larstvei@ifi.uio.no \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).