Alternative to #1283 and #1284 implementing Latin-looking capital Greek
letters via symbols instead of macros, which interacts with fonts more
correctly.
* Expose defineSymbol in the main KaTeX object
* More Unicode letters (#1260)
This PR serves as a complement to PR #1232 by supporting some letters that are omitted from the Unicode range 1D400–1D7FF.
* Include Bold-Italic fonts for \boldsymbol (#1257)
* Include Bold-Italic fonts for \boldsymbol
Fix#1228
* Update screenshots
* README: Add size badge (#1253)
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* More Unicode letters (#1260)
This PR serves as a complement to PR #1232 by supporting some letters that are omitted from the Unicode range 1D400–1D7FF.
* Include Bold-Italic fonts for \boldsymbol (#1257)
* Include Bold-Italic fonts for \boldsymbol
Fix#1228
* Update screenshots
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* Use badgesize.io with https
* Fix space width in \texttt (#1261)
* Fix space width in \texttt
Fix#1255 via https://github.com/KaTeX/katex-fonts/pull/41.
Also fix width metrics via https://github.com/KaTeX/katex-fonts/pull/42.
* Improve test
* Update screenshots
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* More Unicode letters (#1260)
This PR serves as a complement to PR #1232 by supporting some letters that are omitted from the Unicode range 1D400–1D7FF.
* Include Bold-Italic fonts for \boldsymbol (#1257)
* Include Bold-Italic fonts for \boldsymbol
Fix#1228
* Update screenshots
* README: Add size badge
Add a size badge showing size of gzipped katex.min.js
* update-sri: Add code to replace size badge in readme
* Change to use badge from shields.io instead
My bad for assuming that badgesize.io supports https. Change to use the
badge from shields.io which supports https.
* Use badgesize.io with https
* Specify height for SVG elements
I ran into an issue where a low-specificity CSS rule elsewhere on the page was overriding the KaTeX SVG height, rendering fraction lines invisible. Does this seem like a reasonable addition to the style sheet?
* Inherit instead of 100%.
* Type correction to allow documentFragment to be children of span.
This is necessary because documentFragments are put in spans in some cases --
e.g. src/functions/sqrt.js. Not sure why this wasn't caught by the type system.
It's possible that it might be happening in buildHTML as well -- it is not yet
been typed and thus violations of the existing types haven't yet had a change to
be caught.
* Fix anchor.toMarkup
* Add space between `a`(tag name) and `href`(attribute name)
* Remove `this.href` appended to `markup` in the template literal
* Add regression test on #1245
* Treat svg-wrapping spans differently from DOM-wrapping spans.
In preparation for the conversion of buildHTML to @flow, separate the two
different uses of domTree.span -- one to wrap a single SVG and one to wrap
arbitrary DOM nodes. This separation is to help avoid type issues that pop up
due to buildHTML methods accessing the .children field of spans as if they are
DOM elements and not SVG ones.
* Simplify the domTree DOM definitions based on separation of two span types.
* Fix#1212 by supporting `\(...\)` in addition to `$...$` inline math nested inside `\text`. This turned out to be harder than one would think because of the way `$` was being handled specially, while `\(` needed to be handled as a function, which immediately consumed the `\(` token, which meant that the first following token got consumed in text mode instead of math mode (unlike `$` where we could switch the mode before consumption).
* Added new `consumeMode` setting for functions which tells the parser to switch modes just for the consumption of the command token.
* Now that we're working with functions, move all the `$` handling code into `functions/math.js`. Somewhat bizarrely, we can define `$` as a function (nearly identical to `\(`) and it all works (just like we can have single-character macros). This move removed a lot of messy stuff from `Parser.js`: `ParsedDollar`, `ParsedFuncOrArgOrDollar`, `newDollar`, `assertFuncOrArg`, and at least three explicit checks for `if (... === "$")`.
* Moved the `consume()` for the command token from `parseSymbol` to `parseGivenFunction`. This ended up not being strictly necessary, but seems conceptually cleaner.
* Partially address #1027 by setting `consumeMode: "text"` for `\text` commands. As a result, `\text` now instantly switches the mode to `"text"`, so even an unbraced macro argument will properly detect text mode. I added a test for this, which is a slightly weaker form of #1027.
* Format buildHTML groupType definitions in preparation for adding types.
1) Collapse groupType definitions (a bunch of functions all of the same type
defined on the groupType object) into a single object in preparation for
putting types only on the base object.
2) Do minor reformatting to account for the +4 indent above which pushes some
lines past 80 characters.
3) Do other minor formatting changes for readability, taking advantage of ES6.
* Review fixes.
* Support Unicode delimiters
This PR adds support for the Unicode versions of \lfloor, \rfloor, \lceil, \rceil, \lgroup, \rgroup, \lmoustache, \rmoustache, \ulcorner, \urcorner, \llcorner, and \lrcorner.
All the mappings agree with `unicode math`
* Change tests from Parse to Build
Fix#1204 by adding `\yen` support to text mode.
More generally, I checked all the text+mode symbols supported by
[amsfonts](http://mirrors.ctan.org/fonts/amsfonts/doc/amsfonts.pdf)
(see Section 6), and found that `\yen` is the only one lacking text-mode
support.
* Add display/displayMode toggle on test page
* Fix#1035
* Refactor query parsing code to promote re-use
* Also add support for (unescaped) single-character macros
* Rewrite to use query-string
* Restore modes on package*json
* Fix \nobreakspace, refactor "regular space" checking
Fix#1199 by adding \nobreakspace to the list of commands/symbols that
behave like a regular space character. Refactor to put that list in one
place, and use an object so it checks instantly instead of sequentially.
* Copy test from #1201
* Work around negative space bug in Chrome
Fix#984
The screenshot test is still somewhat defective, showing a space before
the "post" text (a period). This seems limited to the screenshotter, however,
as it works fine in the tester via
http://localhost:7936/?text=%5Cfbox%7B%5C%241%2C%5C!000%2C%5C!000%7D%5CKaTeX&display=0&after=.
* Update screenshots
* Switch to inherited `width: min-content`
* Add CircleCI config for online screenshot verification/generation
* Remove `Checkout unicode fonts` step
Unicode-fonts are now a submodule, which is checked out in `Checkout submodule` step.
* Always generate new screenshots
`makeVList` sets depth with an empty span for which it defines a height. But Chrome, in contenteditable mode only, treats that span as if it contains some text. The resulting `min-height` can over ride our desired depth.
So we insert an empty span inside the `depthStrut` span.
* unicodeTextInMathMode setting
* When `unicodeTextInMathMode` is `true`, accented letters from
`unicodeSymbols.js`, and CJK and other supported languages,
get added support in math mode (as requested in #895).
* When `unicodeTextInMathMode` is `false, all of these stop working in
math mode, and are only supported in text mode (matching XeTeX behavior).
Note that this is a backwards incompatibility with some 0.9.0 alpha/betas.
* Fix handling of Unicode characters ð, Å, å
* Fix double handling of ð (math maps to \eth, not special Unicode character)
* Remove Åå special math handling, thanks to #1125
* Forbid extraLatin when unicodeTextInMathMode is false
* 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
* Remove dummy spans for spacing around \href
Spacing around \href is handled in the `buildHTML`
* Make bin cancellation aware of children of fragment and anchor
+ Added getOutermostNode function
* Fix tight spacing not applied
* Add surrounding argument to html.buildExpression
It is an array consisting type of nodes that will be added to the left
and the right, and if given, will be used to determine bin cancellation
and spacings of outermost nodes.
* Fix html.buildExpression call in leftright
* Add dummy span only when given
* Update buildHTML.js
* Group more test npm scripts into `test:`
* Update documentations on the development workflow
* Update .travis.yml to match updated NPM scripts
* Run npm install in Travis
* Support Reaction Arrows
This PR is written to supply reaction arrows for a future `mhchem` extension. `mhchem` uses seven reaction arrows. Four of them correspond to extensible arrows already available in KaTeX. This PR creates the other three.
These arrows will also be useful to chemists writing about reactions when `mhchem` is unavailable.
Three new extensible arrows are introduced: `\xrightleftarrows`, `\xrightequilibrium`, and `\xleftequilibrium`.
These names are not `mhchem`’s user-facing function names. In `mhchem`, users would call these arrows with syntax such as: `\ce{A<-->B}`, or `\ce{A<=>>B}`, or `\ce{A<<=>B}`. I’ve provided names that look more like the other extensible arrow names. That’s probably worth some discussion.
* generate screenshots for ReactionArrows
* Increase overlap in arrow shaft
To prevent a small gap when rendering in very large font sizes.
* Adjust upper text vert alignment. Add warning.
* Limit alignment adjustment to \xleftequilibrium
* generate screenshots for reaction arrows
* Enable spacing functions in text mode
Spacing functions such as `\;` or `\quad` should be accepted in either math mode or text mode
* Add tests
* Fix tests
* Fix lint error