From: Rasmus <rasmus@gmx.us>
To: emacs-orgmode@gnu.org
Subject: Re: [patch] Add footnote when exporting links in LaTeX
Date: Thu, 17 Sep 2015 00:36:59 +0200 [thread overview]
Message-ID: <87fv2e7zzo.fsf@gmx.us> (raw)
In-Reply-To: m2pp1iovst.fsf@ifi.uio.no
Hej Lars,
Thanks for your patch.
Lars Tveito <larstvei@ifi.uio.no> writes:
> When exporting to LaTeX, links are exported using \href. These are
> completely invisible if the document is printed out. I consider this a
> problem.
It's easy enough to fix in latex. Here's a not quite trivial solution
I've used for letters.
\documentclass{scrartcl}
\usepackage{url}
\usepackage{hyperref}
\usepackage[para,flushmargin]{footmisc}
\makeatletter
\Urlmuskip = 0mu plus 1mu
\renewcommand\@makefntext[1]{%
\hspace*{-2em}
\parindent 0em
\noindent
\hb@xt@ 2.65em{\hss % There's the option of putting \hss before
\bfseries{\@thefnmark}. }% or after \@thefnmark, aligning the footnote
#1}% marks to the right or to the left, respectively
\addtokomafont{footnotelabel}{\bfseries}
\def\myurl#1{\setbox0\vbox{\hsize.5\maxdimen
\url{#1}\par
\setbox0\lastbox
\global\setbox1\hbox{\unhbox0\unskip\unskip\unpenalty}}\unhbox1}
\let\ohref\href
\newcommand\fnurl[2]{\ohref{#2}{#1}\footnote{\myurl{#2}}}
\renewcommand{\href}[2]{\fnurl{#2}{#1}}
\makeatother
\begin{document}
foo \href{http://orgmode.org}{bar}
\end{document}
> 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.
We shouldn't hardcode this behavior.
Rasmus
--
Send from my Emacs
next prev parent reply other threads:[~2015-09-16 22:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 22:15 [patch] Add footnote when exporting links in LaTeX Lars Tveito
2015-09-16 22:36 ` Rasmus [this message]
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=87fv2e7zzo.fsf@gmx.us \
--to=rasmus@gmx.us \
--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).