Skip to content

Commit

Permalink
Bib2csl: map shorthand to citation-label
Browse files Browse the repository at this point in the history
  • Loading branch information
zepinglee committed Jul 27, 2024
1 parent 6663137 commit f9a572c
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- BibTeX parser: Fix hyphen in family name.
- Fix a bug in EDTF parsing.
- Bib2csl: Fix a sentence case conversion bug that words after colons are not capitalized.
- Bib2csl: Map `shorthand` to `citation-label`.

## [0.5.1] - 2024-07-10

Expand Down
5 changes: 3 additions & 2 deletions citeproc/citeproc-bibtex-data.lua
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,7 @@ return {
},
legmaterial = {
csl = "legislation",
notes = "APA §11.6: Legislative materials include federal testimony, hearings, bills, resolutions, reports, and related documents.",
source = "apa.dbx",
},
letter = {
Expand Down Expand Up @@ -3424,8 +3425,8 @@ return {
type = "literal",
},
shorthand = {
csl = nil,
notes = "Not supported.",
csl = "citation-label",
notes = "A special designation to be used by the citation style instead of the usual label.",
source = "biblatex",
type = "literal",
},
Expand Down
2 changes: 1 addition & 1 deletion scripts/bib-csl-mapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ Bib(La)TeX | CSL | Notes
`series` | `collection-title` |
`shortauthor` | - |
`shorteditor` | - |
`shorthand` | - | Not supported.
`shorthand` | `citation-label` | A special designation to be used by the citation style instead of the usual label.
`shorthandintro` | - | Not supported.
`shortjournal` | `container-title-short` |
`shortseries` | - |
Expand Down
4 changes: 2 additions & 2 deletions scripts/citeproc-bibtex-data.json
Original file line number Diff line number Diff line change
Expand Up @@ -2609,8 +2609,8 @@
"type": "literal"
},
"shorthand": {
"csl": null,
"notes": "Not supported.",
"csl": "citation-label",
"notes": "A special designation to be used by the citation style instead of the usual label.",
"source": "biblatex",
"type": "literal"
},
Expand Down
2 changes: 2 additions & 0 deletions tests/bibtex/biblatex-examples.json
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,7 @@
"given": "Immanuel"
}
],
"citation-label": "KpV",
"container-author": [
{
"family": "Kant",
Expand Down Expand Up @@ -1990,6 +1991,7 @@
"given": "Immanuel"
}
],
"citation-label": "KU",
"container-author": [
{
"family": "Kant",
Expand Down

0 comments on commit f9a572c

Please sign in to comment.