Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
org-ref support discussion #193
Continuing the conversation about
Org-ref should have done the org-ref link conversion correctly when the Org to Markdown conversion happened using ox-hugo. As long as org-ref supports ox-md, this should work fine.
So, to understand this better,
(To help understand this problem, don't enable Pandoc Citations for this.)
fwiw, I wanted ox-hugo to support org-ref too. By default, org-ref supports markdown export, but does exports the links in pandoc-style format. To change it to a normal format, I overrode the export function so it does what I want it to do:
Happy to explain more later if you have any queries. Would be great if this configuration could be package-local to ox-hugo.
I don't use org-ref so forgive me for the ignorance.
From what I see, the snippet you added doesn't deal with with ox-hugo or even with Org exporter system in general. It more seems to be a formatting choice for org-ref generated citation, and that choice could probably vary with person.
Instead of baking this into the package, it would be nice to add it to the ox-hugo-manual.org in the Enhancement section (which gets published to the ox-hugo doc site).
Do you have your copyright assigned to FSF?
That's correct. However, that snippet overrides how org-ref exports to markdown completely, probably breaking org-ref elsewhere in parts I don't use. I was thinking that if ox-hugo is the one triggering the ox-md export, then it could perhaps use an advice to redefine the function temporarily.
This approach makes sense as well, but I think my snippet could probably be improved.
No. Do you require it?
Yes. Some Day (TM), I plan to put this on GNU Elpa too.
Yes, that's correct, because ox-hugo extends from ox-md. As I haven't used org-ref, I don't understand entirely what that snippet does. Does org-ref not work with ox-hugo/ox-md exports by default? If so, should this be fixed in org-ref?
Or is it just that the styling is different from your preference?
If the combination of org-ref out-of-box and ox-hugo out-of-box is broken, then the fix needs to go in org-ref.el or ox-hugo.el. But I don't know where yet.
But you will need to drive this further (as you know org-ref better) and provide minimal working examples showing the problem and the fix.
Also, I do not know if this issue I opened related to org-ref/ox-md is already fixed: jkitchin/org-ref#558. The problem is that the org-ref user(s) so far didn't drive the resolving of this problem. At the time of posting that issue, org-ref + ox-md did not work because org-ref for that backend was not compatible with Org 9.0.
I'll get them signed if you need it.
Here's a small example to illustrate the problem.
org-file contains (excluding hugo headers)
bib file contains:
Org-ref exports the links to markdown in a format more suitable for pandoc. Here's a snippet of the original export:
Since ox-hugo doesn't do pandoc link-processing, this doesn't turn out nice.
This text is determined by the function
It's just a matter of producing the correct textual output for hugo, which doesn't further use pandoc for link processing.