Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose AuthorOnly as CitationMode #8331

Open
rgaiacs opened this issue Sep 29, 2022 · 1 comment
Open

Expose AuthorOnly as CitationMode #8331

rgaiacs opened this issue Sep 29, 2022 · 1 comment

Comments

@rgaiacs
Copy link
Contributor

rgaiacs commented Sep 29, 2022

Academic writing has two ways to provide citations: author-prominent and information-prominent.

Example of author-prominent:

Knuth et al. (1997) wrote a famous book.

Example of information-prominent:

A popular programming language is R (R Core Team, 2020).

Use of one over the other is a matter of field and writing style.

Citation Style Language 1.0.2 only support information-prominent, see jgm/citeproc#69 (comment). This means that write using author-prominent format is annoying when using a numeric citation style (for example, IEEE) because name of authors need to be hard coded. For example, the Markdown

@knuth wrote a famous book.

will be render by Pandoc as

[1] wrote a famous book.

instead of

Knuth et al. (1997) wrote a famous book [1].

or similar variation and the user need to have in the Markdown

Knuth et al. (1997) wrote a famous book [@knuth].

As mentioned before, Citation Style Language doesn't support information-prominent and will be hard for Pandoc to support all different journal styles. One way to compromise is to provide Markdown syntax for author-only citations (already proposed in #7258). Until #7258 is resolved, would be great to facilitate the use of filters by Pandoc users. For example, Pandoc implements author-prominent "by emitting AuthorOnly and SuppressAuthor in sequence", see

case citationMode c of
AuthorInText -> [ cit{ citationItemType = AuthorOnly
, citationItemSuffix = Nothing }
, cit{ citationItemType =
Citeproc.SuppressAuthor
, citationItemPrefix = Nothing } ]
NormalCitation -> [ cit ]
Pandoc.SuppressAuthor
-> [ cit{ citationItemType =
Citeproc.SuppressAuthor } ]

As a user, I would love to replace my use of AuthorInText with AuthorOnly. For example, the Markdown

@knuth [-@knuth] wrote a famous book [@knuth].

could be converted to

Knuth et al. (1997) wrote a famous book [1].

by calling

$ pandoc \
    --from markdown \
    --citeproc \
    --bibliography=references.bib \
    --csl=ieee.csl \
    mwe.md \
    --to json | \
    sed 's/AuthorInText/AuthorOnly/g' | \
    pandoc \
    --from json \
    --citeproc \
    --bibliography=references.bib \
    --csl=ieee.csl \
    --to html

Limitations

Based on my experiments, AuthorOnly is empty for Citation Style Language's numeric citation style.

rgaiacs added a commit to rgaiacs/pandoc that referenced this issue Sep 29, 2022
@bdarcus
Copy link

bdarcus commented Jun 5, 2024

I've also known this, in the academic literature on citation practices, to be called integral vs non-integral.

In any case, it seems that pandoc does support this, just perhaps not consistently (not with numeric styles)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants