Jean-Marc Lasgouttes 16af6e7c50 Implement display of roots more faithfully
This is a follow-up to 758de957.

- unify the metrics and drawing of \sqrt and \root using helper
  functions mathed_root_metrics and mathed_draw_root.

- compute the vertical spacing above the nucleus of the root following
  rule 11 of the TeXbook. In particular, it is different in inline and
  display style.

- draw the root glyph without hard-coded pixel values. Make the line
  width depend on the zoom.

more work is needed to implement properly rule 11:

- Ideally, we should use sqrt glyphs from the math fonts. Note that
  then we would get rule thickness from there.

- The positioning of the root MathData is arbitrary. It should
  follow the definition of \root...\of... in The Texbook in
  Apprendix B page 360.

Fixes bug #10814.
2017-12-04 10:58:08 +01:00
..
2016-06-16 20:39:32 +02:00
2017-07-05 14:46:34 +02:00
2017-07-03 13:46:30 -04:00
2015-08-23 11:47:37 +02:00
2017-07-03 13:46:30 -04:00
2017-07-03 13:46:30 -04:00
2017-07-03 13:46:30 -04:00
2017-07-03 13:46:30 -04:00
2017-01-31 22:55:00 +01:00
2017-07-03 13:46:30 -04:00
2017-01-31 22:55:00 +01:00
2017-07-03 13:46:30 -04:00
2017-07-05 14:46:34 +02:00
2017-04-03 00:26:49 +02:00
2017-07-05 14:46:34 +02:00

Inset 'Xyz' is implemented by 'MathXyzInset' in 'math_xyzinset.[hC]'


Inset hierarchy:

                                   MathInset
                                (abstract base)

                         /            |               \

              Dim                  Char               Symbol, Space, ...
         (thing that need       (for things formerly
          the width_/ascent_     known as characters)
          /descent_ cache)

          /             \

       Nest              Dots,  Func, ...
  (for thing with
   nested content)

        |         \

      Grid        Decoration   Delim   Frac  Macro  Root  Script  Sqrt

      /   \

 Array    Hull
         (base for eqnarray/align/...)