emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric S Fraga <e.fraga@ucl.ac.uk>
To: emacs-orgmode@gnu.org
Subject: ox-bibtex works well with \cite{} entries but not with cite: links
Date: Mon, 8 Jul 2013 14:21:51 +0100	[thread overview]
Message-ID: <87li5hmbkg.fsf@pinto.chemeng.ucl.ac.uk> (raw)

Hi,

as noted a while back, I use cite:bibref type links in org to write
LaTeX papers.  I have defined the cite link type as follows:

#+begin_src emacs-lisp
(org-add-link-type "cite" 'ebib
                   (lambda (path desc format)
                     (cond
                      ((eq format 'latex)
                       (format "\\cite{%s}" path)))))
#+end_src

This works really well for LaTeX export.  However, it doesn't work at
all for html export.  Obviously, I can add an html target but this
would only allow me a simple formatting capability.

I have played around with ox-bibtex.  This works well for both LaTeX and
HTML exports so long as I use \cite{bibref} directly in my org text
which is not as elegant.

I was wondering what would be required to get ox-bibtex to interpret
cite: links?  I tried adding html as a valid target above, e.g. by using

:  ((or (eq format 'latex) (eq format 'html))

but the expansion of links happens after the processing done by
ox-bibtex and so any \cite{bibref} text gets passed through to the HTML
export directly without processing.

Any suggestions welcome and greatly appreciated.

Thanks,
eric

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 24.3.50.1, Org release_8.0.5-318-gfdaa99

             reply	other threads:[~2013-07-08 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-08 13:21 Eric S Fraga [this message]
2013-07-08 13:57 ` ox-bibtex works well with \cite{} entries but not with cite: links Nicolas Goaziou
2013-07-09 19:39   ` Eric S Fraga
2013-07-09 19:56     ` Eric S Fraga
2013-07-09 20:15       ` Nicolas Goaziou
2013-07-09 22:24         ` Eric S Fraga
2013-07-10  9:06           ` Nicolas Goaziou
2013-07-10  9:46             ` Eric S Fraga

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=87li5hmbkg.fsf@pinto.chemeng.ucl.ac.uk \
    --to=e.fraga@ucl.ac.uk \
    --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).