DEV Community

nullity
nullity

Posted on • Updated on

Make math equations in Obidian bigger

I find that math equations in Obsidian are too small to see clearly.

Here are the solutions,

Change \frac to \dfrac

"d" means "display"

This is a inline fraction $\frac{x^2-3x+2}{x^2-1}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

This is a inline fraction $\dfrac{x^2-3x+2}{x^2-1}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

Change \binom to \dbinom

This is a inline binomial $\binom{n}{m}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

This is a inline binomial $\dbinom{n}{m}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

General method (applicable to all functions)

Just add \displaystyle to the front of each function

note: it's also ok to add \displaystyle to \frac or \binom.
The effect of \displaystyle\frac equals to \drac
The effect of \displaystyle\binom equals to \dbinom

1.

This is a inline sum $\sum_{k=1}^n \frac{1}{k+\frac{1}{k + \frac{1}{k}}}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

  1. Add \displaystyle before \sum
This is a inline sum $\displaystyle \sum_{k=1}^n \frac{1}{k+\frac{1}{k + \frac{1}{k}}}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

  1. Add \displaystyle before \sum and change each \frac to dfrac
This is a inline sum $\displaystyle\sum_{k=1}^n \dfrac{1}{k+\dfrac{1}{k + \dfrac{1}{k}}}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

Edit CSS snippet

mjx-math {
  font-size: 140% !important;
}
Enter fullscreen mode Exit fullscreen mode

Make it even bigger

Use \Huge, \huge, \LARGE, \Large or \large in front of the function that you want to enlarge.

This is a inline binomial $\huge \dbinom{n}{m}$ in the middle
Enter fullscreen mode Exit fullscreen mode

Image description

Note:
Obsidian use MathJax to display math equations.
You can see MathJax - Supported TeX/LaTeX commands for more information.

Katex's syntax is very similar, the above methods apply to Katex too.

ref:

Top comments (0)