LaTeX won't render in paragraph

Hello! Im making a bunch of math notes and Id like to be easily able to share them with classmates.

In editing mode, the LaTeX is rendered, however in reading mode it is not! Is there a work around for this?


Can you share that in a code block using backticks so that we have a better idea of what’s happening?

From the screenshot, it looks like most of it (starting from Step 1...) is indented too far (four spaces or a <tab>) and creating a code block.

I see! That does appear to be what’s happening. Is there any way to indent without creating a code block?

Problem 1:

Step 1: Simplify the denominator

$\int \frac{1}{x- \sqrt{4x} }dx = \int \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx$

Step 2: u Substitution

$u=\sqrt{ x }-2;du=\frac{1}{2\sqrt{ x }}dx$
$2du=\frac{1}{\sqrt{ x }}dx\space or \space x^{-\frac{1}{2}}dx$

$\int  \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx=2\int \frac{1}{u}du$

Step 3: Solve

$2\int \frac{1}{u}du=2\ln|u|=2\ln|\sqrt{ x }-2|$

Totally noob question! Sorry.

In Markdown, if you want to indent and maintain that indention level in Reading view/rendered contexts, you typically need to use a list. Specifically indenting sub-list items. e.g.

- one
    - two
        - three

In this case, with the math involved, it looks a bit busy (to me anyway). There are CSS options to increase the line height, etc., of lines with math in them. That could be worth exploring.

## Problem 1:

- Step 1: Simplify the denominator
     -  $\int \frac{1}{x- \sqrt{4x} }dx = \int \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx$
- Step 2: u Substitution
     - $u=\sqrt{ x }-2;du=\frac{1}{2\sqrt{ x }}dx$
     $2du=\frac{1}{\sqrt{ x }}dx\space or \space x^{-\frac{1}{2}}dx$
     $\int  \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx=2\int \frac{1}{u}du$
- Step 3: Solve
    -  $2\int \frac{1}{u}du=2\ln|u|=2\ln|\sqrt{ x }-2|$

or

## Problem 1:

- Step 1: Simplify the denominator
     - $\int \frac{1}{x- \sqrt{4x} }dx = \int \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx$
- Step 2: u Substitution
     - $u=\sqrt{ x }-2;du=\frac{1}{2\sqrt{ x }}dx$
     - $2du=\frac{1}{\sqrt{ x }}dx\space or \space x^{-\frac{1}{2}}dx$
     - $\int  \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx=2\int \frac{1}{u}du$
- Step 3: Solve
    -  $2\int \frac{1}{u}du=2\ln|u|=2\ln|\sqrt{ x }-2|$

Live Preview | Reading view


I’ve seen some people use callouts to display and break apart equations in their notes, but that’s extra work (wrapping the equation in the callout) and maybe not what you are looking for.

> [!example]- Step 1: Simplify the denominator
> $\int \frac{1}{x- \sqrt{4x} }dx = \int \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx$

> [!example]- Step 2: u Substitution 
> $u=\sqrt{ x }-2;du=\frac{1}{2\sqrt{ x }}dx$
> $2du=\frac{1}{\sqrt{ x }}dx\space or \space x^{-\frac{1}{2}}dx$
> $\int  \frac{1}{(\sqrt{ x }-2)\sqrt{ x }}dx=2\int \frac{1}{u}du$

CleanShot 2024-09-22 at 15.06.26

Hopefully others have some tips or ideas on formatting math notes.


Some Markdown Resources to check out when you have time:

1 Like

Here’s a first pass, proof of concept, at increasing the line-height of mathjax in list items. A bit more breathing room. Not perfect and no guarantee it won’t break your air-conditioner or home wi-fi, etc.

.markdown-source-view .cm-line.HyperMD-list-line:has(mjx-container),
.markdown-rendered ul.has-list-bullet:has(mjx-container) {
    line-height: 2.5em;
}


https://help.obsidian.md/Extending+Obsidian/CSS+snippets if needed.

1 Like

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