hypothesis / vision

Envisioning the future of the Hypothesis.
https://github.com/hypothesis/vision/issues/
40 stars 8 forks source link

Improve highlighting of math equations #212

Open robertknight opened 8 years ago

robertknight commented 8 years ago

Highlighting or annotating a math equation rendered using MathJax or KaTeX currently results in each glyph within the equation being highlighted separately. The result would look much nicer if the whole equation, or the span of the equation that was highlighted, was highlighted as a single block.

  1. Go to this page http://cs231n.github.io/linear-classify/ (which renders math using MathJax) or this page https://khan.github.io/KaTeX/
  2. Activate Hypothesis and use it to highlight an equation

Current result:

Each element of the equation is highlighted individually, which looks pretty ugly. H currently wraps each element in its own <span class="annotator-hl"> tag.

Preferred result

Ideally the whole equation or selected region would be highlighted.