pandoc
pandoc copied to clipboard
Provide Markdown syntax for author-only citations (i.e., equivalent to BibTeX's \citeauthor{})
This issue was originally https://github.com/jgm/pandoc-citeproc/issues/377, moved here on @jgm's suggestion. https://github.com/jgm/pandoc/issues/2335 is related but different, because that issue does not concern Markdown.
Currently, Pandoc's citation mechanism lets you suppress the author via a hyphen, as in, [-@jon90]. It would be helpful to be able to suppress the year instead, particularly when using a possessive form, as in
Jones (1990) proposes accomplish this by reversing the polarity on the dilithium crystal. We disagree with Jones's approach, because...
(automatically inserted elements italicised).
One possible syntax for this might be for -@jon90 to suppress the year the way [-@jon90] suppresses the author. This is because in a typical use case, the year would be typeset in parentheses, whereas the author's name would be typeset without. Then, one would write the above as
@jon90 proposes accomplish this by reversing the polarity on the dilithium crystal.
We disagree with -@jon90's approach, because...
@cormacrelf (https://github.com/jgm/pandoc-citeproc/issues/377#issuecomment-459391092) proposed a different syntax, writing
syntax gets a bit trickier, but the mental model is “select which part of the cite you want”. I don’t think a context-dependent meaning of
-@doemaps well to this.-@doeshould mean “DROP the author/parties/inline-able part” whether inside or outside square brackets and another symbol should do the opposite. Maybe+@doewould reflect this opposite.
It is both a useful and wished for feature. I will suggest the syntax @jon90- and [@jon90-] with a hyphen after the key. So, prefix hyphen means omit author name and suffix hyphen would mean omit year.
that would be really helpful. Any updates on that one?
In an ideal world, I think the desired field could be passed as an arg to the filter. So, [@Jones2023]{field=author} or [@Jones2023]{field=title}. I know its a bit more verbose than simply @Jones2023- but it would make it considerably more flexible.
This is now possible using a Lua Filter: https://github.com/bcdavasconcelos/citefield.