artisticat1 / obsidian-latex-suite

Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
MIT License
1.4k stars 56 forks source link

[FEATURE] Higher order partial derivatves #329

Open K4LCIFER opened 2 months ago

K4LCIFER commented 2 months ago

Description of the Problem

Currently, there is only a snippet for lower order partial derivatives. through pa[A-Za-Z][A-Za-z], or par, which will create something like \frac{\partial f}{\partial x}, but there's no option for a higher order partial derivative like \frac{\partial^2f}{\partial x^2}

Description of the Solution

It would be good to have a snippet for a higher order partial derivative.

Additional

Perhaps something like pa[0-9][A-Za-z][A-Za-z]?

nonrice commented 1 month ago

You can accomplish this by adding a custom snippet. I used this:

{trigger: "par", replacement: "\\frac{ \\partial^{${0:}} ${1:y} }{ \\partial ${2:x}^{$0}}", options: "m"},

Example:

$$ \frac{ \partial^{2} f }{ \partial x^{2}} $$

Would be partab2tabftabx