emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Kitchin <jkitchin@andrew.cmu.edu>
To: "Lars Bjørndal" <lars@lamasti.net>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: Citations with org-ref in apa style)
Date: Sat, 17 Jun 2017 12:17:34 -0400	[thread overview]
Message-ID: <m2tw3ewpup.fsf@andrew.cmu.edu> (raw)
In-Reply-To: <20170616124025.GA2693@lamasti.net>

I think what you want in this case is to redefine how the bibliography
link is exported.

Maybe something like this:

(org-link-set-parameters
 "bibliography"
 :export
 (lambda (bibfile desc format)
   (cond
    ((eq format 'html) (org-ref-get-html-bibliography))
    ((eq format 'latex)
     ""))))

That way you will get nothing exported for latex (so you have to keep
the same heading info for biblatex), and you get the html bibliography
too.

Lars Bjørndal writes:

> On Fri, May 26, 2017 at 01:24:03PM +0200, Lars Bjørndal wrote:
>
> [...]
>
>> After a bit of fiddling, I got it. The headers I have now, and which
>> work, are:
>>
>> #+LANGUAGE: no
>> #+OPTIONS: toc:nil timestamp:nil time:nil
>> #+LATEX_CLASS: article
>> #+LaTeX_CLASS_OPTIONS: [a4paper,norsk,12pt,listings-bw,microtype]
>> #+LATEX_HEADER: \usepackage{babel}
>> #+LATEX_HEADER: \usepackage{fancyhdr}
>> #+LATEX_HEADER: \usepackage{csquotes}
>> #+LATEX_HEADER: \usepackage[backend=biber,style=apa]{biblatex}
>> #+LATEX_HEADER: \DeclareLanguageMapping{norsk}{norsk-apa}
>>
>> #+LATEX_HEADER: \usepackage{lastpage}
>> #+LATEX_HEADER: \usepackage{hyperref}
>> #+LATEX_HEADER: \usepackage{url}
>> #+Latex_header: \addbibresource{~/mydoc/smartlaring/ref.bib}
>> #+BIBLIOGRAPHY: ~/mydoc/smartlaring/ref apa
>> #+Latex_header: \linespread{1.4}
>
> If I want HTML export with citations, I need to use
> `bibliography:ref.bib' at the end, where I want the list of
> references. However, when exporting to pdf, it works only if I have
> \printbibliography at the end. If I use bibliograph:ref.bib, I get the
> following error from pdflatex:
>
> ! LaTeX Error: Can be used only in preamble.
>
> See the LaTeX manual or LaTeX Companion for explanation.
> Type  H <return>  for immediate help.
>  ...
>
> l.368 \bibliography
>           {ref}
> ?
>
> If I type H, I get: Your command was ignored.
>
> What can I do to fix this?
>
> Thanks and regards, Lars
>
>
>> >   On Thu, May 25, 2017 at 05:36:07PM +0100, Eric S Fraga wrote:
>> >   > On Thursday, 25 May 2017 at 11:47, Lars Bjørndal wrote:
>> >   > > Hi, list!
>> >   > >
>> >   > > I'm currently writing an exam in org-mode with org-ref,
>> >   installed from
>> >   > > elpa. I think the institution expects to get the referances in
>> >   apa
>> >   > > style. So I wonder if I can do that, and how I can do it.
>> >   >
>> >   > Have you tried?  What happens?
>> >   Well, to be honest, I don't know what to replace the line in
>> >   question
>> >   with. I'm a novice both in LaTeX and in org-mode/org-ref.
>> >   Lars
>> >
>> > References
>> >
>> > 1. http://mirrors.ibiblio.org/CTAN/macros/latex/contrib/biblatex-contrib/biblatex-apa/biblatex-apa.pdf
>> > 2. http://kitchingroup.cheme.cmu.edu/
>> > 3. mailto:lars@lamasti.net
>>


--
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

  reply	other threads:[~2017-06-17 16:17 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <6dc0a293c50c44f3bffeb638fed1b744@HE1PR01MB1898.eurprd01.prod.exchangelabs.com>
2017-05-25 16:36 ` Citations with org-ref in apa style Eric S Fraga
2017-05-25 19:57   ` Lars Bjørndal
2017-05-26  0:36     ` John Kitchin
2017-05-26 11:24       ` Lars Bjørndal
2017-06-16 12:40         ` Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: Citations with org-ref in apa style) Lars Bjørndal
2017-06-17 16:17           ` John Kitchin [this message]
     [not found] <mailman.87.1497628817.13493.emacs-orgmode@gnu.org>
2017-06-17  2:25 ` Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: > " edgar
2017-06-18 20:38   ` John Kitchin
2017-06-21 19:54     ` edgar
     [not found] <mailman.96.1497715218.27257.emacs-orgmode@gnu.org>
2017-06-17 23:17 ` Bibliograph:ref.bib vs. \printbibliograpy (WAS: " edgar

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=m2tw3ewpup.fsf@andrew.cmu.edu \
    --to=jkitchin@andrew.cmu.edu \
    --cc=emacs-orgmode@gnu.org \
    --cc=lars@lamasti.net \
    /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).