I am tired of writing \frac{\partial something}{\partial something_else}. Can I automate it by defining some sort of shortcut to it, so that when I write \p(x)(y) it will transform to \frac{\partial x}{\partial y}?
|
|
||||
|
|||
|
|
|
The ability to define complex macros is one of the strengths of LaTeX. The traditional LaTeX way would be to use
to your preamble. Since this new macro is requires mathmode, you may also want to wrap the macro in an
If you really want
to your preamble. This isn't particularly robust in that something like One final note is that it is probably better to use a slightly longer and more descriptive names for macros. While |
|||||||||||
|
|
The |
|||||||
|
`to mark your inline code as I did in my edit. – egreg Jan 7 at 11:52