From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Always use \hyperref for internal Links in PDF export? Date: Mon, 30 Jun 2014 14:43:58 +0200 Message-ID: <87egy6musx.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1avk-0002KN-Nz for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 08:43:40 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1avX-0004Wj-Qm for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 08:43:32 -0400 Received: from relay3-d.mail.gandi.net ([2001:4b98:c:538::195]:53106) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1avX-0004WG-KP for emacs-orgmode@gnu.org; Mon, 30 Jun 2014 08:43:19 -0400 In-Reply-To: (Bernd Haug's message of "Sun, 29 Jun 2014 23:42:26 +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: Bernd Haug Cc: emacs-orgmode Hello, Bernd Haug writes: > Given a Document: > > =E2=80=94 > [[Section 1]] > > Bla, bla > > [[Section 2]] > > The blah blah is [[Section1][covered well above]], so let me just say: > [[Section 1]]! > =E2=80=94 > > I get: > > =E2=80=94 > =E2=80=A6 > The blah blah is \hyperref[Section 1]{covered well above}, so let me > just say: \ref{Section 1} > =E2=80=A6 > =E2=80=94 > > Is there a any way (without just always writing [[Section 1][Section > 1]]) to always get the former behaviour, but just repeating the Title > itself if no explicit link text was provided? That is: > > =E2=80=94 > =E2=80=A6 > The blah blah is \hyperref[Section 1]{covered well above}, so let me > just say: \hyperref[Section 1]{Section 1} Not out of the box: this is a feature. Though, you can write a macro for that: #+MACRO: sec [[$1][$1]] and, instead of writing [[Section 1]] you will use {{{sec(Section 1)}}} Obviously, it only works if the value is exactly the same if both arguments. Regards, --=20 Nicolas Goaziou