| 1 |
>>===== MODE =====>> |
| 2 |
citation |
| 3 |
<<===== MODE =====<< |
| 4 |
|
| 5 |
|
| 6 |
>>===== DESCRIPTION =====>> |
| 7 |
<https://github.com/citeproc-py/citeproc-py/issues/203> |
| 8 |
|
| 9 |
A numeric style whose citation layout groups `citation-number` with a locator |
| 10 |
macro -- IEEE is the widely used example -- must still render the number when |
| 11 |
the citation carries no locator. `citation-number` is a number variable, so the |
| 12 |
group calls a non-empty variable and is not suppressed. |
| 13 |
<<===== DESCRIPTION =====<< |
| 14 |
|
| 15 |
|
| 16 |
>>===== RESULT =====>> |
| 17 |
[1] |
| 18 |
[1, p. 23] |
| 19 |
<<===== RESULT =====<< |
| 20 |
|
| 21 |
|
| 22 |
>>===== CITATION-ITEMS =====>> |
| 23 |
[ |
| 24 |
[ |
| 25 |
{ |
| 26 |
"id": "ITEM-1" |
| 27 |
} |
| 28 |
], |
| 29 |
[ |
| 30 |
{ |
| 31 |
"id": "ITEM-1", |
| 32 |
"label": "page", |
| 33 |
"locator": 23 |
| 34 |
} |
| 35 |
] |
| 36 |
] |
| 37 |
<<===== CITATION-ITEMS =====<< |
| 38 |
|
| 39 |
|
| 40 |
>>===== CSL =====>> |
| 41 |
<style |
| 42 |
xmlns="http://purl.org/net/xbiblio/csl" |
| 43 |
class="in-text" |
| 44 |
version="1.0"> |
| 45 |
<info> |
| 46 |
<id /> |
| 47 |
<title /> |
| 48 |
<updated>2026-08-04T00:00:00+00:00</updated> |
| 49 |
</info> |
| 50 |
<macro name="citation-locator"> |
| 51 |
<group> |
| 52 |
<label variable="locator" form="short" suffix=" "/> |
| 53 |
<text variable="locator"/> |
| 54 |
</group> |
| 55 |
</macro> |
| 56 |
<citation> |
| 57 |
<layout delimiter=", "> |
| 58 |
<group prefix="[" suffix="]" delimiter=", "> |
| 59 |
<text variable="citation-number"/> |
| 60 |
<text macro="citation-locator"/> |
| 61 |
</group> |
| 62 |
</layout> |
| 63 |
</citation> |
| 64 |
</style> |
| 65 |
<<===== CSL =====<< |
| 66 |
|
| 67 |
|
| 68 |
>>===== INPUT =====>> |
| 69 |
[ |
| 70 |
{ |
| 71 |
"id": "ITEM-1", |
| 72 |
"type": "book", |
| 73 |
"author": [ |
| 74 |
{ |
| 75 |
"family": "Doe", |
| 76 |
"given": "John" |
| 77 |
} |
| 78 |
], |
| 79 |
"issued": { |
| 80 |
"date-parts": [ |
| 81 |
[ |
| 82 |
"1984" |
| 83 |
] |
| 84 |
] |
| 85 |
}, |
| 86 |
"title": "Title" |
| 87 |
} |
| 88 |
] |
| 89 |
<<===== INPUT =====<< |
| 90 |
|
| 91 |
|
| 92 |
>>===== VERSION =====>> |
| 93 |
1.0 |
| 94 |
<<===== VERSION =====<< |