New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Horizontal spacing commands: \>, \hfill #164
Comments
We currently support: We're missing: Notes:
Reference: http://tex.stackexchange.com/questions/74353/what-commands-are-there-for-horizontal-spacing |
\thinspace
should produce the correct amount of space
The way I see it, |
I guess we'd have to. Should probably have a |
Nah, we shouldn't do this in the lexer, but on the token stream. That's what TeX does, as far as I understand things. |
That could work to. It seems like using a regex directly on the input stream would be easier as opposed to having to concatenate tokens would be trickier. I know there's code there that does this already, but it relies on a hard stop which we wouldn't have in this situation. |
I think a length would be finished after its two letter unit has been parsed. But I'd have to read The TeX Book to verify this first. |
For sure, it's a little trickier than checking for a |
True, but it has the benefit of working even if there is some macro expansion involved in the length notation. |
Any update on that? It seems that |
@michaelcadilhac we do have macros now, and we do support |
@kevinbarabash certainly, hence why not hspace? |
@michaelcadilhac just haven't gotten it, mainly busy with other stuff and there's a pile of almost-there PRs that I should finish first. PRs are welcome though. |
Is there a difference between |
OK, so here's the difference: Incidentally, most other commands listed above work fine in KaTeX, including the very useful |
|
oh, waiting is hard... :-) |
@Casyfill If you want We're also working on unit support on #732, which is still a work in progress, and has some discussion about best way to do it -- feel free to join in. |
* Add \smash, laps, spaces, and phantoms 1. Support `\smash`, including the optional argument from AMS. 2. Change `\llap` and `\rlap` so that they render in text style. Repeat: This *changes* KaTeX behavior. 3. Add `\mathllap` and `\mathrlap`. These will act as they do in `mathtools` and as in previous KaTeX versions of `\llap` and `\rlap`. 4. Add `\mathclap` and `\clap`. 5. Add `\hphantom` and \vphantom`. 6. Add `\thinspace`, `\medspace`, `\thickspace` 7. Add `\hspace`. This work will resolve issue #270 and parts of #50 and #164. A. Perlis has written a [concise description](https://www.math.lsu.edu/~aperlis/publications/mathclap/perlis_mathclap_24Jun2003.pdf) of items 1 thru 5. Except for `\smash`'s optional argument. It's described in the [AMS User's Guide](http://texdoc.net/texmf-dist/doc/latex/amsmath/amsldoc.pdf). Item 6 also comes from the AMS User's Guide. * Fix test spec * Exploit makeVList for smash * update smash and phantom screenshots for chrome * Pick up review comments * Change test from \llap to \mathlap \llap is fundamentally a text-mode function. We should not expect it to work correctly when given math-mode arguments. So test \mathllap instead. * Correct \llap macro A correction. The previous macro returned an error if given an argument with math-mode content, such as x^2. The corrected macro will not return an error. It will instead return well rendered math, but letters are in `\mathrm` font. * update \llap, \rlap, \clap macros to use \textrm * update Lap screenshots
The two remaining commands are |
To clarify, #833 added basic support for |
Closing this in favour of #990 since all horizontal spacing commands other than |
We have some spacing commands, but it appears we missed one. There might be more that we missed.
The text was updated successfully, but these errors were encountered: