emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* MWE for BibLaTex and org-ref?
@ 2017-07-12 13:59 Loris Bennett
  2017-07-12 17:55 ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Loris Bennett @ 2017-07-12 13:59 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Does org-ref work with BibLaTeX?

With org-ref, I have an MWE using natbib that works:

  #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
  #+LATEX_HEADER: \usepackage{natbib}

  #+TITLE: MWE

  * Introduction

    This MWE was found on the internet (see cite:Botha).

  bibliographystyle:abbrvnat
  bibliography:file.bib

with 'file.bib' being

  @Online{Botha,
    author = {Charl Botha},
     title = {From org file with local bibtex to LaTeX and PDF},
      date = {2017-02-20},
       url = {https://vxlabs.com/2017/02/20/from-org-file-with-local-bibtex-to-latex-and-pdf/},
  }

For org-latex-pdf-process,  I'm using the following:

  ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o %f")

However, if I try to replace natbib by BibLaTeX via

  #+LATEX_HEADER: \usepackage{biblatex}
  #+LATEX_HEADER: \addbibresource{file.bib}

  bibliographystyle:alphabetic
  bibliography:file.bib

I get errors about the style being invalid and the \bibliography only
being allowed in the preamble.

So if it should work, does anyone have a MWE for org-ref with BibLaTeX?

Cheers,

Loris

-- 
This signature is currently under construction.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MWE for BibLaTex and org-ref?
  2017-07-12 13:59 MWE for BibLaTex and org-ref? Loris Bennett
@ 2017-07-12 17:55 ` John Kitchin
  2017-07-13  6:27   ` Loris Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: John Kitchin @ 2017-07-12 17:55 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode@gnu.org

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

org-ref should work fine for biblatex, but the setup for biblatex in the
org file is a bit different than for bibtex.

The org-ref manual can be opened by running M-x org-ref-help. Go to the **
biblatex users heading. Hopefully that is clear enough to help. If not, let
me know what is missing.

Best wishes,


John

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


On Wed, Jul 12, 2017 at 9:59 AM, Loris Bennett <loris.bennett@fu-berlin.de>
wrote:

> Hi,
>
> Does org-ref work with BibLaTeX?
>
> With org-ref, I have an MWE using natbib that works:
>
>   #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
>   #+LATEX_HEADER: \usepackage{natbib}
>
>   #+TITLE: MWE
>
>   * Introduction
>
>     This MWE was found on the internet (see cite:Botha).
>
>   bibliographystyle:abbrvnat
>   bibliography:file.bib
>
> with 'file.bib' being
>
>   @Online{Botha,
>     author = {Charl Botha},
>      title = {From org file with local bibtex to LaTeX and PDF},
>       date = {2017-02-20},
>        url = {https://vxlabs.com/2017/02/20/from-org-file-with-local-
> bibtex-to-latex-and-pdf/},
>   }
>
> For org-latex-pdf-process,  I'm using the following:
>
>   ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o %f")
>
> However, if I try to replace natbib by BibLaTeX via
>
>   #+LATEX_HEADER: \usepackage{biblatex}
>   #+LATEX_HEADER: \addbibresource{file.bib}
>
>   bibliographystyle:alphabetic
>   bibliography:file.bib
>
> I get errors about the style being invalid and the \bibliography only
> being allowed in the preamble.
>
> So if it should work, does anyone have a MWE for org-ref with BibLaTeX?
>
> Cheers,
>
> Loris
>
> --
> This signature is currently under construction.
>
>
>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MWE for BibLaTex and org-ref?
  2017-07-12 17:55 ` John Kitchin
@ 2017-07-13  6:27   ` Loris Bennett
  2017-07-13  8:34     ` Detlef Steuer
  0 siblings, 1 reply; 6+ messages in thread
From: Loris Bennett @ 2017-07-13  6:27 UTC (permalink / raw)
  To: emacs-orgmode

Hi John,

Thanks for the pointer.  I think some of the errors I was getting were
due having old temporary files (aux, bcf, ...) lying around and then
switching between natbib and biblatex.

Following the org-ref manual I now have

  #+LATEX_HEADER: \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear, hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true] {biblatex}

and then use

  bibliographystyle:authoryear

I'm now just getting the following error:

  ! Package biblatex Error: '\bibliographystyle' invalid.

Any ideas what I'm doing wrong?

Cheers,

Loris

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> org-ref should work fine for biblatex, but the setup for biblatex in
> the org file is a bit different than for bibtex.
>
> The org-ref manual can be opened by running M-x org-ref-help. Go to
> the ** biblatex users heading. Hopefully that is clear enough to
> help. If not, let me know what is missing.
>
> Best wishes,
>
> John
>
> -----------------------------------
> 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
>
> On Wed, Jul 12, 2017 at 9:59 AM, Loris Bennett <loris.bennett@fu-berlin.de> wrote:
>
>  Hi,
>
>  Does org-ref work with BibLaTeX?
>
>  With org-ref, I have an MWE using natbib that works:
>
>  #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
>  #+LATEX_HEADER: \usepackage{natbib}
>
>  #+TITLE: MWE
>
>  * Introduction
>
>  This MWE was found on the internet (see cite:Botha).
>
>  bibliographystyle:abbrvnat
>  bibliography:file.bib
>
>  with 'file.bib' being
>
>  @Online{Botha,
>  author = {Charl Botha},
>  title = {From org file with local bibtex to LaTeX and PDF},
>  date = {2017-02-20},
>  url = {https://vxlabs.com/2017/02/20/from-org-file-with-local-bibtex-to-latex-and-pdf/},
>  }
>
>  For org-latex-pdf-process, I'm using the following:
>
>  ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o %f")
>
>  However, if I try to replace natbib by BibLaTeX via
>
>  #+LATEX_HEADER: \usepackage{biblatex}
>  #+LATEX_HEADER: \addbibresource{file.bib}
>
>  bibliographystyle:alphabetic
>  bibliography:file.bib
>
>  I get errors about the style being invalid and the \bibliography only
>  being allowed in the preamble.
>
>  So if it should work, does anyone have a MWE for org-ref with BibLaTeX?
>
>  Cheers,
>
>  Loris
>
>  --
>  This signature is currently under construction.
>
>

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.bennett@fu-berlin.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MWE for BibLaTex and org-ref?
  2017-07-13  6:27   ` Loris Bennett
@ 2017-07-13  8:34     ` Detlef Steuer
  2017-07-13  9:01       ` Loris Bennett
  0 siblings, 1 reply; 6+ messages in thread
From: Detlef Steuer @ 2017-07-13  8:34 UTC (permalink / raw)
  To: emacs-orgmode

Hi!

Look here:
https://tex.stackexchange.com/questions/5091/what-to-do-to-switch-to-biblatex

In short \bibliographystyle and biblatex don't match.

Hope that helps

Detlef

Am Thu, 13 Jul 2017 08:27:17 +0200
schrieb "Loris Bennett" <loris.bennett@fu-berlin.de>:

> Hi John,
> 
> Thanks for the pointer.  I think some of the errors I was getting were
> due having old temporary files (aux, bcf, ...) lying around and then
> switching between natbib and biblatex.
> 
> Following the org-ref manual I now have
> 
>   #+LATEX_HEADER:
> \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,
> hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]
> {biblatex}
> 
> and then use
> 
>   bibliographystyle:authoryear
> 
> I'm now just getting the following error:
> 
>   ! Package biblatex Error: '\bibliographystyle' invalid.
> 
> Any ideas what I'm doing wrong?
> 
> Cheers,
> 
> Loris
> 
> John Kitchin <jkitchin@andrew.cmu.edu> writes:
> 
> > org-ref should work fine for biblatex, but the setup for biblatex in
> > the org file is a bit different than for bibtex.
> >
> > The org-ref manual can be opened by running M-x org-ref-help. Go to
> > the ** biblatex users heading. Hopefully that is clear enough to
> > help. If not, let me know what is missing.
> >
> > Best wishes,
> >
> > John
> >
> > -----------------------------------
> > 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
> >
> > On Wed, Jul 12, 2017 at 9:59 AM, Loris Bennett
> > <loris.bennett@fu-berlin.de> wrote:
> >
> >  Hi,
> >
> >  Does org-ref work with BibLaTeX?
> >
> >  With org-ref, I have an MWE using natbib that works:
> >
> >  #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
> >  #+LATEX_HEADER: \usepackage{natbib}
> >
> >  #+TITLE: MWE
> >
> >  * Introduction
> >
> >  This MWE was found on the internet (see cite:Botha).
> >
> >  bibliographystyle:abbrvnat
> >  bibliography:file.bib
> >
> >  with 'file.bib' being
> >
> >  @Online{Botha,
> >  author = {Charl Botha},
> >  title = {From org file with local bibtex to LaTeX and PDF},
> >  date = {2017-02-20},
> >  url =
> > {https://vxlabs.com/2017/02/20/from-org-file-with-local-bibtex-to-latex-and-pdf/}, }
> >
> >  For org-latex-pdf-process, I'm using the following:
> >
> >  ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o
> > %f")
> >
> >  However, if I try to replace natbib by BibLaTeX via
> >
> >  #+LATEX_HEADER: \usepackage{biblatex}
> >  #+LATEX_HEADER: \addbibresource{file.bib}
> >
> >  bibliographystyle:alphabetic
> >  bibliography:file.bib
> >
> >  I get errors about the style being invalid and the \bibliography
> > only being allowed in the preamble.
> >
> >  So if it should work, does anyone have a MWE for org-ref with
> > BibLaTeX?
> >
> >  Cheers,
> >
> >  Loris
> >
> >  --
> >  This signature is currently under construction.
> >
> >  
> 



-- 

"Wisely and slow. Those stumble that run fast."
Shakespeare -- Romeo and Juliet

Dr. Detlef Steuer
Helmut-Schmidt-Universität
Fakultät WiSo
Holstenhofweg 85
22043 Hamburg

Tel:  040/6541-2819
mail: steuer@hsu-hh.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MWE for BibLaTex and org-ref?
  2017-07-13  8:34     ` Detlef Steuer
@ 2017-07-13  9:01       ` Loris Bennett
  2017-07-17 14:52         ` John Kitchin
  0 siblings, 1 reply; 6+ messages in thread
From: Loris Bennett @ 2017-07-13  9:01 UTC (permalink / raw)
  To: emacs-orgmode

Hi Detlef,

Thanks for the information.  After removing the bibliography and
bibliographystyle, everything seems to work.  I think I was confused by
the following line from the org-ref manual:

  For LaTeX export a bibliography and bibliographystyle link is /required/.

Are they only required if I am *not* using biblatex, or, if I *am* using
biblatex, are some org-ref goodies not going to work if I don't have
them?

Cheers,

Loris

Detlef Steuer <steuer@unibw-hamburg.de> writes:

> Hi!
>
> Look here:
> https://tex.stackexchange.com/questions/5091/what-to-do-to-switch-to-biblatex
>
> In short \bibliographystyle and biblatex don't match.
>
> Hope that helps
>
> Detlef
>
> Am Thu, 13 Jul 2017 08:27:17 +0200
> schrieb "Loris Bennett" <loris.bennett@fu-berlin.de>:
>
>> Hi John,
>> 
>> Thanks for the pointer.  I think some of the errors I was getting were
>> due having old temporary files (aux, bcf, ...) lying around and then
>> switching between natbib and biblatex.
>> 
>> Following the org-ref manual I now have
>> 
>>   #+LATEX_HEADER:
>> \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,
>> hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]
>> {biblatex}
>> 
>> and then use
>> 
>>   bibliographystyle:authoryear
>> 
>> I'm now just getting the following error:
>> 
>>   ! Package biblatex Error: '\bibliographystyle' invalid.
>> 
>> Any ideas what I'm doing wrong?
>> 
>> Cheers,
>> 
>> Loris
>> 
>> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>> 
>> > org-ref should work fine for biblatex, but the setup for biblatex in
>> > the org file is a bit different than for bibtex.
>> >
>> > The org-ref manual can be opened by running M-x org-ref-help. Go to
>> > the ** biblatex users heading. Hopefully that is clear enough to
>> > help. If not, let me know what is missing.
>> >
>> > Best wishes,
>> >
>> > John
>> >
>> > -----------------------------------
>> > 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
>> >
>> > On Wed, Jul 12, 2017 at 9:59 AM, Loris Bennett
>> > <loris.bennett@fu-berlin.de> wrote:
>> >
>> >  Hi,
>> >
>> >  Does org-ref work with BibLaTeX?
>> >
>> >  With org-ref, I have an MWE using natbib that works:
>> >
>> >  #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
>> >  #+LATEX_HEADER: \usepackage{natbib}
>> >
>> >  #+TITLE: MWE
>> >
>> >  * Introduction
>> >
>> >  This MWE was found on the internet (see cite:Botha).
>> >
>> >  bibliographystyle:abbrvnat
>> >  bibliography:file.bib
>> >
>> >  with 'file.bib' being
>> >
>> >  @Online{Botha,
>> >  author = {Charl Botha},
>> >  title = {From org file with local bibtex to LaTeX and PDF},
>> >  date = {2017-02-20},
>> >  url =
>> > {https://vxlabs.com/2017/02/20/from-org-file-with-local-bibtex-to-latex-and-pdf/}, }
>> >
>> >  For org-latex-pdf-process, I'm using the following:
>> >
>> >  ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o
>> > %f")
>> >
>> >  However, if I try to replace natbib by BibLaTeX via
>> >
>> >  #+LATEX_HEADER: \usepackage{biblatex}
>> >  #+LATEX_HEADER: \addbibresource{file.bib}
>> >
>> >  bibliographystyle:alphabetic
>> >  bibliography:file.bib
>> >
>> >  I get errors about the style being invalid and the \bibliography
>> > only being allowed in the preamble.
>> >
>> >  So if it should work, does anyone have a MWE for org-ref with
>> > BibLaTeX?
>> >
>> >  Cheers,
>> >
>> >  Loris
>> >
>> >  --
>> >  This signature is currently under construction.
>> >
>> >  
>> 

-- 
Dr. Loris Bennett (Mr.)
ZEDAT, Freie Universität Berlin         Email loris.bennett@fu-berlin.de

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: MWE for BibLaTex and org-ref?
  2017-07-13  9:01       ` Loris Bennett
@ 2017-07-17 14:52         ` John Kitchin
  0 siblings, 0 replies; 6+ messages in thread
From: John Kitchin @ 2017-07-17 14:52 UTC (permalink / raw)
  To: Loris Bennett; +Cc: emacs-orgmode

I added some clarification to the manual on that point. Thanks for
pointing out it was a confusing!

best wishes,

Loris Bennett writes:

> Hi Detlef,
>
> Thanks for the information.  After removing the bibliography and
> bibliographystyle, everything seems to work.  I think I was confused by
> the following line from the org-ref manual:
>
>   For LaTeX export a bibliography and bibliographystyle link is /required/.
>
> Are they only required if I am *not* using biblatex, or, if I *am* using
> biblatex, are some org-ref goodies not going to work if I don't have
> them?
>
> Cheers,
>
> Loris
>
> Detlef Steuer <steuer@unibw-hamburg.de> writes:
>
>> Hi!
>>
>> Look here:
>> https://tex.stackexchange.com/questions/5091/what-to-do-to-switch-to-biblatex
>>
>> In short \bibliographystyle and biblatex don't match.
>>
>> Hope that helps
>>
>> Detlef
>>
>> Am Thu, 13 Jul 2017 08:27:17 +0200
>> schrieb "Loris Bennett" <loris.bennett@fu-berlin.de>:
>>
>>> Hi John,
>>> 
>>> Thanks for the pointer.  I think some of the errors I was getting were
>>> due having old temporary files (aux, bcf, ...) lying around and then
>>> switching between natbib and biblatex.
>>> 
>>> Following the org-ref manual I now have
>>> 
>>>   #+LATEX_HEADER:
>>> \usepackage[citestyle=authoryear-icomp,bibstyle=authoryear,
>>> hyperref=true,backref=true,maxcitenames=3,url=true,backend=biber,natbib=true]
>>> {biblatex}
>>> 
>>> and then use
>>> 
>>>   bibliographystyle:authoryear
>>> 
>>> I'm now just getting the following error:
>>> 
>>>   ! Package biblatex Error: '\bibliographystyle' invalid.
>>> 
>>> Any ideas what I'm doing wrong?
>>> 
>>> Cheers,
>>> 
>>> Loris
>>> 
>>> John Kitchin <jkitchin@andrew.cmu.edu> writes:
>>> 
>>> > org-ref should work fine for biblatex, but the setup for biblatex in
>>> > the org file is a bit different than for bibtex.
>>> >
>>> > The org-ref manual can be opened by running M-x org-ref-help. Go to
>>> > the ** biblatex users heading. Hopefully that is clear enough to
>>> > help. If not, let me know what is missing.
>>> >
>>> > Best wishes,
>>> >
>>> > John
>>> >
>>> > -----------------------------------
>>> > 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
>>> >
>>> > On Wed, Jul 12, 2017 at 9:59 AM, Loris Bennett
>>> > <loris.bennett@fu-berlin.de> wrote:
>>> >
>>> >  Hi,
>>> >
>>> >  Does org-ref work with BibLaTeX?
>>> >
>>> >  With org-ref, I have an MWE using natbib that works:
>>> >
>>> >  #+LATEX_CLASS_OPTIONS: [a4paper, 11pt]
>>> >  #+LATEX_HEADER: \usepackage{natbib}
>>> >
>>> >  #+TITLE: MWE
>>> >
>>> >  * Introduction
>>> >
>>> >  This MWE was found on the internet (see cite:Botha).
>>> >
>>> >  bibliographystyle:abbrvnat
>>> >  bibliography:file.bib
>>> >
>>> >  with 'file.bib' being
>>> >
>>> >  @Online{Botha,
>>> >  author = {Charl Botha},
>>> >  title = {From org file with local bibtex to LaTeX and PDF},
>>> >  date = {2017-02-20},
>>> >  url =
>>> > {https://vxlabs.com/2017/02/20/from-org-file-with-local-bibtex-to-latex-and-pdf/}, }
>>> >
>>> >  For org-latex-pdf-process, I'm using the following:
>>> >
>>> >  ("latexmk -g -pdf -pdflatex=\"%latex\" -shell-escape -outdir=%o
>>> > %f")
>>> >
>>> >  However, if I try to replace natbib by BibLaTeX via
>>> >
>>> >  #+LATEX_HEADER: \usepackage{biblatex}
>>> >  #+LATEX_HEADER: \addbibresource{file.bib}
>>> >
>>> >  bibliographystyle:alphabetic
>>> >  bibliography:file.bib
>>> >
>>> >  I get errors about the style being invalid and the \bibliography
>>> > only being allowed in the preamble.
>>> >
>>> >  So if it should work, does anyone have a MWE for org-ref with
>>> > BibLaTeX?
>>> >
>>> >  Cheers,
>>> >
>>> >  Loris
>>> >
>>> >  --
>>> >  This signature is currently under construction.
>>> >
>>> >  

>>> 

-- 
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2017-07-17 14:52 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-12 13:59 MWE for BibLaTex and org-ref? Loris Bennett
2017-07-12 17:55 ` John Kitchin
2017-07-13  6:27   ` Loris Bennett
2017-07-13  8:34     ` Detlef Steuer
2017-07-13  9:01       ` Loris Bennett
2017-07-17 14:52         ` John Kitchin

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