The Trans Directory
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

docs: add Citation plugin & feature pages (#1772)

* docs: add Citation plugin & feature pages

Discussed and extracted from #1557

* Update docs/features/Citations.md

* Apply suggestions from code review

---------

Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>

authored by

Jonathan Fung
Aaron Pham
and committed by
GitHub
9a0d919a 598741a5

+55
+31
docs/features/Citations.md
··· 1 + --- 2 + title: Citations 3 + tags: 4 + - feature/transformer 5 + --- 6 + 7 + Quartz uses [rehype-citation](https://github.com/timlrx/rehype-citation) to support parsing of a BibTex bibliography file. 8 + 9 + Under the default configuration, a citation key `[@templeton2024scaling]` will be exported as `(Templeton et al., 2024)`. 10 + 11 + > [!example]- BibTex file 12 + > 13 + > ```bib title="bibliography.bib" 14 + > @article{templeton2024scaling, 15 + > title={Scaling Monosemanticity: Extracting Interpretable Features from Claude 3 Sonnet}, 16 + > author={Templeton, Adly and Conerly, Tom and Marcus, Jonathan and Lindsey, Jack and Bricken, Trenton and Chen, Brian and Pearce, Adam and Citro, Craig and Ameisen, Emmanuel and Jones, Andy and Cunningham, Hoagy and Turner, Nicholas L and McDougall, Callum and MacDiarmid, Monte and Freeman, C. Daniel and Sumers, Theodore R. and Rees, Edward and Batson, Joshua and Jermyn, Adam and Carter, Shan and Olah, Chris and Henighan, Tom}, 17 + > year={2024}, 18 + > journal={Transformer Circuits Thread}, 19 + > url={https://transformer-circuits.pub/2024/scaling-monosemanticity/index.html} 20 + > } 21 + > ``` 22 + 23 + > [!note] Behaviour of references 24 + > 25 + > By default, the references will be included at the end of the file. To control where the references to be included, uses `[^ref]` 26 + > 27 + > Refer to `rehype-citation` docs for more information. 28 + 29 + ## Customization 30 + 31 + Citation parsing is a functionality of the [[plugins/Citations|Citation]] plugin. **This plugin is not enabled by default**. See the plugin page for customization options.
+24
docs/plugins/Citations.md
··· 1 + --- 2 + title: "Citations" 3 + tags: 4 + - plugin/transformer 5 + --- 6 + 7 + This plugin adds Citation support to Quartz. 8 + 9 + > [!note] 10 + > For information on how to add, remove or configure plugins, see the [[configuration#Plugins|Configuration]] page. 11 + 12 + This plugin accepts the following configuration options: 13 + 14 + - `bibliographyFile`: the path to the bibliography file. Defaults to `./bibliography.bib`. This is relative to git source of your vault. 15 + - `suppressBibliography`: whether to suppress the bibliography at the end of the document. Defaults to `false`. 16 + - `linkCitations`: whether to link citations to the bibliography. Defaults to `false`. 17 + - `csl`: the citation style to use. Defaults to `apa`. Reference [rehype-citation](https://rehype-citation.netlify.app/custom-csl) for more options. 18 + - `prettyLink`: whether to use pretty links for citations. Defaults to `true`. 19 + 20 + ## API 21 + 22 + - Category: Transformer 23 + - Function name: `Plugin.Citations()`. 24 + - Source: [`quartz/plugins/transformers/citations.ts`](https://github.com/jackyzha0/quartz/blob/v4/quartz/plugins/transformers/citations.ts).