More flexible citation formats

巧了我就是萌 提交于 2021-01-27 05:44:17

问题


I love to use citations in my r bookdown projects.

The format is not very flexible, I can use @citeID to get "Author(Year)" or [@citeID] to get "(Author Year)".

Sometimes I only need "(Year)" or "Year" or I may only need "Author Year" with no parentheses at all.

Finally I need to add a page reference to the citation like "Author (Year:Pages)"

Can anybody give me a hint, where the relevant code sits in the source so that I can start adding some cite-formats as described above?


回答1:


There are many citation modifications offered by Markdown, many of which you can find in the Pandoc Users Guide. With them you can hide the author, make page references, etc.:

  • @Einstein1905 -- Einstein et al. (1905)
  • [@Einstein1905] -- (Einstein et al., 1905)
  • [see @Einstein1905, pp. 23-42] -- (see Einstein et al., 1905, pp. 23-42)
  • Einstein was right [-@Einstein1905] -- Einstein was right (1905)

Details like switching off paranthesis or other punctuation related issues can be regulated in detail by designing your own biblatex style. These style files can be tested here and can be referenced during markdown conversion using commands like --biblatex.



来源:https://stackoverflow.com/questions/44746240/more-flexible-citation-formats

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!