emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] BUG: preview latex with split environment


From: Andreas Leha
Subject: Re: [O] BUG: preview latex with split environment
Date: Tue, 28 Oct 2014 17:42:24 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (darwin)

Rasmus <address@hidden> writes:
> Andreas Leha <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]