cite2c
cite2c copied to clipboard
Question: I modified `citeproc.js` to prevent line-breaks between number & text in citations. Wondering if there are any unintended consequences
Hi, Thank you so much for creating cite2c. It is really great. The following figure shows an example rendering in the default (chicago-author-date) citation style.
I wanted to change the citation style from chicago-author-date to another style (specifically to frontiers-in-optics). So, after downloading the appropriate CSL files from Zotero reference, I changed chicago-author-date.csl
to frontiers-in-optics.csl
in rendering.js
. However, I got the following output:
As you can see, a line break was inserted after every number in the numbered list.
In order to prevent this from happening I changed the <div>...</div>
to <span>...</span>
for rendering csl-left-margin
and csl-right-inline
in the file citeproc.js
which produced the following (expected) output:
The problem is that I'm not sure if this change could have any adverse effect on the code. If you think that it will, it would be get if you could suggest an alternative.
Thank you.
If you're making changes to citeproc js, please do submit them to that project, which you can find here: https://bitbucket.org/fbennett/citeproc-js/overview . I'm not enough of an HTML/CSS whiz to know if changing div to span there will be a problem.
I'm planning to add proper support for switching between styles (i.e. so users don't have to hack the code to do it). But I haven't got round to it yet, and I'm just about to go off on a holiday.
Thanks for the suggestion, Thomas. I will do so. It will be great when you get around to support the switching between style (I know it's in the works). Have a great holiday!