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

3+ consecutive citations hyphens #78

Open
JurTam opened this issue May 23, 2021 · 1 comment
Open

3+ consecutive citations hyphens #78

JurTam opened this issue May 23, 2021 · 1 comment

Comments

@JurTam
Copy link

JurTam commented May 23, 2021

Dear Mr. Zhang Yang!

I assume I might be missing something in the readme.
But as we discussed via email, I am still opening a new issue here, so anyone can benefit from the answers provided.

May I ask, is there a default way to have the gem:

(1) construct consecutive references
like [1-3] instead of [1,2,3]
and like [1,3-5] instead of [1,3,4,5]

(2) and to change the brackets from [] to ()

(3) and possibly even to change the numbering template in the bibliography, for example
from this:
[1] foo
[2] bar
[3] baz
to this:
1) foo
2) bar
3) baz

Looking at the code, I assume (1) is already implemented in citation_macro.rb, but I don't know how to invoke it through asciidoc.
As for (2), I got it to work using the :bibtex-citation-template: attribute, by setting the string to ($id), but I can't figure out how exactly the string specified by the attribute is interpreted, and what else it is capable of.
I assume I can achieve (3) by tweaking bibitem_macro.rb. No problem, but I would like to know if a setting that allows tweaking this is already implemented.

Thank you, with kind regards

@ProgramFan
Copy link
Contributor

  1. In principle, this can be done. But many more code shall be changed, since the 2 in [1,2,3] are used to link to bibliography item 2. If we want that link, we have to add more code in generating correct links.
  2. the template is used by substituting $id with a string representing the citation id.
  3. No settings at the moment. I think we need to rethink the design.

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