Just adding some more information. It gets curiouser and curiouser...
Myles English writes: > Hi, > > I have just pulled from git and have been migrating to use the new > exporter. > > I have a problem where org-preview-latex-fragment appears not to use a > style file the latex header. > > Starting emacs like this: > > emacs -Q -l ~/minimal.el ~/file.org > > When I export the whole buffer to pdf it looks right. > > When I call org-preview-latex-fragment on the fragment the definitions > in a.sty are not picked up. This previously worked when using the > new exporter before it was merged. > > Can anyone help? > > Thanks, > Myles > > > ---------------------------------- ~/bug.sty -------------- > \newcommand{\mysymbol}{\mathbf v} > > ---------------------------------- minimal.el ------------ > (add-to-list 'load-path "~/.emacs.d/plugins/org-mode/lisp") > (require 'ox) > > ---------------------------------- file.org --------------- > #+STARTUP: indent > #+LATEX_HEADER: \usepackage{~/bug} > > * heading > > \[ \mysymbol = f \] -- NO WORK > > \[ 0 = f \] -- WORKS \[ \dfrac{\partial a}{\partial b} \] -- The fragment is perfect, showing it as da/db but the pdf file shows it as dadb instead. Another strange thing is that if the \[\] is the last thing in the file apart from some empty lines then org will fold at the end of it i.e. I see \[\]... > > ---------------------------------------------------------- Myles