Math note more than 1 line?

What I’m trying to do

I am currently using obsidian for all of my note taking for school. When using it for maths, it tends to put everything on 1 line, where i have to scroll from left to right. Is there a way that it can be on multiple lines? like a code block? So that i can see the whole equation that i am typing instead of needing to scroll all of the time

Things I have tried

searched the settings, didnt find it, came here to ask question.

You could do it with this CSS snippet (how to use snippets):

mjx-container > mjx-math {
	display: contents;
}

.math-block	> mjx-container > mjx-math > * {
	padding-bottom: 1em;
}

That lets long lines wrap for both inline (single $) and block (double $$) MathJax.

2 Likes

is it possible to make it so that it warps when a => or a → is used? because now it warps in the middle of an equation

Sorry, I don’t know how to do that.

If I wanted to limit my line breaks to occur at a specific character like you’re saying, then I would start a new math block at that point?

For regular lines of text, this would usually be a simple matter of mjx-container > mjx-math { text-wrap-mode: wrap; } with maybe a type of wrap. But for these Mathjax lines, they’re not words, and just about every character is in it’s own tag.

Hopefully someone else knows another way. Good luck.

alright, i will try some stuff then, thankssssssss

1 Like