From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Derek Feichtinger <dfeich@gmail.com>
Cc: emacs-orgmode@gnu.org
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, 03 Apr 2015 21:19:41 +0200 [thread overview]
Message-ID: <874moxyq7m.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <CALGTQTYE3W2NB0LwG2QG=cJx9SwtsMKD32_tCHuDgQbFbZjb8Q@mail.gmail.com> (Derek Feichtinger's message of "Fri, 3 Apr 2015 18:38:00 +0200")
Hello,
Derek Feichtinger <dfeich@gmail.com> 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 <http://orgmode.org/worg/org-contribute.html> for
details.
Regards,
--
Nicolas Goaziou
next prev parent reply other threads:[~2015-04-03 19:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-03 16:38 Bug: fix for latex export of doi links [8.2.10 (8.2.10-35-g19a7d6-elpaplus @ .../elpa/org-plus-contrib-20150330/)] Derek Feichtinger
2015-04-03 19:19 ` Nicolas Goaziou [this message]
2015-04-03 19:52 ` Derek Feichtinger
2015-04-03 20:34 ` Derek Feichtinger
2015-04-03 22:06 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874moxyq7m.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--cc=dfeich@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).