From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Org Mode List <emacs-orgmode@gnu.org>
Subject: [wip-cite-new] Initial implementation of `biblatex' citation processor
Date: Tue, 18 May 2021 17:13:22 +0200 [thread overview]
Message-ID: <87bl985b3h.fsf@nicolasgoaziou.fr> (raw)
Hello,
In a rebased "wip-cite-new" branch, I made an modest attempt to write
a `biblatex' citation processor, in the file "oc-biblatex.el".
Here is what is in there. Remarks follow.
--8<---------------cut here---------------start------------->8---
This library registers the `biblatex' citation processor, which provides
the "export" capability for citations. You may activate it globally with
(setq org-cite-export-processor '(biblatex))
or at the document level, with
#+cite_export: biblatex
The processor relies on "biblatex" LaTeX package. As such it ensures that
the package is properly required in the document's preamble. More
accurately, it will re-use any "\usepackage{biblatex}" already present in
the document (e.g., through `org-latex-packages-alist'), or insert one using
options defined in `org-cite-biblatex-options'.
In any case, the library will override style-related options with those
specified with the citation processor, in `org-cite-export-processor' or
"cite_export" keyword. If you need to use different styles for bibliography
and citations, you can separate them with "bibstyle/citestyle" syntax. E.g.,
#+cite_export: natbib authortitle/authortitle-ibid
The library supports the following citation styles:
- author(a), including caps(c), full(f) and caps-full(f) variants,
- locators(l), including bare(b), caps(c) bare-caps(bc) variants,
- nocite(n),
- note(fn), including bare(b) variant,
- smart(sm), including caps(c) variant,
- super(s),
- text(t), including caps(c) variant,
- title(ti), including full(f) variant,
- year(y), including full(f) variant,
- default style, including caps(c) variant.
The default style creates "autocite" commands.
When citation and style permit, the library automatically generates
"multicite" versions of the commands above.
Bibliography is printed using "\printbibliography" command. Additional
options may be passed to it through a property list attached to the
"print_bibliography" keyword. E.g.,
#+print_bibliography: :section 2 :heading subbibliography
Values including spaces must be surrounded with double quotes. If you need
to use a key multiple times, you can separate its values with commas, but
without any space in-between:
#+print_bibliography: :keyword abc,xyz :title "Primary Sources"
--8<---------------cut here---------------end--------------->8---
The first thing worth noticing is that I changed syntax for
"print_bibliography" keyword. Previously, it was
#+print_bibliography: style
but specifying a local style was not so useful. So, now, it accepts
a property list instead, as it was suggested in a related message about
filtering bibliography.
The library distinguishes two citation styles: one for the package
itself (e.g., when using "bibstyle/citestyle" syntax), and one for
generating the commands (when using #+cite_export: biblatex ... style).
Using "style" for both may be misleading. We may use "citation type" to
designate constructs like [cite/something:...] instead.
I don't use biblatex, but I'm not convinced by the default autocite
command. Wouldn't parencite be more predictable? Also, adding
#+cite_export biblatex ... auto
to trigger autocite by default seems easy enough. In any case, feel free
to suggest more styles/types to the list.
Is there any crucial feature missing?
I didn't test it much so it probably contains silly bugs. Sorry about
that.
Feedback is highly appreciated.
Regards,
--
Nicolas Goaziou
next reply other threads:[~2021-05-18 15:46 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 15:13 Nicolas Goaziou [this message]
2021-05-18 18:40 ` [wip-cite-new] Initial implementation of `biblatex' citation processor Bruce D'Arcus
2021-05-20 7:22 ` Rudolf Adamkovič
2021-05-20 10:38 ` Bruce D'Arcus
2021-05-19 10:03 ` Denis Maier
2021-05-19 10:43 ` Bruce D'Arcus
2021-05-19 12:33 ` Denis Maier
2021-05-19 13:44 ` Nicolas Goaziou
2021-05-19 13:50 ` Bruce D'Arcus
2021-05-19 14:31 ` Denis Maier
2021-05-19 14:46 ` Bruce D'Arcus
2021-05-19 15:23 ` Nicolas Goaziou
2021-05-20 8:04 ` Denis Maier
2021-05-20 10:36 ` Bruce D'Arcus
2021-05-20 11:56 ` Bruce D'Arcus
2021-05-20 11:59 ` Bruce D'Arcus
2021-05-20 13:24 ` Denis Maier
2021-05-20 13:07 ` Denis Maier
2021-05-20 13:22 ` Bruce D'Arcus
2021-05-20 13:56 ` Denis Maier
2021-05-20 14:11 ` Bruce D'Arcus
2021-05-20 14:29 ` Denis Maier
2021-05-20 15:14 ` Bruce D'Arcus
2021-05-20 17:06 ` Nicolas Goaziou
2021-05-20 21:51 ` Denis Maier
2021-05-20 22:37 ` Thomas S. Dye
2021-05-20 22:51 ` Bruce D'Arcus
2021-05-21 0:07 ` Thomas S. Dye
2021-05-21 13:38 ` Nicolas Goaziou
2021-05-20 13:08 ` Denis Maier
2021-05-20 17:15 ` Nicolas Goaziou
2021-05-20 21:54 ` Denis Maier
2021-05-21 13:29 ` Nicolas Goaziou
2021-05-20 14:32 ` Denis Maier
2021-05-19 13:00 ` Denis Maier
2021-05-21 11:49 ` Bruce D'Arcus
2021-05-21 13:13 ` Nicolas Goaziou
2021-05-21 13:25 ` Bruce D'Arcus
2021-05-25 14:30 ` Bruce D'Arcus
2021-05-26 20:04 ` Nicolas Goaziou
2021-05-29 14:44 ` [org-cite, oc-csl] print_bibliography options Bruce D'Arcus
2021-05-29 15:15 ` Nicolas Goaziou
2021-05-29 16:03 ` Bruce D'Arcus
2021-05-29 16:30 ` Nicolas Goaziou
2021-05-31 18:10 ` András Simonyi
2021-05-31 21:54 ` Bruce D'Arcus
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=87bl985b3h.fsf@nicolasgoaziou.fr \
--to=mail@nicolasgoaziou.fr \
--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).