Skip to content
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

No autoformat for math #1339

Closed
dcfreire opened this issue Oct 28, 2020 · 8 comments
Closed

No autoformat for math #1339

dcfreire opened this issue Oct 28, 2020 · 8 comments

Comments

@dcfreire
Copy link

Inserting inline math does not have autoformat syntax. In most markdown editors and also latex, inline math is added using $someexpression$. It would be great if we could write math expressions by using dollar signs, seeing as it is so common that most will type math in this format by reflex, I assume.
Also in this topic, math-blocks would be great.

@zadam
Copy link
Owner

zadam commented Oct 28, 2020

Hi, I created an issue for this in the relevant library: isaul32/ckeditor5-math#11

As a sort of similar work flow you can use CTRL-M shortcut to show the math dialog.

Also in this topic, math-blocks would be great.

Do you mean this?

That's controlled with "Display mode" in the dialog ...

@dcfreire
Copy link
Author

dcfreire commented Oct 28, 2020

That is what I mean, yes. But I think math-blocks need to have a bigger input box than inline math.
image
As you can see, it can get pretty crowded, even when doing something simple. I'm also not able to break lines, so it gets pretty difficult to read.

Should this issue be opened on the ckeditor math repo too?

@zadam
Copy link
Owner

zadam commented Oct 28, 2020

Ok, yeah, that would make sense.

Yes, this would have to be implemented in ckeditor5-math so I think it makes sense to open an issue there as well.

@dcfreire
Copy link
Author

dcfreire commented Oct 29, 2020

There was already a similar issue there, so I just replied to it.

@martinkoutecky
Copy link

@zadam @funnisquares I have a similar request so let me hijack this thread... ZIM desktop wiki has an autoformat feature where automatically upon writing e.g. \alpha or \le plus space, it replaces them with the corresponding UTF-8 symbols α and ≤.

I like this feature very much (while keeping the option of writing "real" math by pressing Ctrl-M or, ideally, between dollar signs). It seems that it might not be that hard extending ckeditor in this way (creating a custom inline autoformatter). What would be the best way to go about having this functionality in Trilium?

@zadam
Copy link
Owner

zadam commented Feb 24, 2021

@martinkoutecky best way would be probably to open a PR in ckeditor5-math repo ...

@grissiom
Copy link

grissiom commented Jul 5, 2021

@zadam , ck-math has added this feature in 23.3.0 (isaul32/ckeditor5-math#11 , https://github.com/isaul32/ckeditor5-math#display-mode), but the autoformat feature is still not ready in trilium-0.47.5 . Maybe we need some configuration for ck-math?

@zadam zadam closed this as completed in 65938c5 Jul 5, 2021
@zadam
Copy link
Owner

zadam commented Jul 5, 2021

Hi, you're right, extra plugin needed to be enabled. Will be in the next release. Thanks for the heads up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants