* Refactor \kern, proper \mkern support, add \hskip
* Move \kern, \mkern into functions directory
* Add \hskip, \mskip support (but without supporting plus/minus)
* Properly separate \kern, \hskip from \mkern, \mskip.
(The former work in both modes, and don't support mu units.
The latter work only in math mode and only support mu units.)
* Render \kern etc. using MathML <mspace>
* Implement \TeX macro
* Implement \LaTeX
* New KaTeX logo \katex
* Rename hskip.js -> kern.js
* Tweak katex \kern to 0.16em
* \katex kern -.17em
* Compute A raise height in \LaTeX and \katex
* Switch mu unit errors to warnings
* LaTeX screenshot test
* Replace \KaTeX with macro definition
* Update screenshots with \KaTeX in them
* Fix font selection for \*TeX macros
This is a workaround for #836 for the command case of using \bmod,
without changing any spacing (and making the code and generated output
slightly more efficient). In particular, fix#982.
* \hspace*, \@ifstar, \@ifnextchar, \@firstoftwo
* Support both \hspace and \hspace* (still aliasing to \kern)
using new \@ifstar
* \@ifstar is a macro using new \@ifnextchar and \@firstoftwo
(same definition as LaTeX)
* \@firstoftwo and \@ifnextchar use available MacroParser features
to act as they do in LaTeX.
* Also new method pushTokens (which I almost used but didn't end up),
and moved pushToken next to it and popToken.
* Fix flow errors; generalize MacroDefinition
* Add tests for macros
* Support Unicode Symbols
This is the third in a series of PRs to give KaTeX the ability to recognize Unicode character input. This one supports some but not all letter-like symbols and some other symbols. All the characters in this PR will produce `textord` atoms in `math` mode.
The list is not comprehensive. It’s a bit eclectic. Some of these characters are important. Others were just easy to include. A few important characters are omitted because it wasn’t clear to me which is the best way to implement them. I’ll address those characters in future PRs.
* Add comments. Remove RegEx.
* Fix omitted parens
* 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
* Change \undeertilde to \utilde
In PR #670, I made an error. The function that should have been `\utilde` I named instead `\undertilde`.
There is an `\undertilde` from the `wsuipa` package, but it is a text-mode non-stretchy function. The proper command name is `\utilde`, a math-mode, stretchy function from packge `undertilde`.
This PR fixes my error.
* Fix screenshotter test
* Support Unicode Big Operators
This is the sixth in a series of PRs to give KaTeX the ability to recognize Unicode character input.
This is the final PR in this series that will submit characters in bulk. After this, there come some characters whose alias or atom type was not obvious. I'll turn in PRs for them, too, but only after they are vetted.
* Move constants outside of main functions
* Replace ∫ with \u222b
* Add backslash
* Support Unicode Arrows
This is the second in a series of PRs to give KaTeX the ability to recognize Unicode character input.
All the characters in this PR will produce `rel` atoms.
* Support Unicode Negated Relations
This is the fifth in a series of PRs to give KaTeX the ability to recognize Unicode character input.
All the characters in this PR will produce `rel` atoms.
* Add parse tests
* Fix AMS functions
Fix a brain cramp.
* Add internal aliases to code comments
This PR implements `\mathchoice` function.
I once created PR on the wrong branch. Sorry for the mess.
This is particularly useful when one defines custom macro for "big operators".
For example:
```latex
\newcommand{\infdisj}{%
\mathop{%
\mathchoice{% display
\bigvee\hspace{-2ex}\bigvee%
}{ % inline
\bigvee\hspace{-1.75ex}\bigvee%
}{ % script
\bigvee\hspace{-1.4ex}\bigvee%
}{ % scriptscript
\bigvee\hspace{-1ex}\bigvee%
}}}
```
This is the fourth in a series of PRs to give KaTeX the ability to recognize Unicode character input.
All the characters in this PR will produce `bin` atoms.
* Implements the alignat environment for flexible math spacing
* Renames alignat[*] to alignedat and factors out duplicate code of aligned and alignedat as alignedHandler
* Adds aligned at to screenshotter
* alignedat screenshots
* Implements the alignat environment for flexible math spacing
* Renames alignat[*] to alignedat and factors out duplicate code of aligned and alignedat as alignedHandler
* Adds aligned at to screenshotter
* alignedat screenshots
* fix style nit
* fix lint
* Fix#946
Issue #946 identified a case in which `array.js` ate the final row of a well-written `aligned` environment.
This PR modifies code from PR #479 to fix this problem and to also continue to eat a trailing `\\` submitted to any environment.
* Fix bug and add tests
* Add final newline to test.
Doh!
* Port stretchy to @flow.
* Removed added quotes on object keys.
* Responded to comments.
* Stretchy: Added assertion on expected number of SVG children.
* Support Unicode relations
This is the first in a series of PRs to give KaTeX the ability to recognize Unicode character input. The code in this PR follows the style of PR #410.
All the characters in this PR will produce rel atoms. I’ll submit PRs for other atom types later.
* Fix lint error.
* Correct mapping errors
This commit fixes a brain cramp of mine.
* Change buildCommon.makeVList params to struct for better type-safety.
This is towards #939.
The expected structure of the makeVList params depends on the `positionType`
parameter. To allow this to be strictly-typed using flow, this PR combines the
co-related parameters into a single struct.
* Add type for makeVList param in comments for documentation.
* Simplify get() now that we don't need it to ignorespaces
Continuation of #912
* Remove commented-out code
* Drop get() alias, rename unget() to pushToken(), use it
* Prevent disappearing fraction lines.
Set a CSS min-height that will ensure that fraction lines will display at least one screen pixel.
Addresses issues #824 and #916.
* Change from dppx to dpi
Change the break point spec from 2dppx to 192dpi. They mean the same thing. I'm making the change because IE supports dpi but not dppx.
Fixes several issues with space handling: (fix#910)
1. "Control symbols" (as they're called in the TeXbook), such as `\\`, should
not have spaces eaten after them (only "control words" such as `\foo`).
2. In math mode, spaces should be consumed at the parser level, not the
gullet level. This enables `\\ [x]` to parse differently from `\\[x]`
3. Eat spaces between arguments, so `\frac x y` still works.
(This used to work only because math mode ate all spaces.
The analog in text mode wouldn't have worked.)
Also eat spaces in initial arguments in math mode, and before ^ and _ in atoms.
* 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.