HEPData / hepdata

Repository for main HEPData web application
https://hepdata.net
GNU General Public License v2.0
41 stars 11 forks source link

plots: resolve problems with MathJax and d3.js #149

Open GraemeWatt opened 6 years ago

GraemeWatt commented 6 years ago

There are apparently complications with using MathJax (used for rendering LaTeX) in conjunction with d3.js (used for plotting), which result in the rendered text disappearing. See, for example, Stack Overflow. This issue affects axis labels, non-numerical bin labels, and the labels shown in the axis selector for heatmap plots. Until this issue can be resolved, $ symbols have been stripped from the relevant labels to prevent use of MathJax, meaning that the less-readable raw LaTeX encoding will be displayed instead.

GraemeWatt commented 4 years ago

A possible workaround would be to convert the LaTeX tags to Unicode using UnicodeIt: see the replace function of the unicodeit.js file.