Re: [O] Is `org-preview-latex-fragment` sensitive to alignment specified by document class options?

2014-04-17 Thread Bastien
Hi Rob,

Rob Stewart robstewar...@gmail.com writes:

 So, is there a way to make `org-preview-latex-fragment` sensitive to
 LaTeX class options?

Normally it should be.  What version of Emacs and Org are you using?

M-x emacs-version RET
M-x org-version RET

Also, maybe have a look at `org-format-latex-header' and see if there
are no conflicting options there.  Previewing combines the in-buffer
LaTeX options with those.

Best,

-- 
 Bastien



[O] Is `org-preview-latex-fragment` sensitive to alignment specified by document class options?

2014-04-06 Thread Rob Stewart
Hi,

Is there a way to make `org-preview-latex-fragment` sensitive to LaTeX
class options? I have a simple example to demonstrate where it does
not:

%%%
#+LaTeX_CLASS: article
#+LaTeX_CLASS_OPTIONS: [fleqn]
#+LATEX_HEADER: \usepackage{amsmath}

\begin{gather}
b := (a \oplus s_1) \oplus s_2 \\
e := 0 \\
\end{gather}
%%%

If LaTeX is generated for this document with
`org-latex-export-to-latex`, which is compiled to a PDF with pdflatex,
the b := and the e := are left aligned i.e. the b and e are
vertically aligned.

However, if `org-preview-latex-fragment` is called within emacs, the
left alignment specified with the `[fleqn]` class option is not
honoured. Thus, the two lines in the `gather` block are centrally
aligned, which is the default case for `gather` blocks.

This is a screenshot of the PDF: http://imgur.com/YVRAlYP
This is a screenshot of the preview within emacs: http://imgur.com/S6BNm0K

So, is there a way to make `org-preview-latex-fragment` sensitive to
LaTeX class options?

Thanks,

--
Rob