emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Derek Feichtinger <dfeich@gmail.com>
To: Derek Feichtinger <dfeich@gmail.com>, 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, 3 Apr 2015 21:52:32 +0200	[thread overview]
Message-ID: <CALGTQTY+VvX98sTz5Srs3MZYaOWdO1L7HUvdUpLS3Xyo-=nMLw@mail.gmail.com> (raw)
In-Reply-To: <874moxyq7m.fsf@nicolasgoaziou.fr>

[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]

Hi, Nicolas

thanks for responding so fast. Sure, I'll try and submit the patch.
Thanks for all your great work!

Happy Easter,
Derek

On Fri, Apr 3, 2015 at 9:19 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> 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
>

[-- Attachment #2: Type: text/html, Size: 2719 bytes --]

  reply	other threads:[~2015-04-03 19:52 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
2015-04-03 19:52   ` Derek Feichtinger [this message]
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='CALGTQTY+VvX98sTz5Srs3MZYaOWdO1L7HUvdUpLS3Xyo-=nMLw@mail.gmail.com' \
    --to=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).