Skip to content

Commit

Permalink
Added sources.
Browse files Browse the repository at this point in the history
  • Loading branch information
krestenlaust committed Jan 19, 2024
1 parent 9eed315 commit ced359f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
9 changes: 9 additions & 0 deletions chapters/introduction.typ
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ $ mat(
) $


== Sources & bibliography
To add a source, you just have to reference your `.bib` file like the following anywhere in a document:
```typst
#bibliography("sources/sample.bib")
```

In this project it's located in `main.typ`. Now it can be referred the same way a figure is referred: `@einstein` @einstein. A reference only shows up in the bibliography section if it has at least one mention.


== Getting Started
How do I start?

Expand Down
2 changes: 2 additions & 0 deletions main.typ
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,5 @@

#include "Chapters/understanding_typst.typ"
#pagebreak(weak: true)

#bibliography("sources/sample.bib")
11 changes: 11 additions & 0 deletions sources/sample.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@article{einstein,
author = {Einstein, Albert},
title = {On the Electrodynamics of Moving Bodies},
journal = {Annalen der Physik},
volume = {322},
number = {10},
pages = {891--921},
year = {1905},
publisher = {Wiley-VCH},
doi = {10.1002/andp.19053221004}
}

0 comments on commit ced359f

Please sign in to comment.