* Revert frac-lines to borders
This PR reverts the rendering of frac-lines from SVG paths back to span borders. This solves the thick grey bar reported by @mbourne in issue #1173.
The result is a frac-line similar to KaTeX v0.9.0-alpha1. The frac-lines are span borders and the CSS contains a `min-width: 1px;` rule to keep those borders visible.
There is one difference between this PR and v0.9.0-alpha1. The earlier work contained a second CSS rule:
```
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (min-resolution: 192dpi) {
.katex.mfra.fracline {
min-height:0.5px;
}
}
That second CSS rule did not help much. Instead, it caused some lines to disappear. In the thread to issue 1173, people tested the rendering from the proposed approach and reported that frac-lines disappeared only at sized that were already too small to read.
* Fix lint errors
* Remove superfluous SVG paths.
* Remove superfluous CSS
* Removed `rulespan` from `stretchy.js`
* Support Unicode \ll and \lll
Fixes issue #1271
* Fix indent
* update screenshots for fracLineBorder
* Update Arrays-chrome screenshot for fracLineBorder
* Padding over \sqrt and Paths for frac-line
This replaces two earlier PRs.
* Restore reaction arrows
* regenerate screenshots
* Set line padding in a constant
* Update with latest master
* Fix lint error
* update screenshots
* Fix frac lline
For frac-line, use an SVG line in an extra tall span.
I still need to think of a way to adust `vertical-separator`.
* Fix spaces in katex.less
* regenerate screenshots
* update HorizontalBraces and StrikeThrough screenshots
* Change frac-line from border to full span
Change `frac-line` and `vertical-separator`. Instead of using span borders, fill entire span using a `box-shadow`.
This change will enable more dependable engagement of the `min-height` CSS.
* Fix indentation
* Fix indent again
* Change box shadow to inline SVG
* Fix lint error
* regenerate screenshots after switching to SVG for fraction bars
* Convert nested SVGs to single-level SVGs
This PR evades a Safari bug which causes nested SVGs to zoom improperly. Fixes the remainder of issue #883.
* Add omitted word
* Fix lint errors
* update screenshots
* Pick up review comments
* Clean up variable names
Remove two more redundant variables.
* Fix \sqrt zoom in Safari
This PR evades a Safari bug which causes nested SVGs to zoom improperly. `\sqrt` and single-ended arrow SVGs have been modified.
These have been converted from nested SVGs to single level. Their long tails are now sliced off using CSS `overflow: hidden`.
Safari will still improperly zoom any double-ended stretchy arrows and horizontal braces.
* Fix \sqrt{}
Even if the function argument is empty, still render an SVG whose width equals the surd glyph.
* Fix tall \sqrt when scaled
* update screenshots affected by sqrt fixes
* more screenshots after changes to fix sqrt
* Pick up review comments
* Improve SVG Performance
This PR introduces three new classes: `svgNode`, `pathNode`, and `lineNode`. SVG data is then loaded into the domTree exclusively via instances of these classes.
`innerHTML` is banished.
* Fix lint errors
* Fix \cancel typo
* Fix sqrt height
* Adjust min-lenght
Adjust some of the extensible arrows to get a min-length that matches glyph length of the long arrows in KaTeX Main font range from Unicode 27F5 to 27FC.
The accent arrows still get min-lengths that match the arrows in the Unicode 2100 range.
* regenerate screenshots after optimizing SVG code
* update DisplayStyle screenshot for Chrome
* update OverUnderset and Smash screenshots for Chrome as well
* Remove escapes from template strings
* Pick up review comments
* Fix lint errors
* Add comments
* Improve \sqrt
Make \sqrt out of inline SVGs to ensure a perfect match at the junction between surd and viniculum.
* Tweak for kern clarity
* Fix lint error
* regenerate screenshot tests with sqrts
* Correct advance
Edit the SVG paths so that they have the correct left bearing and advance width values.
This will correct the spacing on the left side of each surd and it will also improve the placment of a root indice.
* Revise scriptstyle surds
In the `main` size, delimiters *do* scale with scriptstyle and scriptscriptstyle.
* update screenshot images containing sqrts
* Use inline SVG for stretchy elements
Replace all background-images with inline SVG code.
Pros:
* `\color` works in all browsers, even IE/Edge
* Better printing
* Much simpler CSS
* No links to background-images
* No `mask`
* No browser-detection
* No external SVG files
* Faster first rendering
Cons
* No image caching
* Heavier HTML load
* Larger JavaScript file
* `\cancel` line is in `px` units, not `em` units
* Remove static/images from make file
* Change \cancel from px to em
* regenerate screenshots for functions using inline svg