-
Notifications
You must be signed in to change notification settings - Fork 9
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
False html rendering of bibliography with embedded latex #108
Comments
Hi, The code:
Hope it of help for someone. |
One final remark: Three modifcations are necessary:
That results into the following working bibtex title entry: This situation is not perfect, however, for my cases it works :-) |
Hello, thanks for reporting and sorry for responding only now! I'm not sure it's possible to come up with a significantly less hackish solution since the CSL standard itself doesn't support embedded LaTeX math formatting -- as far as I can see the most what could be achieved would be supporting superscripts and subscripts (which is included in CSL), which might be enough for a large part of the uses cases though. Of course, one could try to extend CSL to allow embedded LaTeX math but then that would require support in the formatter backends as well which is far from trivial to say the least. However, @bdarcus and @denismaier may be able add something more substantial -- has there been a discussion on supporting embedded (LaTeX) math in CSL? |
Yes, but no resolution. It's complicated, given the diverse contexts CSL is used in, including word processors. See here for discussion, and linked PR. https://discourse.citationstyles.org/t/rfc-rich-text-for-csl-json-input-format/1672 The essence of the idea is expressed in this schema. https://github.com/citation-style-language/schema/blob/v1.1/schemas/input/csl-rich-text.yaml Please weigh in on this proposal, @andras-simonyi; we need input from implementers. |
Hi,
I am using org-ref for citation handling. I export my org files to html. The following bibtex entry does not render as expected:
@Article{PhysRevB.57.1292,
title = {Determination of the phase difference between the Raman tensor elements of the ({A}{1g})-like phonons in ({\mathrm{SmBa}}{2}{\mathrm{Cu}}{3}{\mathrm{O}}{7-\delta}) },
author = {Strach, T. and Brunen, J. and Lederle, B. and Zegenhagen, J. and Cardona, M.},
journal = {Phys. Rev. B},
volume = {57},
issue = {2},
pages = {1292--1297},
numpages = {0},
year = {1998},
month = {Jan},
publisher = {American Physical Society},
doi = {10.1103/PhysRevB.57.1292},
url = {https://link.aps.org/doi/10.1103/PhysRevB.57.1292}
}
The embedded LaTeX part is not processed correctly.
I use the following minimal org file
#+HTML_MATHJAX: align: left indent: 5em tagside: left font: Neo-Euler
#+HTML_MATHJAX: cancel.js noErrors.js
#+csl-style: apa-5th-edition.csl
#+csl-locale: en-US
[[cite:&PhysRevB.57.1292]]
[[bibliography:c:/Users/Joe/Dropbox/emacs/psimacs/emacs/content/bibliography/bibliography.bib]]
The problem is that somehow the curly braces of '({A}{1g})-like phonons in ({\mathrm{SmBa}}{2}{\mathrm{Cu}}{3}{\mathrm{O}}{7-\delta})' are filtered and the resulting string is not recognized by MathJAX anymore.
If I export to org as an intermediate step I can see that the braces are gone:
<<citeproc_bib_item_1>>Strach, T., Brunen, J., Lederle, B., Zegenhagen, J., & Cardona, M. (1998). Determination of the phase difference between the raman tensor elements of the (A_1g)-like phonons in (SmBa_2Cu_3O_7-). /Phys. rev. b/, /57/, 1292–1297. American Physical Society. Retrieved from https://link.aps.org/doi/10.1103/PhysRevB.57.1292
Is this a problem of citeproc-el or do I stretch the framework to much?
What can I do to export these kinds of bibliography correctly to html?
Any help or comment is appreciated.
Best hatlafax
The text was updated successfully, but these errors were encountered: