andras-simonyi / citeproc-org

Renders Org-mode citations in CSL styles using citeproc-el.
GNU General Public License v3.0
68 stars 2 forks source link

How to cite "Erickson (2019)" instead of "(Erickson, 2019)" #17

Closed rudolf-adamkovic closed 3 years ago

rudolf-adamkovic commented 3 years ago

First, thank you so much for the package; I installed it, and it just works. Great work! That said, I cannot figure out one issue: I am using APA 7 CSL, and when I type cite:erickson-2019 in Org, I get "(Erickson, 2019)" in HTML. This matches \parencite in LaTeX, and everything is good. Sometimes, though, I would like to cite as \textcite does in LaTeX, that is to render "Erickson (2019)" in HTML. Is this possible?

andras-simonyi commented 3 years ago

Hello, thanks, I'm glad that you find the package helpful. Unfortunately, fully functional \textcite-like citations are not (yet) supported, the closest what citeproc-org can do at the moment is suppressing the author in the citation. With the default settings this can be achieved by using a citeyear: link instead of cite:. (See the "Suppressing affixes and author names in citations" section of the Readme for some more details.)

rudolf-adamkovic commented 3 years ago

Thank you for replying! Well, that is unfortunate. Coming to Emacs (after 20 years with Vim), I expected citations to had been sorted out long ago in the oh-so-hyped Org Mode. LaTeX (and Pandoc) to the rescue!

andras-simonyi commented 3 years ago

Well it doesn't really have much to do with Org, rather with citation and bibliography processors in general. Certain LaTeX-based processors like biblatex are very feature-rich but are -- understandably -- limited to LaTeX output. With this limitation they can be used in Org as well. The most mature format-agnostic solutions are provided by CSL-based processors, but the stable version of the CSL standard (1.1) does not support textual citations, the next version AFAIK will.

bdarcus commented 3 years ago

FWIW, @andras-simonyi, the way this tends to be implemented is concatenating author-only + suppress-author.

The most mature format-agnostic solutions are provided by CSL-based processors, but the stable version of the CSL standard (1.1) does not support textual citations, the next version AFAIK will.

Yes. Per above, some processors (notably citeproc-js and pandoc) do implement it now. It's that 1.2 will have explicit support this, including the possibility to configure different author rendering for in-text vs not.

I expected citations to be sorted out long ago in the oh-so-hyped Org Mode.

Not sure if this was your intention to be snide, @salutis, but it sure reads that way.

Citations aren't easy; balancing the wide range of customization needs, and also making it easy for users.

rudolf-adamkovic commented 3 years ago

@bdarcus

Not sure if this was your intention to be snide, @salutis, but it sure reads that way.

I apologize. Here is what I meant.

Before I decided to use Emacs, I had been hearing about how Org Mode is excellent for writing, including in academic setting. Hence, I expected the two most basic types of in-text citations to work out of the box. I did not mean to be snide, rather I meant to communicate my surprise.

By the way, I had the similar experience with Magit. The package is praised to heaven, so I was surprised to find that the program is also syrupy compared to other Git clients. (Syrupy as in a bit slow.) I like Magit, like everyone else, but we shall be honest.

That said, to avoid any misunderstandings, I am impressed with Emacs, and I plan to keep using it. I also plan to start regularly contributing to the community as I settle down.

CC: @andras-simonyi

bdarcus commented 3 years ago

Sounds good @salutis!

You will likely be pleased to know, if you don't already, that native org citation support, inspired largely by biblatex and pandoc support, should soon to be merged to master for Org, with planned released in Org 9.5.

That includes a natbib export processor, and no doubt in the future also biblatex and citeproc-org.

In short, it's a good mid-to-long-term picture.

If you need to be productive now, you can, as I think you are planning, use the pandoc syntax within org files, and process the files with pandoc.

Should be easy enough to convert those citations to the new syntax once released.

PS - I have a draft of the org-cite citation insertion UI in my package at this PR: https://github.com/bdarcus/bibtex-actions/pull/113, which will likely end up in some form in bibtex-completion, and so also also helm-bibtex and ivy-bibtex.

rudolf-adamkovic commented 3 years ago

Thank you, @bdarcus, for all the explanations; they brought much-needed clarity to me. To be honest, my head spins a little from all these packages, while amusingly, all I want is the two most 101 in-text citations (in APA) and nothing more. That said, I will keep an eye on the landscape (today I subscribed to the Org mailing list), and, in the meantime, I will either use Pandoc, as you suggested, or keep fixing my in-text citations in HTML manually. Again, thank you so much for taking time to explain the situation to me.

rudolf-adamkovic commented 3 years ago

It is happening! BibLaTeX support:

https://orgmode.org/list/3bb1373f-d288-bedd-537c-5e885d77e3f9@mailbox.org/T/#m308dd162fb6b4f43ee899bfa9ad379446ba8d46a

andras-simonyi commented 3 years ago

If there are no objections I will close this issue shortly as the discussion seems to have petered out.

rudolf-adamkovic commented 3 years ago

@andreas

If there are no objections I will close this issue shortly as the discussion seems to have petered out.

Definitely. Closing.

andras-simonyi commented 3 years ago

A short follow-up on this: support for textual citations has now been added to citeproc-el and is available right now in the org_cite_backports branch of citeproc-org, hopefully it will also be included in org-cite as well soon. A patched version of the org-cite CSL processor which already supports textual cites can be found here: https://gist.github.com/andras-simonyi/c79865da0b3252199b55d093f5a4ad64