From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Leha Subject: Re: BUG: preview latex with split environment Date: Tue, 28 Oct 2014 17:42:24 +0000 Message-ID: References: <87oaswgqvc.fsf@gmx.us> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48122) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjAo1-00008V-9r for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 13:43:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XjAnw-0006H8-Ee for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 13:43:41 -0400 Received: from plane.gmane.org ([80.91.229.3]:59182) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XjAnw-0006H2-7i for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 13:43:36 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XjAnQ-0006wa-6K for emacs-orgmode@gnu.org; Tue, 28 Oct 2014 18:43:04 +0100 Received: from 193.63.222.28 ([193.63.222.28]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 18:43:04 +0100 Received: from andreas.leha by 193.63.222.28 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Oct 2014 18:43:04 +0100 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 Rasmus writes: > Andreas Leha writes: > >> Hi all, >> >> I encounter a BUG with org-toggle-latex-fragment on an equation that >> uses amsmath's split environment. >> >> The problem is that the \begin{equation},\end{equation} get stripped of >> the temporary tex file. > > I can't reproduce using your document from emacs -q. > (org-version) => "8.3beta" updated today. It seems I can. I just pulled the master branch (Org-mode version 8.3beta (release_8.3beta-517-g86d1a7)) I start emacs -Q -l emacs.minimal where emacs.minimal is --8<---------------cut here---------------start------------->8--- (add-to-list 'load-path (expand-file-name "~/local/emacs/org-mode-install/lisp")) (add-to-list 'auto-mode-alist '("\\.\\(org\\ |org_archive\\|txt\\)$" . org-mode)) (setq org-agenda-files '("/tmp/test.org")) ;;(require 'org-install) ;;(require 'org-habit) (add-to-list 'load-path (expand-file-name "~/local/emacs/org-mode/contrib/lisp")) (global-set-key "\C-ca" 'org-agenda) (org-babel-do-load-languages 'org-babel-load-languages '((R . t) (latex . t) (emacs-lisp . t) (sh . t))) --8<---------------cut here---------------end--------------->8--- I open this file: --8<---------------cut here---------------start------------->8--- #+TITLE: Test amsmath's split * Some equation with some split expression, e.g. \begin{equation} \begin{split} w \cdot x + b &= 1, \text{ and}\\ w \cdot x + b &= -1 \end{split} \end{equation} To reproduce try to org-toggle-latex-fragment (C-c C-x C-l) on that latex expression. Export of this works fine. --8<---------------cut here---------------end--------------->8--- I try to preview my equation and get this tex: --8<---------------cut here---------------start------------->8--- \documentclass{article} \usepackage[usenames]{color} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} % Package fixltx2e omitted \usepackage{graphicx} % Package longtable omitted % Package float omitted % Package wrapfig omitted % Package rotating omitted \usepackage[normalem]{ulem} \usepackage{amsmath} \usepackage{textcomp} \usepackage{marvosym} \usepackage{wasysym} \usepackage{amssymb} % Package capt-of omitted % Package hyperref omitted \tolerance=1000 \pagestyle{empty} % do not remove % The settings below are copied from fullpage.sty \setlength{\textwidth}{\paperwidth} \addtolength{\textwidth}{-3cm} \setlength{\oddsidemargin}{1.5cm} \addtolength{\oddsidemargin}{-2.54cm} \setlength{\evensidemargin}{\oddsidemargin} \setlength{\textheight}{\paperheight} \addtolength{\textheight}{-\headheight} \addtolength{\textheight}{-\headsep} \addtolength{\textheight}{-\footskip} \addtolength{\textheight}{-3cm} \setlength{\topmargin}{1.5cm} \addtolength{\topmargin}{-2.54cm} \begin{document} \begin{split} w \cdot x + b &= 1, \text{ and}\\ w \cdot x + b &= -1 \end{split} \end{document} --8<---------------cut here---------------end--------------->8--- What do I miss here? Regards, Andreas