I have not tried this package in LaTeX yet, but it looks very handy and a game changer (for sure) to boost citation formatting!
I always work with "author-year" (e.g. Harvard family) citation styles. Usually, I have several citations in the form of "year-only" as the author(s) are typed explicitly in the text. The latex commands are \citeyearpar in natbib/bibtex, or the \parencite* in biblatex.
This package ("citation-style-language"/ "citeproc-lua") appears to not provide the translation of the above ("year-only") citation commands. I have scanned the source files in this repo and found the "suppress-author" property, defined at: #L199
I am curious to see if the following code can provide the needed feature (i.e. to define a translation for the \citeyearpar and \parencite*):
Edits to the file: ./latex/citation-style-language-cite.sty
Add this at Line #34:
\NewDocumentCommand \citeyearpar { o o m } { \__csl_cite_year:nnn {#1} {#2} {#3} }
\NewDocumentCommand \parencite*{ o o m } { \__csl_cite_year:nnn {#1} {#2} {#3} }
I am not sure if the suggestions above will be successful to add the needed feature to provide compatibility for natbib command \citeyearpar and the equivalent biblatex command \parencite*. In particular, I don't know the actual behaviour of \l__csl_citation_properties_prop { mode } { suppress-author}: does it just print the year-only citation?
I have not tried this package in LaTeX yet, but it looks very handy and a game changer (for sure) to boost citation formatting!
I always work with "author-year" (e.g. Harvard family) citation styles. Usually, I have several citations in the form of "year-only" as the author(s) are typed explicitly in the text. The latex commands are
\citeyearpar
innatbib
/bibtex
, or the\parencite*
inbiblatex
.This package ("citation-style-language"/ "citeproc-lua") appears to not provide the translation of the above ("year-only") citation commands. I have scanned the source files in this repo and found the "suppress-author" property, defined at:
#L199
I am curious to see if the following code can provide the needed feature (i.e. to define a translation for the
\citeyearpar
and\parencite*
):Edits to the file:
./latex/citation-style-language-cite.sty
Line #34
:\NewDocumentCommand \citeyearpar { o o m } { \__csl_cite_year:nnn {#1} {#2} {#3} }
\NewDocumentCommand \parencite*{ o o m } { \__csl_cite_year:nnn {#1} {#2} {#3} }
Line #114
:\cs_new:Npn \__csl_cite_year:nnn #1#2#3 { \seq_clear:N \l__csl_cite_keys_seq \seq_clear:N \l__csl_citation_items_seq \prop_clear:N \l__csl_citation_properties_prop \__csl_process_cite_input:nnn {#1} {#2} {#3} \__csl_process_citation_info:NN \l__csl_cite_keys_seq \l__csl_citation_items_seq \prop_put:Nnn \l__csl_citation_properties_prop { noteIndex } { 0 } \prop_put:Nnn \l__csl_citation_properties_prop { mode } { suppress-author} \bool_set_false:N \l__csl_note_bool \__csl_make_citation:N \l__csl_citation_info_prop }
End of suggestions.
I am not sure if the suggestions above will be successful to add the needed feature to provide compatibility for
natbib
command\citeyearpar
and the equivalentbiblatex
command\parencite*
. In particular, I don't know the actual behaviour of\l__csl_citation_properties_prop { mode } { suppress-author}
: does it just print the year-only citation?Thanks for providing such very practical package.