emacs-orgmode
[Top][All Lists]
Advanced

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

Re: @string abbreviation in bib file not honored in (basic) org-cite [an


From: Alain . Cochard
Subject: Re: @string abbreviation in bib file not honored in (basic) org-cite [and a minimal working example with natbib]
Date: Sat, 9 Jul 2022 08:10:45 +0200

Bruce D'Arcus writes on Fri  8 Jul 2022 08:05:
 > On Fri, Jul 8, 2022 at 7:25 AM <Alain.Cochard@unistra.fr> wrote:
 > 
 > > As I do not know which of these alternatives
 > >
 > >    - it is normal, this feature should not be there,
 > >    - it is an oversight,
 > >    - this feature is not implemented yet,
 > 
 > I believe this is the answer, and it's arguable (I have no opinion,
 > and could see reasonable arguments either way) whether a "basic"
 > processor should support it?

Is someone using natbib/bibtex (say) expected to never ever use
'basic'? (I don't know.) If so, perhaps there is indeed no need to
implement the feature.  Otherwise, it seems to me that not
implementing it amounts to having to give up on @string altogether.

 > The parsebib library, which most third party packages use (for
 > org-cite, there's my citar), does support this feature.

Thank you.  I guess that if it would have be mentioned I would have
silently accepted it.

Some context: although I have been using org-mode for more than 5
years, I had always delayed the "bibliography step", namely, learn
org-ref.  But wait, now there is org-cite, so which one should I
learn?  Spending days (literally) reading a lot of material, trying to
digest the terminology (it is a real mess).  OK, org-cite seems to be
the future, so I'll give it a try.  First elementary test -> failure
-- so frustrating.  I conclude that the project is not mature enough
(at least the documentation), and I give up.  It is only because I
could not have org-ref work either that I came back to org-cite.

I take the opportunity to say that I think that the simple
self-contained example

   #+bibliography: references.bib
   [cite:@key]
   #+print_bibliography:

should be part of the manual, especially since the
2021-07-31-citations post does not seem to be referred to in the
manual any more (I have org version 9.5.4).

Frankly, the manual was cryptic to me at the beginning (and still is,
to a significant extent -- granted, I am a very slow learner), and I
don't know how much time it would have taken me to come up with this
simple example.

Similar minimal examples with natbib, biblatex, etc., together with
the required instructions in the emacs init file, would also be most
welcome (I spent a day to have one work for me with natbib...  I
include it below, in case it could be useful to someone else; the
examples I found on this mailing list did not work for me).  I
understand that it is not possible to provide an example for each
possible combination of the parameters, but a few ones are perhaps a
reasonable wish?  Not only a working example helps to get started, but
it also helps a lot to understand the documentation in return.
Furthermore, it gets much easier to ask for help: "I did this (or a
slight modification of it), it does not work, please help".

Many thanks and congratulations for org-cite.

Regards.

---------------------------------
my setup for org-cite with natbib
---------------------------------

org file:
---------
#+cite_export: natbib plainnat
#+bibliography: cite.bib
[cite:@chouet88] 
#+print_bibliography:

NB: 'plainnat' above refers to file
/usr/share/texlive/texmf-dist/bibtex/bst/natbib/plainnat.bst, which,
on my Fedora 34 GNU/Linux distribution, is part of the
texlive-natbib-svn20668.8.31b-39.fc34.noarch rpm package.

cite.bib file:
--------------
@string{jgr="J. Geophys. Res."}
@ARTICLE{chouet88,
journal=jgr,
author={Chouet, B.}, title={Resonance of a fluid-driven crack: [...]},
year={1988}, volume={93}, number={B5}, pages={4375-4400}
}

emacs init file:
----------------
(require 'oc-natbib)
(setq org-latex-pdf-process '("pdflatex -interaction nonstopmode
-output-directory %o %f" "bibtex %b" "pdflatex -interaction
nonstopmode -output-directory %o %f" "pdflatex -interaction
nonstopmode -output-directory %o %f" ) )

NB: It does not work for me without '-interaction nonstopmode' (I have
emacs 27.2 and org 9.5.4.).

Then 'C-c C-e l o' from the org file to display the pdf, which shows:

Contents
[Chouet, 1988]
References
B. Chouet. Resonance of a fluid-driven crack: [...]. J. Geophys. Res.,
93(B5): 4375–4400, 1988.

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]




reply via email to

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