Document how to cite sources with special characters. (#3261)

Co-authored-by: Laurenz <laurmaedje@gmail.com>
This commit is contained in:
Michael Färber 2024-01-30 15:37:33 +01:00 committed by GitHub
parent b744b87818
commit de31a5ce59
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 22 additions and 2 deletions

View File

@ -52,6 +52,17 @@
volume = {1},
}
@book{DBLP:books/lib/Knuth86a,
author = {Donald Ervin Knuth},
title = {Computer modern typefaces},
publisher = {Addison-Wesley},
year = {1986},
url = {https://www.worldcat.org/oclc/13157596},
isbn = {0201134462},
timestamp = {Fri, 17 Jul 2020 16:12:40 +0200},
biburl = {https://dblp.org/rec/books/lib/Knuth86a.bib},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{sharing,
title = {Do sharing people behave differently? An empirical evaluation of the distinctive mobility patterns of free-floating car-sharing members},

View File

@ -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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 145 KiB

View File

@ -1,5 +1,5 @@
// Test the full bibliography.
---
#set page(paper: "a6", height: 160mm)
#set page(paper: "a6", height: 170mm)
#bibliography("/files/works.bib", full: true)

View File

@ -40,5 +40,5 @@ Now we have multiple bibliographies containing @glacier-melt @keshav2007read
#bibliography("/files/works.bib")
---
// Error: 15-55 duplicate bibliography keys: netwok, issue201, arrgh, quark, distress, glacier-melt, tolkien54, sharing, restful, mcintosh_anxiety, psychology25
// Error: 15-55 duplicate bibliography keys: netwok, issue201, arrgh, quark, distress, glacier-melt, tolkien54, DBLP:books/lib/Knuth86a, sharing, restful, mcintosh_anxiety, psychology25
#bibliography(("/files/works.bib", "/files/works.bib"))