citeproc-php
citeproc-php copied to clipboard
Removing item number from rendered bibliography of a single item
- [x] I read the README and followed the instructions.
- [x] I am sure that the used CSL metadata follows the CSL schema.
- [x] I use a valid CSL stylesheet
Question:
Is there a way to get a single bibliography item without the number? E.g. for this example, I get the following HTML:
<div class="csl-bib-body">
<div class="csl-entry"><div class="csl-left-margin">1.</div><div class="csl-right-inline">Home / Twitter. Twitter. Accessed June 21, 2021. https://twitter.com/home</div></div>
</div>
But I'd like the following (maybe even without the "csl-entry" div):
<div class="csl-entry"><div class="csl-right-inline">Home / Twitter. Twitter. Accessed June 21, 2021. https://twitter.com/home</div></div>
(Note that not all styles produce these numbers)
One option could be to parse the result as XML in PHP and remove the ".csl-left-margin" element, but I'm wondering if there's a cleaner and more "correct" way of doing this.
Used CSL stylesheet:
american-medical-association.csl
Used CSL metadata
[{
"id": "item-1",
"type": "webpage",
"container-title": "Twitter",
"language": "en",
"title": "Home / Twitter",
"URL": "https://twitter.com/home",
"accessed": {
"date-parts": [
[2021", 6, 21]
]
}
}]
Hi @cambraca! For me, the question is what does the CSL specification intend in this case? Have you looked at this?