From mboxrd@z Thu Jan 1 00:00:00 1970 From: Serge Cohen Subject: LaTeX export and org-add-link-type Date: Mon, 21 Jul 2014 15:28:11 +0200 Message-ID: <31BC1F66-F059-4BD6-8AFA-B9992166CB05@synchrotron-soleil.fr> Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.2\)) Content-Type: multipart/signed; boundary="Apple-Mail=_A3F33547-EA73-42A1-AFC1-401AD0CF565D"; protocol="application/pgp-signature"; micalg=pgp-sha1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36338) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9Ddm-00037S-IC for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 09:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X9Ddf-000108-Eo for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 09:28:30 -0400 Received: from smtp3-g21.free.fr ([2a01:e0c:1:1599::12]:40997) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X9Ddf-0000zD-7v for emacs-orgmode@gnu.org; Mon, 21 Jul 2014 09:28:23 -0400 Received: from lettres.chocolatnoir.net (unknown [88.169.118.28]) by smtp3-g21.free.fr (Postfix) with ESMTP id 7A1E1A622F for ; Mon, 21 Jul 2014 15:28:20 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lettres.chocolatnoir.net (Postfix) with ESMTP id 36CDD409B3A for ; Mon, 21 Jul 2014 15:28:20 +0200 (CEST) Received: from lettres.chocolatnoir.net ([127.0.0.1]) by localhost (main2.chocolatnoir.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Tzf6o0cD3ZyZ for ; Mon, 21 Jul 2014 15:28:18 +0200 (CEST) Received: from ord04128.synchrotron-soleil.fr (unknown [195.221.0.206]) by lettres.chocolatnoir.net (Postfix) with ESMTP id 3245C409B30 for ; Mon, 21 Jul 2014 15:28:18 +0200 (CEST) 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 --Apple-Mail=_A3F33547-EA73-42A1-AFC1-401AD0CF565D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello list, When using hte org to LaTeX exporter, I would like to use the link-type = capabilities described here : = http://orgmode.org/worg/org-contrib/babel/examples/article-class.html#sec-= 3 To follow the instruction, I have added the lines to my ~/.emacs.el (org-add-link-type "ltx" nil (lambda (path desc format) (cond ((eq format 'html) (format "%s" = path desc)) ((eq format 'latex) (format "\\%s{%s}" path desc))))) I have even added the following call just after that (but I have the = feeling this is un-necessary, since should already be done within = org-add-link-type function). (org-make-link-regexps) Then adding a [[ltx:foo][albert]] to an org file, and exporting to a = HTML buffer, I get what I am expecting : bar But when I export to a LaTeX buffer, irrelevant to what I use as = link/path I get : \texttt{bar} To me this means that the org-link-type mechanism is bypassed when = exporting to LaTeX (indeed from org-latex.el , I have the feeling that = the function org-export-latex-link is taking care of the link parsing, = without carrign for the content of org-link-types nor = org-link-types-re). Is this normal, if so is there another way to obtain the same results as = what is proposed in the documentation ? To complete the post : I am using Aquamacs (MacOSX gui-version), based = on GNU emacs 23.4.1 The included version of org.el is Version: 6.33x Hoping someone will be able to point me to the right direction. Thanks = in advance, Serge. --Apple-Mail=_A3F33547-EA73-42A1-AFC1-401AD0CF565D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJTzRVwAAoJEMO5oacGt90wtxYQAMt2NxIYOxbsRREp5ypkc5kq esnJDWHelGN+qR6B7nN8HOR15g+vowkN5B7DjF7YpZ8Pd/iS/0ARq3cYw4ve+GFm srTiJ/ig8DIEciRvEklCiOwomcs7b4ARPdq8E12jKXUUILD7w8L5/WwhGCBF7sXs Tmp2oQK3kY5p2mYxjEvliW+drMbDNKRAC/fxDA+ekQEDqp/IFQ2CFypROzRx5jAV CyDGIjy/B+g1kMgg7X8WTm0lK+4sLQXrr0/5p97k53BVf9UJLARVRBTdEKmp4wVS UNP3KNYT+ADWnNmkzT9X5D2yAjBfiHwVFD48wQDSx8WKLq8Ax/NCLE/KK91caUXP 7mMDqWm8/CvPB/AGiZfnwvAe5eUb+U5sUa3LWD4NfkemidG/snO209f4h8xDW/dl 4xeB273I8TA9v92XZ+qOq605uoNMdViou/W6SmMizwTgP+PXAv3vm3opLHvdLVd7 DGUJa8nCEVHAFyoHVInwR4QxRxsbI6uqJTopifr0uTrj/k6gEkWBm27KvAyFawr8 wZFoDDZLu8Or0T9M+UcjXCizrIzBwxiDpI8oFD8jCoETJ+cEWaPI6WixZzY9IudZ E/JxFz/kvqDfTl0nbMRmMmU6GChEx+SU5fMXfM+WzM5UnbsYzhozhC9r+9TjJttJ dOG7uSm8bDjaXyOURx3L =VwDp -----END PGP SIGNATURE----- --Apple-Mail=_A3F33547-EA73-42A1-AFC1-401AD0CF565D--