Comments (15)
We could add the key to each reference as a data attribute then you could add a little JavaScript to extract it from there. Or, the nicer approach would be for us to use a little HTML template into which the reference is rendered; we could then expose via the configuration to give you full control. Something like:
reference_template: <abbr>#{key}</abbr>#{reference}
We simply run each generated reference through that template using string interpolation. What do you think?
(looping in @ashinkarov since he's working on scholar at the moment as well)
from jekyll-scholar.
Providing a method to specify HTML template is good. I would suggest that having an ordered list based on type would be good too. That is, prefixed with a string.
from jekyll-scholar.
I just added a first implementation. Now the question is what values we expose to the template. So far it is reference and key; we could add the type.
What about more custom requirements? We could add the current index in the list. For more control we'd need a kind of callback function that receives the entry and can return a hash. The only question is whether or not this is already too complex for the regular user and the more advanced users could just extend the tag anyway.
from jekyll-scholar.
I would think most users will either use the key or some form of an ordered list with a string prefix. Do you have an example up on how to use what you checked in?
Advanced users would probably just extend the tag.
from jekyll-scholar.
You can see an example here: https://github.com/inukshuk/jekyll-scholar/blob/master/features/bibtex.feature#L94
Basically you can configure the bibliography_template and in there you currently have access to %{reference} %{index} and %{key} – and I forgot to add %{type}
from jekyll-scholar.
I also added a configuration option for reference_tagname
so that you can configure what the reference will be rendered into (defaults to a span
).
from jekyll-scholar.
Thanks.
I think we should work out a method to cleanly interface scholar with extras. Extras does break because of the new additions to scholar. Perhaps having an -extras or some clean interface after which I can pick up the commands from there to do my extras parsing ... ?
from jekyll-scholar.
@hdpatel, is there a reason why do you keep extras in a separate repository? I mean extras are great, but you don't add that much of a functionality there, so it seems to me that your stuff can be added directly into jekyll-scholar with some configuration parameters. In that case whoever changes one thing will have to take into account another...
from jekyll-scholar.
Which changes broke the API there? The reference_tag should continue to work like before and the bibliography_tag was newly added.
from jekyll-scholar.
@ashinkarov in the beginning there were a few things in extras which were too specific to add them to scholar directly, that's why we decided to go for two separate repositories if I remember correctly.
Scholar has become more flexible in the meantime so we might be able to add most (or all?) functionality directly. @hdpatel will know that better than I do : )
from jekyll-scholar.
@ashinkarov: Two main reasons: 1) I just started it as a separate project to not bother @inukshuk much with my inexperienced abilities in ruby. Looking at the code you'll see that I am truly inexperienced. 2) scholar was not as flexible as it is now. Thanks to @inukshuk, it has evolved significantly in the short period of time.
@inukshuk: My problem is that I had customizations for bibliography with my own bibliography_bytype that allowed for parameters after it. For example:
%{ bibliography_bytype articles, Journals %}
I believe combining the features of scholar such as custom bibs using "-f" and queries "--query" will kill extras =)
from jekyll-scholar.
Right, so both of you guys are saying that there is nothing but historical reasons. It seems that it's time to join the efforts and join extras into scholar. It's just my opinion from the outside, and I might not know something. However, it would be easier for the users to install and configure one thing instead of two, and for the developers who might be not aware that the other thing exists. Just my twopence :)
from jekyll-scholar.
Yes we changed the argument format completely for the 1.0.0 release to make it easier to maintain. I started jekyll scholar but there are a number of people who use it more than I do myself, so I'm not always in the best position to judge what should or shouldn't be added. Basically, I think every tag, converter etc. should be added that has at least some potential appeal to everyone (this typically means it should be at least somewhat configurable). To make maintenance easier it should come with a test case, too. Other than that I really don't have a strong opinion.
I know that the query-support was a big step, so if we can implement the extras features directly in scholar all the better. @hdpatel you're not bothering me at all – it's actually the other way around, I think it's much easier if we can share the maintenance efforts.
@ashinkarov you beat me to it. I fully agree with you there.
from jekyll-scholar.
@inukshuk, @ashinkarov: I'm in agreement. We should integrate extras features into scholar. How should we proceed with that? FYI: I won't have time to really work on the code until after 3 weeks (exams and such).
from jekyll-scholar.
@hdpatel I think the best way forward would be to open an issue for each feature that's currently in extras. This way we can look at each one and see whether or not it is now covered by existing parameters; if it isn't we can move them over or implement them differently – whatever makes more sense.
from jekyll-scholar.
Related Issues (20)
- Footnotes before references.
- GitHub button just like HTML, PDF
- Add space after index in IEEE style HOT 4
- Query to filter entries based on the value of a field HOT 1
- Backlinks? HOT 1
- Sort entries in a query HOT 2
- Build error when used with github-metadata HOT 2
- Reduce jekyll-scholar build time? HOT 2
- Booktitle of new type fields
- Liquid Exception: undefined method `exists?' for File:Class in _pages/... HOT 1
- --suppress_author flag replaces author with title HOT 2
- Individually linked citations in multiple citations HOT 5
- Security?
- How to cite a paper/book in my posts HOT 4
- Be able to change style files / use more than one style file. HOT 2
- details_link does not allow variable input HOT 1
- Jekyll Scholar on macOS 10.13.6: Tried to create Proc object without a block HOT 4
- Academicpages/minimal mistakes compatibility HOT 6
- Completely disable details link generation for a page HOT 2
- How to provide the raw bib entry in a small popup or drop down? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jekyll-scholar.