emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [patch] Add footnote when exporting links in LaTeX


From: Rasmus
Subject: Re: [O] [patch] Add footnote when exporting links in LaTeX
Date: Thu, 17 Sep 2015 00:36:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hej Lars,

Thanks for your patch.

Lars Tveito <address@hidden> 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
    address@hidden
      \hspace*{-2em}
      \parindent 0em
      \noindent
      address@hidden@ 2.65em{\hss %  There's the option of putting \hss before
        address@hidden }%       or after address@hidden, 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]