# $\mathscr{..}$ Expressions Fail to Render Properly in Org-Mode

Consider the expression \mathscr{APPLE}. This should render as follows:

Yet in org-mode (using latex fragment previews), it renders as:

Moreover, when exporting, matscr renders properly in HTML (when viewed in a browser), but does not render properly when exporting to pdf! How does one fix this behavior?

EDIT: Certain unicode characters also fail to render properly. For example $\phi$ renders fine but $ϕ$ does not render fine. I hope these errors are related so that fixing one fixes the other.

EDIT2: I get the following error message when using the settings suggested by Omar: link.

EDIT3: The more specific error I'm getting (after checking *Org Preview LaTeX Output* buffer is:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! Fatal fontspec error: "cannot-use-pdftex"
!
! The fontspec package requires either XeTeX or LuaTeX.
!
! You must change your typesetting engine to, e.g., "xelatex" or
! "lualatex"instead of plain "latex" or "pdflatex".
!
! See the fontspec documentation for further information.
!
! For immediate help type H <return>.
!...............................................
• Re: Edit2 error: have you installed dvisvgm? – NickD Aug 27 '18 at 1:44
• Org depends on external facilities to do all this. You seem to expect to be able to customize org-mode and solve all the problems. That is not the case: you have to install all the external tools that are needed AND customize org-mode to use them. Just setting your expectations here. – NickD Aug 27 '18 at 1:47
• @NickD: Yes, dvisvgm is installed. – George Aug 27 '18 at 2:48
• There are two separate questions here which need separate answers: (a) rendering of mathscr (b) use of unicode-math. Omar's answer works for the first case in a standard set-up. The solution to (b) is more involved and less clear. – Andrew Swann Aug 29 '18 at 8:08
• @George After EDIT3, I think you misunderstood what you were supposed to do with the '(org-preview-latex-process-alist (quote ...)). That's a fragment of a custom-set-variables form, so you need to wrap it like so: (custom-set-variables '(org-preview-latex-process-alist (quote ...))). – Omar Aug 29 '18 at 14:25