msprev / fzf-bibtex

a BibTeX source for fzf
BSD 3-Clause "New" or "Revised" License
129 stars 15 forks source link

Add mode for no author in text citation style #16

Closed steven-pilger closed 4 years ago

steven-pilger commented 5 years ago

I wanted to cite a source in markdown, such that the command in latex when passed through pandoc only added a reference to the publication.

Example:

abumostafa commented 5 years ago

funny though. my username is cited here ;D and have no clue why

msprev commented 5 years ago

I'd prefer more general solution to this problem, as there are endless permutations of citing commands. The most general way would be to add 3 command line switches to bibtex-cite:

-prefix= -postfix= -separator=

Defaults settings for -mode=markdown:

-prefix='@' -postfix='' -separator='; '

The setting -mode=pandoc|latex could remain as legacy and as a simple way of setting these 3 switches in one go. If any of the 3 switches are set on the command line, it would override the -mode setting.

Your citing style could then be accomplished by:

-prefix='\autocite*{' -postfix='}' -separator='; '
msprev commented 4 years ago

This feature has been implement by https://github.com/msprev/fzf-bibtex/commit/a1538db2ea0caf32a36d47b19b47ffd2681f569c