-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BibTeX: escape special characters ($%&_#{}).
For example, some journal titles specifically use &, which would produce a broken BibTeX entry if left bare. Also, it's quite possible that publication titles, entity names, aliases, etc could use certain special characters, so escape them all---at least the easy ones for now. Fixes #124.
- Loading branch information
Showing
10 changed files
with
119 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
test/files/formatted/preferred-citation-conference-paper-with-escapes.apa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Haines, R., & The {curly_braces} Collective. (2021). CFF is #1, 100% [Conference paper]. Software Credit for Fun & Profit ($$$). https://doi.org/10.5281/zenodo.1184077 |
11 changes: 11 additions & 0 deletions
11
test/files/formatted/preferred-citation-conference-paper-with-escapes.bibtex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@inproceedings{Haines_CFF_is_1_2021, | ||
author = {Haines, Robert and {The \{curly\_braces\} Collective}}, | ||
booktitle = {Software Credit for Fun \& Profit (\$\$\$)}, | ||
doi = {10.5281/zenodo.1184077}, | ||
month = sep, | ||
publisher = {The CFF \& Friends}, | ||
series = {Software Credit \#1}, | ||
title = {{CFF is \#1, 100\%}}, | ||
url = {https://github.com/citation-file-format/ruby-cff}, | ||
year = {2021} | ||
} |
1 change: 1 addition & 0 deletions
1
test/files/formatted/preferred-citation-journal-with-escapes.apa
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Haines, R. (2024). CFF for the $%&#_{} win. Journal of Maths & Philosophy, 1(1) |
9 changes: 9 additions & 0 deletions
9
test/files/formatted/preferred-citation-journal-with-escapes.bibtex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@article{Haines_CFF_for_the_2024, | ||
author = {Haines, Robert}, | ||
journal = {Journal of Maths \& Philosophy}, | ||
month = jan, | ||
number = {1}, | ||
title = {{CFF for the \$\%\&\#\_\{\} win}}, | ||
volume = {1}, | ||
year = {2024} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Haines, R., & The {curly_braces} Collective. (2024). Software that uses the following symbols: &, %, $, # (Version 0.0.1-alpha) [Computer software] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
@software{Haines_Software_that_uses_2024, | ||
author = {Haines, Robert and {The \{curly\_braces\} Collective}}, | ||
month = jan, | ||
title = {{Software that uses the following symbols: \&, \%, \$, \#}}, | ||
version = {0.0.1-alpha}, | ||
year = {2024} | ||
} |
36 changes: 36 additions & 0 deletions
36
test/files/formatter/preferred-citation-conference-paper-with-escapes.cff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# A report preferred-citation | ||
|
||
cff-version: 1.2.0 | ||
message: If you use this software in your work, please cite it using the following metadata | ||
title: Ruby CFF Library | ||
authors: | ||
- family-names: Haines | ||
given-names: Robert | ||
affiliation: The University of Manchester | ||
keywords: | ||
- ruby | ||
- credit | ||
- citation | ||
- cff | ||
version: 0.9.0 | ||
date-released: 2021-09-21 | ||
license: Apache-2.0 | ||
repository-artifact: https://rubygems.org/gems/cff | ||
type: software | ||
preferred-citation: | ||
type: conference-paper | ||
conference: | ||
name: "Software Credit #1" | ||
title: "CFF is #1, 100%" | ||
authors: | ||
- family-names: Haines | ||
given-names: Robert | ||
affiliation: The University of Manchester | ||
- name: "The {curly_braces} Collective" | ||
publisher: | ||
name: The CFF & Friends | ||
collection-title: Software Credit for Fun & Profit ($$$) | ||
month: 9 | ||
year: 2021 | ||
url: https://github.com/citation-file-format/ruby-cff | ||
doi: 10.5281/zenodo.1184077 |
23 changes: 23 additions & 0 deletions
23
test/files/formatter/preferred-citation-journal-with-escapes.cff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Note this is a made up entry. | ||
|
||
cff-version: 1.2.0 | ||
message: If you use this software in your work, please cite it using the following metadata | ||
title: Ruby-CFF | ||
authors: | ||
- family-names: Haines | ||
given-names: Robert | ||
version: 0.1 | ||
date-released: 2024-01-16 | ||
|
||
# JOSS paper as preferred citation | ||
preferred-citation: | ||
authors: | ||
- family-names: Haines | ||
given-names: Robert | ||
journal: Journal of Maths & Philosophy | ||
month: 1 | ||
title: "CFF for the $%&#_{} win" | ||
type: article | ||
volume: 1 | ||
issue: 1 | ||
year: 2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cff-version: 1.2.0 | ||
message: "If you use this software, please cite it as below." | ||
authors: | ||
- family-names: Haines | ||
given-names: Robert | ||
- name: "The {curly_braces} Collective" | ||
title: "Software that uses the following symbols: &, %, $, #" | ||
version: 0.0.1-alpha | ||
date-released: 2024-01-16 |