From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Stewart Subject: Is `org-preview-latex-fragment` sensitive to alignment specified by document class options? Date: Sun, 6 Apr 2014 21:54:52 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34573) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWu60-0006DF-1g for emacs-orgmode@gnu.org; Sun, 06 Apr 2014 16:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WWu5z-0000Ws-1o for emacs-orgmode@gnu.org; Sun, 06 Apr 2014 16:55:15 -0400 Received: from mail-pb0-x233.google.com ([2607:f8b0:400e:c01::233]:39394) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WWu5y-0000Vh-RZ for emacs-orgmode@gnu.org; Sun, 06 Apr 2014 16:55:14 -0400 Received: by mail-pb0-f51.google.com with SMTP id uo5so5756637pbc.24 for ; Sun, 06 Apr 2014 13:55:13 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org 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