summaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorMichael Färber <01mf02@gmail.com>2024-01-30 15:37:33 +0100
committerGitHub <noreply@github.com>2024-01-30 14:37:33 +0000
commitde31a5ce59734e55c63b5aeae4f9301e18eea5fc (patch)
tree05de9e658a87701a54a7c4fc30add3bc03c249ac /crates
parentb744b8781835d704236210d8a3dd603c6a29c8d0 (diff)
Document how to cite sources with special characters. (#3261)
Co-authored-by: Laurenz <laurmaedje@gmail.com>
Diffstat (limited to 'crates')
-rw-r--r--crates/typst/src/model/cite.rs9
1 files changed, 9 insertions, 0 deletions
diff --git a/crates/typst/src/model/cite.rs b/crates/typst/src/model/cite.rs
index 0e38b1bd..e61056e8 100644
--- a/crates/typst/src/model/cite.rs
+++ b/crates/typst/src/model/cite.rs
@@ -27,6 +27,15 @@ use crate::text::{Lang, Region, TextElem};
/// #bibliography("works.bib")
/// ```
///
+/// If your source name contains certain characters such as slashes, which are
+/// not recognized by the `<>` syntax, you can explicitly call `label` instead.
+///
+/// ```typ
+/// Computer Modern is an example of a modernist serif typeface.
+/// #cite(label("DBLP:books/lib/Knuth86a")).
+/// >>> #bibliography("works.bib")
+/// ```
+///
/// # Syntax
/// This function indirectly has dedicated syntax. [References]($ref) can be
/// used to cite works from the bibliography. The label then corresponds to the