DEV Community

nullity
nullity

Posted on • Edited 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:

Sonar image

Explore the coding personalities of leading LLMs

Understanding the unique coding "personality" of each LLM—where it excels and where it's likely to make mistakes—is key to generating code safely and securely. Check out this deep-dive study on GPT-4o, Claude, Llama, and more to see how you can use AI responsibly in your dev workflow.

Learn more

Top comments (0)

Hosting.com image

Your next WordPress project? Deployed for $1.

This Black Friday, hosting.com powered by Rocket.net gives you fully Managed WordPress Hosting for just $1 in your first month.
No setup headaches. No caching chaos. Just pure speed with Cloudflare Enterprise CDN, advanced security, and automatic updates.

Whether it is a side project or your next client build, you will be live in minutes. Grab the $1 deal and start building.

Learn more