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

[Improvement] Multiline maths support and better editing interface (KaTeX) #2088

Closed
aaronshenhao opened this issue Jul 28, 2021 · 12 comments
Closed

Comments

@aaronshenhao
Copy link

aaronshenhao commented Jul 28, 2021

Please refer to main issue thread in the ckeditor5-math repository: Edit window too small #10


The current math input box is too small and does not allow multiline equations like in Joplin. I haven't been successful in writing a multiline aligned equation (is begin{align} not supported?).

I think the best interface for writing TeX equations is the traditional vertically split interface with the code on the left and the output on the right, perhaps with the whole thing stacked under the bottom quarter to half of the screen (resizable, with possibility of being maximized).

Sidenote: Mathquill integration would be cool, perhaps as a shortcut for writing complex expressions.

@aaronshenhao aaronshenhao changed the title Multiline maths support and better editing interface (KaTeX) [Improvement] Multiline maths support and better editing interface (KaTeX) Jul 28, 2021
@abitofevrything
Copy link
Contributor

Hi,
This is an issue with the math plugin used in Trilium and there is already an issue open over there. If you want to change the layout, you would have to submit an issue or PR over there.

@aaronshenhao
Copy link
Author

aaronshenhao commented Jul 28, 2021

Thanks for the link. Glad to know it's been brought up already. I searched for math, katex, latex, tex but it didn't show up. Should I close this issue?

@Mirwaisse
Copy link
Contributor

Mirwaisse commented Jul 28, 2021

To write multiline aligned equation, my workaround is to use on a second line \phantom{left part of the equation}.

For example, to get:
image

I would write:
\frac{dE}{dw_0} = -\frac 1 m \sum_{i=0}^m (y_i - \operatorname{sigmoid}(w_0+w_1x_{1,i}+w_2x_{2,i}))

and then in a second equation box:
\phantom{\frac{dE}{dw_0}} = -\frac 1 m \sum_{i=0}^m (y_i - \hat y_i)

@abitofevrything
Copy link
Contributor

@aaronshenhao you could close this issue since it is already present upstream, but then it technically isn't resolved so you might want to keep it open. Up to you.

@aaronshenhao
Copy link
Author

@abitofevrything Thanks, I'll keep it open since I think the other issue is hard to find. I'll link it at the top of the thread.

@aaronshenhao
Copy link
Author

aaronshenhao commented Jul 28, 2021

Oddly enough, someone seems to have successfully used multiline align in that thread (link). Different version?

@abitofevrything
Copy link
Contributor

They achieved this by using a phantom block, which isn't the cleanest way of doing it (a phantom block simply doesn't render it's content, but applies spacing).

As for begin{align}, I haven't tested so I am not sure if it is supported.

@Mirwaisse
Copy link
Contributor

Mirwaisse commented Jul 29, 2021

Wait, actually I have used multiline equation in the past like that:
image
f'(x) = \begin{Bmatrix} 1 & x>0 \\ 0 & x<0 \end{Bmatrix}

Oddly enough, someone seems to have successfully used multiline align in that thread (link). Different version?

They used \begin{aligned} in that thread and not \begin{align}

@aaronshenhao
Copy link
Author

They used \begin{aligned} in that thread and not \begin{align}

Oh, that makes sense since its in math mode. I must have used the wrong one.

@gp-fault
Copy link

gp-fault commented Nov 6, 2022

Any further ideas how to integrate MathQuill? That would be super cool!

@Nyxiad
Copy link

Nyxiad commented Jul 12, 2023

I'm going to make a separate issue regarding MathQuill

@meichthys
Copy link
Collaborator

Trilium has entered maintenance mode. Future enhancements will be addressed in TrilumNext: TriliumNext#73

@meichthys meichthys closed this as not planned Won't fix, can't repro, duplicate, stale May 9, 2024
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

6 participants