In a general tex-file, one can easily define a new command, for my case, let me take this as an example:
To put this code in header
\newcommand{\dd}{\,\mathrm{d}}
I can use the shorter command to make the longer command work; it's good to do this, I also can compile org-file into tex if this command is added in header. However the preview C-c-x-l
fails to recognize \dd
even if this new command have been defined in header.
I think we can add some code in org package to make this work, right? how can I do this? I want to make preview C-c-xl
recognize \dd
as \mathrm{d}
.
Update
Let me expound my question.
I hope we can amend or add some codes in ~/org path/lisp/org-latex.el
to make preview
recognize \dd
as \,\matherm{d}
in every org-file.
The way @pmr posed works in each org-file which added that code by hand. I expect we can make this as default and needn't to add such code every time.