emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: Citations wi


From: John Kitchin
Subject: Re: [O] Bibliograph:ref.bib vs. \printbibliograpy (WAS: Re: Citations with org-ref in apa style)
Date: Sat, 17 Jun 2017 12:17:34 -0400
User-agent: mu4e 0.9.19; emacs 25.2.1

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:address@hidden
>>


--
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 via email to

[Prev in Thread] Current Thread [Next in Thread]