* Fix interaction between styles and sizes by implementing styles as sizes.
Rather than having both `textstyle` CSS classes and `size5` CSS classes
affect the font size (and step on each other), implement sizes more the
way TeX does: a command like `\displaystyle` changes the current size.
This is actually a simplification, since now only `size` affects the size.
Simplifies CSS and computation. Many screenshotter tests change; they
change to be more like TeX. For instance, `\sqrt` fixes some
discrepancies in size treatment.
Also:
Remove the `Options.withX()` methods in favor of `.havingX()`, which
might return the same `options`.
Remove `Style.cls()` and `Style.reset()`.
Remove `Options.reset()`. You should never modify an `Options`; they
should change only by the `havingX()` methods.
* Implement TeX sizing for scriptsize/scriptscriptsize.
At every size level. Also make the sizes match TeX to the last decimal.
* Review comments.
* Show correct browser support
KaTeX runs in IE 9 but not in IE 8. This PR edits the README and
Contributing files to reflect that fact.
Resolves issue #377.
* Show correct browser support
KaTeX runs in IE 9 but not in IE 8. This PR edits the README and
Contributing files to reflect that fact and adds Edge to browser list.
Resolves issue #377.
* Update texcmp to ubuntu 17.04 and avoid mounted host directory
Switch to linux 17.04 in order to have a version of nodejs which understands
ES6 syntax, for the sake of a consistent codebase.
Avoid mounting the host directory, but use “docker cp” instead to transfer
files between host and container. This should avoid ownership and
permission issues.
Support macros with positional arguments.
Fix one overline example which caused LaTeX failure due to missing braces.
* Extract texcmp results as current user
This allows running the texcmp.sh script using sudo on afs.
* Change texcmp conversion to gray
As per #708, this should increase compatibility with older versions of
imagemagick, and might also do a better job of preserving the original sRGB
color space.
* Abandon tar and use plain docker cp instead
Thanks to Erik Demaine for suggesting this.
* Move npm install into creation of texcmp docker image
The previous code incorrectly implemented TeXbook rules. First off,
the font metrics at issue should be those for the superscript/
subscript style, not the main style. Secondly, the metrics should be
scaled by the font size.
This changes some screenshotter tests (and they look more like TeX
now).
Add long-form aliases for various text symbols
* \textgreater is an alias for > in text mode
* \textless is an alias for < in text mode
* \textbar is an alias for | in text mode
* \textdollar is an alias for \$ in text mode
* \textunderscore is an alias for \_ in text mode
* \textbraceleft is an alias for \{ in text mode
* \textbraceright is an alias for \} in text mode
* \textless is an alias for < in text mode
* \textgreater is an alias for > in text mode
* \textbar is an alias for | in text mode
* \textbardbl is an alias for \| in text mode
* \textendash is an alias for -- in text mode
* \textemdash is an alias for --- in text mode
* \textquoteleft is an alias for ` in text mode
* \textquoteright is an alias for ' in text mode
* \textquotedblleft is an alias for `` in text mode
* \textquotedblright is an alias for '' in text mode
* \textdagger is an alias for \dag in text mode
* \textdaggerdbl is an alias for \ddag in text mode
* \textsterling is an alias for \pounds in text mode
* \dag, \ddag work in text mode
* \circledR, \checkmark, \pounds work in text mode too
* Extend Symbols1 test to test \pounds and \textdollar in \text
* Add note about \pounds in text vs. math mode
* Ship predefined macros with the library, in macros.js.
* Allow macro arguments #1 and so on, with argument count deduced from string.
* Use these features to implement \overset and \underset, fixes#484.
As the dist directory isn't available on the original branch, we cant use
its files to update the SRI hashes. Checking out from the release tag is
therefore the better option. A checkout will automatically stage its files.
* Also edit dist/README.md. Otherwise npm publish will overwrite that
AFTER the dist directory has been added, causing the git checkout to fail.
And it's the right thing to do anyway, having ALL the READMEs edited.
* Add all the modified READMEs so they get committed correctly.
* Improve two references to master which are no longer accurate.
* Check for uncommitted changes just before creating the tag.
* Encourage always specifying the next version, as discussed in
https://github.com/Khan/KaTeX/pull/615#discussion_r97208770