Latex Equations Not Fitting within Reading View Container

Things I have tried

For some reason my Latex equations are not rendering within the reading container appropriately. This has not happened prior as it seemed they would auto size to fit the container.

Anyone have experience dealing with this issue?

Things I can do to circumvent the issue:

  1. Turn off readable line length
  2. use \small for the text of the Latex equation
  3. I tried to break some equations into new lines using {aligned} arguments but it doesn’t produce the result I want for a chemical equation because it aligns the new equations to the right.

What I’m trying to do

  1. Make my latex equations fit the reading container.
  2. Get \ new lines utilizing the {aligned} argument in latex left justified

Obsidian is not handling long equations very well by default. What you can do is adding a snippet to make the long equations scroll horizontally:

/* Scrolling long equations */
.math-block {
	padding: 0px;
	overflow-x: auto;

Together with the plugin “Hider” you can hide the scrollbars.

Secondly it is a good practice to break long equations with for example {aligned} or {gathered}. I don’t know how to do it properly with chemical equations, but here is an example:

& \text{Word A} \xrightarrow{\text{Some text to make a long arrow}} \\
& \qquad \text{Word A} \xrightarrow{\text{Some text to make a long arrow}} \\
& \qquad \qquad \text{Word A} \xrightarrow{\text{Some text to make a long arrow}} \\
& \qquad \qquad \qquad \text{Word A} \xrightarrow{\text{Some text to make a long arrow}}
1 Like

Hi Jay,

Thanks for the response.

I will go ahead and add that snippet to my library of them (which is ever growing).

I also like the splitting into multiple lines. With CE it seems that they like to left justify so i’ll have to find a way around that.

Appreciate the response!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.