Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: I modified citeproc.js to prevent line-breaks between number & text in citations. Wondering if there are any unintended consequences #20

Open
indranilsinharoy opened this issue Aug 13, 2015 · 2 comments

Comments

@indranilsinharoy
Copy link

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.

chicago

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:

frontiers-in-optics

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:

frontiers-in-optics_afterchangetospan

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.

@takluyver
Copy link
Owner

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.

@indranilsinharoy
Copy link
Author

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants