emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [wip-cite-new] Initial implementation of `biblatex' citation processor
@ 2021-05-18 15:13 Nicolas Goaziou
  2021-05-18 18:40 ` Bruce D'Arcus
                   ` (4 more replies)
  0 siblings, 5 replies; 46+ messages in thread
From: Nicolas Goaziou @ 2021-05-18 15:13 UTC (permalink / raw)
  To: Org Mode List

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


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

end of thread, other threads:[~2021-05-31 21:55 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 15:13 [wip-cite-new] Initial implementation of `biblatex' citation processor Nicolas Goaziou
2021-05-18 18:40 ` 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

Code repositories for project(s) associated with this 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).