dimanche 19 septembre 2021

When exporting html, how to use htlatex or xhlatex in org-export-dispatch?

M-x org-export-display h o works fairly well in exporting an org file to html. But the bibilography processing is not great: in sentences referencing articles with org-ref links, I see raw bibtex keys, and I also see them in the generated bibliography. Like this:

... But this value doesn't include diffuse irradiance Sengupta21solarBestPractBkNREL, ...
...

References

[Sengupta21solarBestPractBkNREL] Sengupta, Habte, Wilbert, Gueymard & Remund, Best practices handbook for the collection and use of solar resource data for solar energy applications, National Renewable Energy Lab.(NREL), Golden, CO (United States) NREL/TP-5D00-77635 (2021).

However, if I export to pdf first using M-x org-export-display l p, and then run a version of htlatex over the resulting tex file, then I get a nicely numbered (or whatever other format I pick) bibliography and links. Like this:

... But this value doesn't include diffuse irradiance [1], ...
...

References

[1] Sengupta, Habte, Wilbert, Gueymard & Remund, Best practices handbook for the collection and use of solar resource data for solar energy applications, National Renewable Energy Lab.(NREL), Golden, CO (United States) NREL/TP-5D00-77635 (2021).

Since I'm on Windows using TexLive, I'm actually using xhlatex instead of htlatex. The command line generating html from the pdf run output is:

xhlatex my_file.tex 

Where "my_file.tex" is a generated file.

What can I change to get M-x org-export-display h o to do the equivalent of running M-x org-export-display l p followed by running xhlatex on the command line? Or, does anyone know a different way to automate the step above?




Aucun commentaire:

Enregistrer un commentaire