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

Allow simple citation references like "[16]" #16

Closed
ronaldtse opened this issue Aug 24, 2017 · 7 comments
Closed

Allow simple citation references like "[16]" #16

ronaldtse opened this issue Aug 24, 2017 · 7 comments

Comments

@ronaldtse
Copy link
Contributor

ronaldtse commented Aug 24, 2017

Now we support authoryear and numbers but the gem doesn't provide functionality to do simple citations like "[16]". Could we have another option such as purenum to enable this?

Or better year, make number show "[16]" and authornum show "AuthorLastName [16]" ?

@paolobrasolin
Copy link
Member

Now inline citations are rendered using CSL by default.
This means that is style can be obtained coherently (e.g. using ieee).

@ronaldtse
Copy link
Contributor Author

Yes '[16]' style works with the ieee style.

However the bibliography shows lines like this:

[1]CDSA, “Content Protection & Security Standard and Guidance,” Content Delivery & Security Alliance, New York, USA, CDSA, Mar. 2014.

Notice that a white space is missing after the reference "[1]". In DIN style the whitespace is correctly put there.

@paolobrasolin
Copy link
Member

I think that's either a bug in the ieee style (I seriously doubt that) or a misconfigured default in citeproc. Looking into that.

@ronaldtse
Copy link
Contributor Author

Any news on this? Thanks!

@ronaldtse
Copy link
Contributor Author

@paolobrasolin any updates here? Thanks!

@paolobrasolin
Copy link
Member

Yes! I finally got it.
It wasn't a bug or any other deficiency in the style or the rendered.

Long story short, the IEEE style prescribes the numeric labels to be on the margin of indented text (the rest of the citation). The implementation of the formatting depends upon the output format. In fact, the visual editor renders this perfectly. citeproc is capable of that too (e.g. using css classes when using HTML format). Since the style contains no separating space, we have the problem we observed when exporting to other (textual) formats.

I see two possible solutions to this:

  1. write a quick hack to alter the IEEE style (and hopefully similar ones) on the fly to add a separating space;
  2. instruct our custom formatter (see Implement native :adoc format for Citeproc #37 ) to handle the indending option.

The latter is clearly the real solution; I'll fall back to 1 in case it fails.

I'll make a PR with the bugfix tomorrow.

@ronaldtse
Copy link
Contributor Author

Thanks @paolobrasolin !

paolobrasolin added a commit that referenced this issue Sep 28, 2017
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