From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [patch] Add footnote when exporting links in LaTeX Date: Thu, 17 Sep 2015 00:36:59 +0200 Message-ID: <87fv2e7zzo.fsf@gmx.us> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcLKE-0003Xp-ME for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 18:37:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZcLKB-0006ls-GR for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 18:37:14 -0400 Received: from plane.gmane.org ([80.91.229.3]:45556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZcLKB-0006lo-9X for emacs-orgmode@gnu.org; Wed, 16 Sep 2015 18:37:11 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZcLK6-000308-8V for emacs-orgmode@gnu.org; Thu, 17 Sep 2015 00:37:06 +0200 Received: from 46.166.190.131 ([46.166.190.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Sep 2015 00:37:06 +0200 Received: from rasmus by 46.166.190.131 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Sep 2015 00:37:06 +0200 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hej Lars, Thanks for your patch. Lars Tveito 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