How to set up org-mode so it could include the result of \cite LaTeX command in HTML export?
Example:
Gulliver's Travels
My father had a small estate in Nottinghamshire: I was
the third of five sons.\cite{swift1726}
\printbibliography
#+LaTeX_HEADER: \usepackage{biblatex}
#+LaTeX_HEADER: \bibliography{classics}
LaTeX export is absolutely great. But HTML expectantly produce all citations as they are in source. But how to achieve an output like this:
...
<title>Gulliver's Travels</title>
...
<p>My father had a small estate in Nottinghamshire: I was
the third of five sons.[<a href="#swift1726">1</a>]</p>
...
<p id="swift1726">[1] J. Swift. <i>Gulliver's Travels</i>. 1726.</p>
...
The org-mode contributed package
org-exp-bibtex.elproduces an HTML bibliography using bibtex2html and then turns cite commands into links to bibliography items when you export to HTML. There is some documentation inorg-exp-bibtex.el.I will include some additional information that helped me get this feature to work on my system. The file
org-exp-bibtex.elseems to come with recent versions of org mode. So export may just work if you evaluate(require 'org-exp-bibtex)by, for instance, putting it in your~/.emacsand then put something like#+BIBLIOGRAPHY: classics plainin your source file in the place of your LaTeX\bibliographystyleand\bibliographycommands. I found the following patch toorg-exp-bibtex.elwas needed for my system though.The first change helps if you get the error “Symbol’s function definition is void: flet”, I learned here. The second change just calls bibtex2html with TMPDIR set to the current directory. The bibtex2html homepage suggests such a workaround for a problem that bibtex2html has with some TeX installations.