{"route":"/en-US-v0.14.1/reference/model/bibliography/","title":"Bibliography","description":"Documentation for the `bibliography` function.","part":null,"outline":[{"id":"summary","name":"Summary","children":[]},{"id":"styles","name":"Styles","children":[]},{"id":"example","name":"Example","children":[]},{"id":"parameters","name":"Parameters","children":[{"id":"parameters-sources","name":"sources","children":[]},{"id":"parameters-title","name":"title","children":[]},{"id":"parameters-full","name":"full","children":[]},{"id":"parameters-style","name":"style","children":[]}]}],"body":{"kind":"func","content":{"path":[],"name":"bibliography","title":"Bibliography","keywords":[],"oneliner":"A bibliography / reference listing.","element":true,"contextual":false,"deprecationMessage":null,"deprecationUntil":null,"details":[{"kind":"html","content":"<p>A bibliography / reference listing.</p>\n<p>You can create a new bibliography by calling this function with a path\nto a bibliography file in either one of two formats:</p>\n<ul>\n<li>A Hayagriva <code>.yaml</code>/<code>.yml</code> file. Hayagriva is a new bibliography\nfile format designed for use with Typst. Visit its\n<a href=\"https://github.com/typst/hayagriva/blob/main/docs/file-format.md\">documentation</a>\nfor more details.</li>\n<li>A BibLaTeX <code>.bib</code> file.</li>\n</ul>\n<p>As soon as you add a bibliography somewhere in your document, you can start\nciting things with reference syntax (<code><span class=\"typ-ref\">@key</span></code>) or explicit calls to the\n<a href=\"/en-US-v0.14.1/reference/model/cite/\">citation</a> function (<code><span class=\"typ-func\">#</span><span class=\"typ-func\">cite</span><span class=\"typ-punct\">(</span><span class=\"typ-label\">&lt;key&gt;</span><span class=\"typ-punct\">)</span></code>). The bibliography will only\nshow entries for works that were referenced in the document.</p>\n<h2 id=\"styles\">Styles</h2>\n<p>Typst offers a wide selection of built-in\n<a href=\"/en-US-v0.14.1/reference/model/bibliography/#parameters-style\">citation and bibliography styles</a>. Beyond those, you\ncan add and use custom <a href=\"https://citationstyles.org/\">CSL</a> (Citation Style\nLanguage) files. Wondering which style to use? Here are some good defaults\nbased on what discipline you're working in:</p>\n<table><thead><tr><th>Fields</th><th>Typical Styles</th></tr></thead><tbody>\n<tr><td>Engineering, IT</td><td><code><span class=\"typ-str\">&quot;ieee&quot;</span></code></td></tr>\n<tr><td>Psychology, Life Sciences</td><td><code><span class=\"typ-str\">&quot;apa&quot;</span></code></td></tr>\n<tr><td>Social sciences</td><td><code><span class=\"typ-str\">&quot;chicago-author-date&quot;</span></code></td></tr>\n<tr><td>Humanities</td><td><code><span class=\"typ-str\">&quot;mla&quot;</span></code>, <code><span class=\"typ-str\">&quot;chicago-notes&quot;</span></code>, <code><span class=\"typ-str\">&quot;harvard-cite-them-right&quot;</span></code></td></tr>\n<tr><td>Economics</td><td><code><span class=\"typ-str\">&quot;harvard-cite-them-right&quot;</span></code></td></tr>\n<tr><td>Physics</td><td><code><span class=\"typ-str\">&quot;american-physics-society&quot;</span></code></td></tr>\n</tbody></table>\n<h2 id=\"example\">Example</h2>\n<div class=\"previewed-code\"><pre><code>This was already noted by\npirates long ago. <span class=\"typ-ref\">@arrgh</span>\n\nMultiple sources say <span class=\"typ-escape\">...</span>\n<span class=\"typ-ref\">@arrgh</span> <span class=\"typ-ref\">@netwok</span>.\n\n<span class=\"typ-func\">#</span><span class=\"typ-func\">bibliography</span><span class=\"typ-punct\">(</span><span class=\"typ-str\">&quot;works.bib&quot;</span><span class=\"typ-punct\">)</span>\n</code></pre><div class=\"preview\"><img src=\"/en-US-v0.14.1/assets/209df19e613387ac8475d78ce387afdf.png\" alt=\"Preview\"></div></div>"}],"self":false,"params":[{"name":"sources","details":[{"kind":"html","content":"<p>One or multiple paths to or raw bytes for Hayagriva <code>.yaml</code> and/or\nBibLaTeX <code>.bib</code> files.</p>\n<p>This can be a:</p>\n<ul>\n<li>A path string to load a bibliography file from the given path. For\nmore details about paths, see the <a href=\"/en-US-v0.14.1/reference/syntax/#paths\">Paths section</a>.</li>\n<li>Raw bytes from which the bibliography should be decoded.</li>\n<li>An array where each item is one of the above.</li>\n</ul>"}],"types":["str","bytes","array"],"strings":[],"default":null,"positional":true,"named":false,"required":true,"variadic":false,"settable":false},{"name":"title","details":[{"kind":"html","content":"<p>The title of the bibliography.</p>\n<ul>\n<li>When set to <code><span class=\"typ-key\">auto</span></code>, an appropriate title for the\n<a href=\"/en-US-v0.14.1/reference/text/text/#parameters-lang\">text language</a> will be used. This is the default.</li>\n<li>When set to <code><span class=\"typ-key\">none</span></code>, the bibliography will not have a title.</li>\n<li>A custom title can be set by passing content.</li>\n</ul>\n<p>The bibliography's heading will not be numbered by default, but you can\nforce it to be with a show-set rule:\n<code><span class=\"typ-key\">show</span> <span class=\"typ-func\">bibliography</span><span class=\"typ-punct\">:</span> <span class=\"typ-key\">set</span> <span class=\"typ-func\">heading</span><span class=\"typ-punct\">(</span>numbering<span class=\"typ-punct\">:</span> <span class=\"typ-str\">&quot;1.&quot;</span><span class=\"typ-punct\">)</span></code></p>"}],"types":["none","auto","content"],"strings":[],"default":"<code><span class=\"typ-key\">auto</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"full","details":[{"kind":"html","content":"<p>Whether to include all works from the given bibliography files, even\nthose that weren't cited in the document.</p>\n<p>To selectively add individual cited works without showing them, you can\nalso use the <code>cite</code> function with <a href=\"/en-US-v0.14.1/reference/model/cite/#parameters-form\"><code>form</code></a> set to <code><span class=\"typ-key\">none</span></code>.</p>"}],"types":["bool"],"strings":[],"default":"<code><span class=\"typ-key\">false</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true},{"name":"style","details":[{"kind":"html","content":"<p>The bibliography style.</p>\n<p>This can be:</p>\n<ul>\n<li>A string with the name of one of the built-in styles (see below). Some\nof the styles listed below appear twice, once with their full name and\nonce with a short alias.</li>\n<li>A path string to a <a href=\"https://citationstyles.org/\">CSL file</a>. For more\ndetails about paths, see the <a href=\"/en-US-v0.14.1/reference/syntax/#paths\">Paths section</a>.</li>\n<li>Raw bytes from which a CSL style should be decoded.</li>\n</ul>"}],"types":["str","bytes"],"strings":[{"string":"alphanumeric","details":"<p>Alphanumeric</p>"},{"string":"american-anthropological-association","details":"<p>American Anthropological Association</p>"},{"string":"american-chemical-society","details":"<p>American Chemical Society</p>"},{"string":"american-geophysical-union","details":"<p>American Geophysical Union</p>"},{"string":"american-institute-of-aeronautics-and-astronautics","details":"<p>American Institute of Aeronautics and Astronautics</p>"},{"string":"american-institute-of-physics","details":"<p>American Institute of Physics 4th edition</p>"},{"string":"american-medical-association","details":"<p>American Medical Association 11th edition</p>"},{"string":"american-meteorological-society","details":"<p>American Meteorological Society</p>"},{"string":"american-physics-society","details":"<p>American Physical Society</p>"},{"string":"american-physiological-society","details":"<p>American Physiological Society</p>"},{"string":"american-political-science-association","details":"<p>American Political Science Association</p>"},{"string":"american-psychological-association","details":"<p>American Psychological Association 7th edition</p>"},{"string":"apa","details":"<p>A short alias of <code>american-psychological-association</code></p>"},{"string":"american-society-for-microbiology","details":"<p>American Society for Microbiology</p>"},{"string":"american-society-of-civil-engineers","details":"<p>American Society of Civil Engineers</p>"},{"string":"american-society-of-mechanical-engineers","details":"<p>American Society of Mechanical Engineers</p>"},{"string":"american-sociological-association","details":"<p>American Sociological Association 6th/7th edition</p>"},{"string":"angewandte-chemie","details":"<p>Angewandte Chemie International Edition</p>"},{"string":"annual-reviews","details":"<p>Annual Reviews (sorted by order of appearance)</p>"},{"string":"annual-reviews-author-date","details":"<p>Annual Reviews (author-date)</p>"},{"string":"associacao-brasileira-de-normas-tecnicas","details":"<p>Associação Brasileira de Normas Técnicas (Português - Brasil)</p>"},{"string":"association-for-computing-machinery","details":"<p>Association for Computing Machinery</p>"},{"string":"biomed-central","details":"<p>BioMed Central</p>"},{"string":"bristol-university-press","details":"<p>Bristol University Press</p>"},{"string":"british-medical-journal","details":"<p>BMJ</p>"},{"string":"bmj","details":"<p>A short alias of <code>british-medical-journal</code></p>"},{"string":"cell","details":"<p>Cell</p>"},{"string":"chicago-author-date","details":"<p>Chicago Manual of Style 18th edition (author-date)</p>"},{"string":"chicago-notes","details":"<p>Chicago Manual of Style 18th edition (notes and bibliography)</p>"},{"string":"chicago-fullnotes","details":"<p>A short alias of <code>chicago-notes</code></p>"},{"string":"chicago-shortened-notes","details":"<p>Chicago Manual of Style 18th edition (shortened notes and bibliography)</p>"},{"string":"copernicus","details":"<p>Copernicus Publications</p>"},{"string":"council-of-science-editors","details":"<p>Council of Science Editors, Citation-Sequence (numeric, brackets)</p>"},{"string":"council-of-science-editors-author-date","details":"<p>Council of Science Editors, Name-Year 9th edition (author-date)</p>"},{"string":"current-opinion","details":"<p>Current Opinion journals</p>"},{"string":"deutsche-gesellschaft-für-psychologie","details":"<p>Deutsche Gesellschaft für Psychologie 5. Auflage (Deutsch)</p>"},{"string":"deutsche-sprache","details":"<p>Deutsche Sprache (Deutsch)</p>"},{"string":"elsevier-harvard","details":"<p>Elsevier - Harvard (with titles)</p>"},{"string":"elsevier-vancouver","details":"<p>Elsevier - Vancouver</p>"},{"string":"elsevier-with-titles","details":"<p>Elsevier (numeric, with titles)</p>"},{"string":"frontiers","details":"<p>Frontiers journals</p>"},{"string":"future-medicine","details":"<p>Future Medicine journals</p>"},{"string":"future-science","details":"<p>Future Science Group</p>"},{"string":"gb-7714-2005-numeric","details":"<p>China National Standard GB/T 7714-2005 (numeric, 中文)</p>"},{"string":"gb-7714-2015-author-date","details":"<p>China National Standard GB/T 7714-2015 (author-date, 中文)</p>"},{"string":"gb-7714-2015-note","details":"<p>China National Standard GB/T 7714-2015 (note, 中文)</p>"},{"string":"gb-7714-2015-numeric","details":"<p>China National Standard GB/T 7714-2015 (numeric, 中文)</p>"},{"string":"gost-r-705-2008-numeric","details":"<p>Russian GOST R 7.0.5-2008 (numeric)</p>"},{"string":"harvard-cite-them-right","details":"<p>Cite Them Right 12th edition - Harvard</p>"},{"string":"institute-of-electrical-and-electronics-engineers","details":"<p>IEEE</p>"},{"string":"ieee","details":"<p>A short alias of <code>institute-of-electrical-and-electronics-engineers</code></p>"},{"string":"institute-of-physics-numeric","details":"<p>Institute of Physics (numeric)</p>"},{"string":"iso-690-author-date","details":"<p>ISO-690 (author-date, English)</p>"},{"string":"iso-690-numeric","details":"<p>ISO-690 (numeric, English)</p>"},{"string":"karger","details":"<p>Karger journals</p>"},{"string":"mary-ann-liebert-vancouver","details":"<p>Mary Ann Liebert - Vancouver</p>"},{"string":"modern-humanities-research-association-notes","details":"<p>Modern Humanities Research Association 4th edition (notes)</p>"},{"string":"modern-humanities-research-association","details":"<p>A short alias of <code>modern-humanities-research-association-notes</code></p>"},{"string":"modern-language-association","details":"<p>Modern Language Association 9th edition (in-text citations)</p>"},{"string":"mla","details":"<p>A short alias of <code>modern-language-association</code></p>"},{"string":"modern-language-association-8","details":"<p>Modern Language Association 8th edition</p>"},{"string":"mla-8","details":"<p>A short alias of <code>modern-language-association-8</code></p>"},{"string":"multidisciplinary-digital-publishing-institute","details":"<p>Multidisciplinary Digital Publishing Institute</p>"},{"string":"nature","details":"<p>Nature</p>"},{"string":"pensoft","details":"<p>Pensoft Journals</p>"},{"string":"public-library-of-science","details":"<p>Public Library of Science</p>"},{"string":"plos","details":"<p>A short alias of <code>public-library-of-science</code></p>"},{"string":"royal-society-of-chemistry","details":"<p>Royal Society of Chemistry</p>"},{"string":"sage-vancouver","details":"<p>SAGE - Vancouver</p>"},{"string":"sist02","details":"<p>SIST02 (日本語)</p>"},{"string":"spie","details":"<p>SPIE journals</p>"},{"string":"springer-basic","details":"<p>Springer - Basic (numeric, brackets)</p>"},{"string":"springer-basic-author-date","details":"<p>Springer - Basic (author-date)</p>"},{"string":"springer-fachzeitschriften-medizin-psychologie","details":"<p>Springer - Fachzeitschriften Medizin Psychologie (Deutsch)</p>"},{"string":"springer-humanities-author-date","details":"<p>Springer - Humanities (author-date)</p>"},{"string":"springer-lecture-notes-in-computer-science","details":"<p>Springer - Lecture Notes in Computer Science</p>"},{"string":"springer-mathphys","details":"<p>Springer - MathPhys (numeric, brackets)</p>"},{"string":"springer-socpsych-author-date","details":"<p>Springer - SocPsych (author-date)</p>"},{"string":"springer-vancouver","details":"<p>Springer - Vancouver (brackets)</p>"},{"string":"taylor-and-francis-chicago-author-date","details":"<p>Taylor &amp; Francis Journals Standard Reference Style Guide: Chicago author-date version 2.0</p>"},{"string":"taylor-and-francis-national-library-of-medicine","details":"<p>Taylor &amp; Francis - National Library of Medicine</p>"},{"string":"the-institution-of-engineering-and-technology","details":"<p>The Institution of Engineering and Technology</p>"},{"string":"the-lancet","details":"<p>The Lancet</p>"},{"string":"thieme","details":"<p>Thieme-German (Deutsch)</p>"},{"string":"trends","details":"<p>Trends journals</p>"},{"string":"turabian-author-date","details":"<p>Chicago Manual of Style 17th edition (author-date)</p>"},{"string":"turabian-fullnote-8","details":"<p>Chicago Manual of Style 17th edition (notes and bibliography, subsequent author-title)</p>"},{"string":"vancouver","details":"<p>Vancouver</p>"},{"string":"vancouver-superscript","details":"<p>Vancouver (superscript)</p>"}],"default":"<code><span class=\"typ-str\">&quot;ieee&quot;</span></code>","positional":false,"named":true,"required":false,"variadic":false,"settable":true}],"returns":["content"],"scope":[]}}}