[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[wip-cite-new] Initial implementation of `biblatex' citation processor
From: |
Nicolas Goaziou |
Subject: |
[wip-cite-new] Initial implementation of `biblatex' citation processor |
Date: |
Tue, 18 May 2021 17:13:22 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) |
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
- [wip-cite-new] Initial implementation of `biblatex' citation processor,
Nicolas Goaziou <=
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Bruce D'Arcus, 2021/05/18
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Denis Maier, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Bruce D'Arcus, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Denis Maier, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Nicolas Goaziou, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Bruce D'Arcus, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Denis Maier, 2021/05/19
- Re: [wip-cite-new] Initial implementation of `biblatex' citation processor, Bruce D'Arcus, 2021/05/19