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

support "nocite"? #322

Open
iveney opened this issue Jan 25, 2021 · 2 comments
Open

support "nocite"? #322

iveney opened this issue Jan 25, 2021 · 2 comments

Comments

@iveney
Copy link

iveney commented Jan 25, 2021

First off, thanks so much for making this plugin! 😃

I am migrating my blog to use jekyll, where I used pandoc previously. It supports \nocite{xxx}, and is helpful when I don't need to explicitly cite the items, but simply print out a list of selected references. Therefore,

## References
{% nocite A B C %}

{% bibliography --cited %}

should ideally NOT generate [1][2][3] in place, but DO print out them upon bibliography is called:

References
1. ...
2. ...
3. ...

Probably not a super popular usage, but definitely helpful for my case. Appreciate if this can be supported!

@inukshuk
Copy link
Owner

inukshuk commented Jan 25, 2021

Good idea! This should be really easy to implement if anyone would like to take a stab at it. Basically, just duplicate the cite tag and, instead of rendering the citation, just adding the keys to context['cited'] (currently, this happens here and here when rendering a citation).

For testing, one of these cited-only tests can be easily adapted.

@iveney
Copy link
Author

iveney commented Jan 28, 2021

Took a quick stab at it, when trying to add test I am running into the following. I can repro this even at master. Thoughts?

➜  jekyll-scholar git:(nocite) rake
/Users/ivanx/.rbenv/versions/2.7.1/bin/ruby -S bundle exec cucumber
Traceback (most recent call last):
	13: from /Users/ivanx/.rbenv/versions/2.7.1/bin/ruby_executable_hooks:22:in `<main>'
	12: from /Users/ivanx/.rbenv/versions/2.7.1/bin/ruby_executable_hooks:22:in `eval'
	11: from /Users/ivanx/.rbenv/versions/2.7.1/bin/cucumber:23:in `<main>'
	10: from /Users/ivanx/.rbenv/versions/2.7.1/bin/cucumber:23:in `load'
	 9: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/bin/cucumber:11:in `<top (required)>'
	 8: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/bin/cucumber:11:in `require'
	 7: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/cli/main.rb:8:in `<top (required)>'
	 6: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/cli/main.rb:8:in `require'
	 5: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber.rb:6:in `<top (required)>'
	 4: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber.rb:6:in `require'
	 3: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/parser.rb:2:in `<top (required)>'
	 2: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/parser.rb:2:in `require'
	 1: from /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/ast.rb:9:in `<top (required)>'
/Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/ast.rb:9:in `require': /Users/ivanx/.rbenv/versions/2.7.1/lib/ruby/gems/2.7.0/gems/cucumber-1.3.11/lib/cucumber/ast/step.rb:80: circular argument reference - name (SyntaxError)

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

No branches or pull requests

2 participants