-
Notifications
You must be signed in to change notification settings - Fork 7
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
Use translation-server to export directly to CSL JSON #1
Comments
Yep, but only doi: and isbn:. I think it's usually better to use URLs anyways though.
Yep it's supposed to be just the markdown link syntax (how pandoc parses it anywys if citations extension is turned off). In fact, I should probably also support
The syntax for pandoc-url2cite citekeys is basically defined by this regex: Line 3 in b28374a
Every cite key that matches this regex is passed to Citoid, everything else will be resolved as an alias to a different cite key (or fail if unmatched). Looks like manubot has the same syntax for most ids (prefixed with doi: / isbn:), but it also adds a url: prefix to URLs. I'd like to keep the "bare" url specifiers because for me that is the preferred syntax and I'll probably be purely using those. Some thoughts
Yeah I was wondering why Citoid doesn't have a CSL export option since it's an obvious choice. I've already had problems with the conversion:
So using something that can output CSL directly would be a good idea. But, I was already pretty anxious about using an external API as the resolver for multiple reasons (changes / downtime in the future, trust, etc). I really would like to use a local resolver but translation-server is far too much of a behemoth. I was really happy that I found that wikipedia provides a server since I can trust that to be able to handle traffic, not go down soon and be somewhat stable. I'll consider using the manubot server (thanks!) if I encounter more problems in the future (like as you said outdated convertors). Thank you for the suggestion. I did not know about manubot, looks interesting. I definitely like what the output looks like, though the input might be too complicated / opinionated for me. Also tbh I'm kind of missing an overview of what manubot is, how it compares or relates to latex, pandoc and other markdown processors, what a manuscript is (is a paper a manuscript?), and if I can use it to write for existing journals (that need latex). |
Actually I just found the manubot.org homepage which explains stuff better - my fault haha. I just went through the repos, maybe link from the rootstock repo to the homepage as well? |
Thanks for the link to jgm/pandoc-citeproc#308. The limited character set supported by pandoc citekeys has been a big barrier for us as well. I'll chime in on the issue.
And this would define the
Makes sense. I think you make a good point that perhaps Manubot could use the
Yeah, requiring URLs to give all viewers the ability to immediately resolve identifiers is a nice perk. The main downside is brevity, i.e.
Yes, the reliability of the Wikipedia infrastructure is a big plus. If you were to add support for
Yes, I see your filter as more general purpose. Manubot is really a toolset to continuously publish a mansucript whose source is tracked in a git repo, so github can be used for collaborative writing. |
Yeah. Imo it's kind of a mistake that pandoc decided to introduce a different and incompatible syntax for citekeys - But it looks to me like it can be unified back pretty well if it would add the
Yep, good idea. Will probably only happen the next time i write an academic document (and have problems with it) so it might be a bit :D. Might also make sense to push citoid to support csl export. From what I understand it should only be like a one line whitelist change. I'm not even sure what citoid does apart from be a translation-server. |
Definitely! I'm not sure who maintains the citoid infrastructure, but keep me up to date if you have any leads. |
merges #99 closes #13 refs #120 refs phiresky/pandoc-url2cite#1 Create a pandoc filter, named `pandoc-manubot-cite`, for citation-by-identifier. This filter can be used separately from the rest of Manubot. However, if used following `manubot process`, use the new `--skip-citations` option when processing. The Pandoc filter relies on Pandoc's more advanced parsing of Markdown documents, such that citations in code blocks will no longer be interpreted by Manubot. Adds support for defining citekey aliases using reference link syntax.
Really awesome package. I was working on a similar pandoc-filter using the
manubot
python package a while ago in manubot/manubot#99, but we never finished it.I like your syntax for specifying citekey aliases that point to URLs. Looks like you also support some types of persistent identifiers directly in the citekey. Manubot currently supports several types of IDs for citation by persistent ID. Would be interested in coordinating to keep our syntaxes compatible.
Looks like the core of the functionality of pandoc-url2cite occurs around:
pandoc-url2cite/index.ts
Lines 62 to 76 in b28374a
So first you use wikipedia Citoid to create bibtex and then use pandoc-citeproc to convert to CSL JSON. Note that you can also use the translation-server API to go from Zotero metadata directly to CSL JSON (python code). Theoretically it seems possible that you could get higher quality metadata by avoiding the bibtex passthrough.
Feel free to use our public translation-server instance we host for Manubot at
https://translate.manubot.org/
as described at manubot/manubot#82. When we last checked, Citoid lagged behind translation-server... not sure if that is still the case.The text was updated successfully, but these errors were encountered: