From mboxrd@z Thu Jan 1 00:00:00 1970 From: Derek Feichtinger Subject: Re: Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)] Date: Fri, 3 Apr 2015 22:34:12 +0200 Message-ID: References: <874moxyq7m.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a114093ae0a89670512d7dfda Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44804) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ye8IA-00046x-PH for emacs-orgmode@gnu.org; Fri, 03 Apr 2015 16:34:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ye8I9-00087J-HL for emacs-orgmode@gnu.org; Fri, 03 Apr 2015 16:34:14 -0400 Received: from mail-ig0-x22b.google.com ([2607:f8b0:4001:c05::22b]:34482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ye8I9-000879-Aj for emacs-orgmode@gnu.org; Fri, 03 Apr 2015 16:34:13 -0400 Received: by igcau2 with SMTP id au2so70265306igc.1 for ; Fri, 03 Apr 2015 13:34:12 -0700 (PDT) In-Reply-To: <874moxyq7m.fsf@nicolasgoaziou.fr> 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: Derek Feichtinger , emacs-orgmode@gnu.org --001a114093ae0a89670512d7dfda Content-Type: multipart/alternative; boundary=001a114093ae0a89620512d7dfd8 --001a114093ae0a89620512d7dfd8 Content-Type: text/plain; charset=UTF-8 Patch for the latex export of doi links is attached to this mail. Cheers, Derek On Fri, Apr 3, 2015 at 9:19 PM, Nicolas Goaziou wrote: > Hello, > > Derek Feichtinger writes: > > > The current org latex export will export a link doi:10.xyz/abcd without > > the protocol prefix as 10.xyz/abcd. Correctly, it should retain the > > prefix. > > > > An easy fix is adding "doi" to the list of protocols that retain > > the link type string in ox-latex.el, below. > > > > ################### ox-latex.el ############### > > (defun org-latex-link (link desc info) > > "Transcode a LINK object from Org to LaTeX. > > > > DESC is the description part of the link, or the empty string. > > INFO is a plist holding contextual information. See > > `org-export-data'." > > (let* ((type (org-element-property :type link)) > > (raw-path (replace-regexp-in-string > > "%" "\\%" (org-element-property :path link) nil t)) > > ;; Ensure DESC really exists, or set it to nil. > > (desc (and (not (string= desc "")) desc)) > > (imagep (org-export-inline-image-p > > link org-latex-inline-image-rules)) > > (path (cond > > ;; ----- NEXT LINE CONTAINS THE FIX ------- > > ((member type '("http" "https" "ftp" "mailto" "doi")) > > (concat type ":" raw-path)) > > ((and (string= type "file") (file-name-absolute-p raw-path)) > > (concat "file:" raw-path)) > > (t raw-path))) > > protocol) > > ############# > > Indeed. Thank you. > > Would you mind preparing a patch with "git format-patch" for correct > attribution? See for > details. > > Regards, > > -- > Nicolas Goaziou > --001a114093ae0a89620512d7dfd8 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Patch for the latex export of doi links is attached to thi= s mail.

Cheers,
Derek

On Fri, Apr 3, 2015 at 9:19 PM, Nicol= as Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,
Indeed. Thank you.

Would you mind preparing a patch with "git format-patch" for corr= ect
attribution? See <
http://orgmode.org/worg/org-contribute.html> for=
details.

Regards,

--
Nicolas Goaziou

--001a114093ae0a89620512d7dfd8-- --001a114093ae0a89670512d7dfda Content-Type: text/x-patch; charset=US-ASCII; name="0001-fix-for-latex-export-of-doi-type-links.patch" Content-Disposition: attachment; filename="0001-fix-for-latex-export-of-doi-type-links.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i821u44s0 RnJvbSBiMWU3NDk2NDg5MGYxYjYwMmQ3YzE0NGNlYzhiODM1MThhMjFkZGQ3IE1vbiBTZXAgMTcg MDA6M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