From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konstantin Kliakhandler Subject: Exporting fuzzy links using LaTeX's autoref Date: Thu, 13 Oct 2016 16:35:56 +0300 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 10.0 \(3226\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48107) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bugB1-0005Fn-3o for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 09:36:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bugAv-0001hh-96 for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 09:36:02 -0400 Received: from mail-qk0-x236.google.com ([2607:f8b0:400d:c09::236]:33871) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bugAv-0001gm-25 for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 09:35:57 -0400 Received: by mail-qk0-x236.google.com with SMTP id f128so86539632qkb.1 for ; Thu, 13 Oct 2016 06:35:55 -0700 (PDT) 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" To: clement.pit@gmail.com Cc: emacs-orgmode@gnu.org Hi Cl=C3=A9ment, I don=E2=80=99t know if you=E2=80=99ve found a satisfactory solution = yet, but I found the following to work quite well in my case: ;; Define an export function for autoref links (defun kk/org-autoref-export (path desc format) "Export an autoref type reference for the given path" (case format ('latex (string-join `("\\autoref{" ,path "}"))))) ;; Define a function for following org links (defun kk/org-follow-path (path) "Follow an org path given in the argument" (org-open-link-from-string (string-join `("[[" ,path "]]")))) ;; Register autoref link type (org-add-link-type "ar" 'kk/org-follow-path 'kk/org-autoref-export) It works fine for items that have a #+NAME attached to them, perhaps to = other stuff as well (though I haven=E2=80=99t tested this). Hope it helps. Good luck, Kosta=