-
Notifications
You must be signed in to change notification settings - Fork 433
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
Citation/bibliography support #27
Comments
Please forgive me if I'm being ignorant...I'm not a JS programmer. It looks like a JS project exists for parsing BibTeX databases already. I'll try to poke at it a little bit, but it looks like this would be a good start for adding citation/bibliography capability. I think it'd be a good idea if whatever citation capability that's added can directly parse BibTeX databases since most users interested in this feature are probably coming to ReLaXed from LaTeX and are likely already generating their bibliography database files with something like JabRef or Mendeley. Edit: It looks like https://citation.js.org/ may be a better choice? I've been in C++ and Python for years and I've never touched JS or NodeJS before. |
https://github.com/larsgw/citation.js/tree/master#starting looks indeed very promising. It uses https://github.com/juris-m/citeproc-js |
I agree. Citation.js looks like it'll do the job. I have some downtime so I'll play with it a little and see what I can come up with. Edit:
Anyway, after looking at it a little, I think citation-js will be a good way forward. For instance it would be possible to read in BibTeX and parse the entries to JSON and a function could use that JSON to format citations. |
@afhoffman thanks for the exploration. Some thoughts of this:
p The Pug language has been praised in the past (+cite(Zulko2017), +cite(McPugface2015)).
// end of page
+bibliography
To answer your question @afhoffman some (old) bibliography managers allow you to browse Bibtex files like if they were databases, so having the full abstract was a way to explore and identify the papers you want to cite. This has been made obsolete by Mendeley which connects to the Internet. |
I agree. I think ReLaXed has a ways to go before it could fully replace LaTeX in those cases, but it seems like it'll be much, much easier to use than LaTeX. I don't think anyone will argue that sometimes doing simple things in LaTeX can be too difficult and/or time-consuming. ReLaXed seems like it'll be much more straightforward, even when it's more mature. I like the usage example you show there, I think that's exactly what users would want to see when it comes to citation support. Keeping the bibliography support separate may be a good idea. It'd help you keep the core ReLaXed source code small and users who don't care about bibliography support wouldn't be bothered with it. |
I think that would be pretty awesome, also having some hooks that would allow people to write plugins for certain actions, pre-parse, post-parse, post-render etc |
I was able to accomplish a bibliography using citation-js. It is not a built in solution for relaxed yet, since I got a working example, I will clone the repo and see if I can make it into a built in system. Bibliography setup. Made a quick forked version with bibliography support: Drew-S/ReLaXed |
We can mark this a closed, now that |
I noticed that the bibliography system has no footprint (=extra duration) at all even on documents with a HUGE dom, that's pretty remarkable. Thanks @Drew-S ! Next step will be to add proper documentation. |
Are you considering to add citation feature, like LaTeX? #8 refers to a ToC support, if it’s gonna be implemented, also adding a bibliography support could be easy as pie.
The text was updated successfully, but these errors were encountered: