Conversation
cursor in front of bin fixed
|
@daniel3735928559 in general we try to avoid non-standard commands. That being said, being able to use KaTeX for editing would be immensely useful. I think having some sort of plugin system would be nice, but I think we'd want to work on defining a display agnostic layout data structure first. This change would break plugins if they were using the existing system. I'm going to leave this open for now as a reference how to do cursors and as a reminder that people will find a plugin system useful. |
|
When devising a plugin system, please keep the render-to-canvas from #251 in mind as well as the #376 intermediate representation it motivated (and which you probably meant by “display agnostic layout data structure”). Do you want to open a ticket to discuss requirements for a plugin system, @kevinbarabash? |
|
Blocked on #762. |
|
I think this could be done in a similar way to how #1074 implements |
|
@daniel3735928559 sorry for letting this sit in limbo for so long. If you're still interested in adding this feature, it's probably best to wait until #1074 lands before reworking things. |
|
I am indeed still interested! I haven't looked at that PR yet in depth; while a compile-time plugin system still requires me to retain a KaTeX source module (and could in principle lead to a bunch of out-of-date such modules in the wild, especially if a plugin is very widely used like If this is the way forward then I can update this PR when it is ready. |
|
I'm going to close this for now since #1074 has been closed. I think we'll probably start looking at how to support a plugin architecture after the 1.0 release. |
Going back to #358, this adds a
\cursorcommand with an optional shift argument, and an argument for height (the same arguments as the\rulecommand, but without width). I needed this for a WYSIWYG mathematics editor project guppy (see also demo).The original idea was to try to mess with
\kernand\ruleand similar to get the desired result of a vertical line that is 1 pixel thick and doesn't affect the appearance/spacing/etc. of the surrounding equation wherever it is inserted. But part of the trouble seems to be that\rulegets a.mordclass which may affect the spacing between elements if, for example, it is between a.mbinelement and a.mordelement. So I ended up creating a separate command for this purpose.Since this is not a command from standard LaTeX, I am not sure what the policy is on actually including this, but I wanted to at least document how it could be done (and/or find out if there is a better way), in case anyone else also wants this. If there is appetite for including it, I am happy to go through the rest of the proper procedure (squashing commits, maybe adding tests, etc.) also.
If it is best not to have it in the actual repo, I would be interested in some mechanism by which this could be made into a plugin, (since as it is, I end up needing to constantly merge in updates to KaTeX to my repository, whereas if I could just pull in the latest version and have the separate plugin, this might be simplified).