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 b515fbe commit d97e7af
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 @@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Fix a bug in EDTF parsing.
- Bib2csl: Fix a sentence case conversion bug that words after colons are not capitalized.
- Bib2csl: The hyphens in `number` fields are correctly escaped when converted to CSL-JSON.
- Bib2csl: Map `shorthand` field to CSL `citation-label` variable.

## [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 d97e7af

Please sign in to comment.