From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vladimir Lomov Subject: Re: [bug][ox-latex] Captions in equations Date: Mon, 20 Jan 2014 09:51:47 +0900 Message-ID: <20140120005147.GI898@smoon> References: <87txd16q0s.fsf@gmx.us> <20140119032333.GF898@smoon> <87sisk835v.fsf@gmx.us> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="iFRdW5/EC4oqxDHL" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33585) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W535r-00084a-4R for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 19:52:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W535m-0006Xh-6P for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 19:51:59 -0500 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:41782) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W535l-0006XR-Ir for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 19:51:54 -0500 Received: by mail-lb0-f178.google.com with SMTP id u14so4440610lbd.37 for ; Sun, 19 Jan 2014 16:51:52 -0800 (PST) Received: from smoon ([5.254.241.227]) by mx.google.com with ESMTPSA id wt2sm4150876lbb.2.2014.01.19.16.51.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 19 Jan 2014 16:51:50 -0800 (PST) Content-Disposition: inline In-Reply-To: <87sisk835v.fsf@gmx.us> 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 --iFRdW5/EC4oqxDHL Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hello, ** Rasmus [2014-01-19 15:19:40 +0100]: > Vladimir Lomov writes: >> Hello, >> ** Rasmus [2014-01-18 20:36:35 +0100]: >>> Hi, >>> This example produces invalid LaTeX code: >>> #+CAPTION: test >>> #+ATTR_LATEX: :mode math :environment pmatrix >>> | \alpha | \beta | \gamma | >>> Namely, >>> \begin{equation} >>> \caption{test text} >>> \mathbf{H}=\begin{pmatrix} >>> \vdots & 0 & \vdots \\ >>> \vdots & H & \vdots \\ >>> \vdots & 0 & \vdots \\ >>> \end{pmatrix}. >>> \end{equation} [...] >> IMHO, this is wrong approach. > I don't understand. As I said, this is IMHO. >> I would consider this example as a special way to generate a matrix >> when exporting to LaTeX, then CAPTION is useless here. Also, HTML >> export will give differently looking result. > But it shouldn't. It should produce a matrix as well, e.g. via > MathJax. At first, I wanted to write the following: And would will be if one doesn't use MathJax? For example, I prefer to use dvipng to generate PNG images (there are several reasons for this). So, basically, this is a special case, and an user evidently knows about this. But then I tried to export this example document to HTML with MathJax and it fails. Consider these two examples: 'ex-tbl.org' and 'ex-tbl2.org' (attached to the message). After exporting first to html I get 'ex-tbl.html' without MathJax, the second has MathJax but only for formula. As I expected, problem occurs only for LaTeX export, due to a bit weird combination. I'm not a mathematician but I read many books on mathematics and theoretical physics (I'm a physicist) and don't remember examples of use an equation with a caption. Equation enclosed into a frame, yes, I see and use that, numbered or tagged equations, even placed into a float (though didn't try yet). Again, this was my IMHO. And I can't imagine situation when I would need a caption for equation, because there are other ways to emphasize an equation. What I see from this special example is how it is convenient to create a matrix for "math mode" in Org document. > –Rasmus --- WBR, Vladimir Lomov -- Monotheism is a gift from the gods. --iFRdW5/EC4oqxDHL Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename="ex-tbl.org" Content-Transfer-Encoding: quoted-printable #+CAPTION: test=0A#+ATTR_LATEX: :mode math :environment pmatrix=0A| \alpha = | \beta | \gamma |=0A=0A* COMMENT=0A=0ALocal Variables:=0Afill-column: 96= =0AEnd:=0A --iFRdW5/EC4oqxDHL Content-Type: application/vnd.lotus-organizer Content-Disposition: attachment; filename="ex-tbl2.org" Content-Transfer-Encoding: quoted-printable #+CAPTION: test=0A#+ATTR_LATEX: :mode math :environment pmatrix=0A| \alpha = | \beta | \gamma |=0A=0AThis is the Euler formula \(\exp^{\imath\phi}=3D\co= s{\phi}+\imath\sin{\phi}\).=0A=0A* COMMENT=0A=0ALocal Variables:=0Afill-col= umn: 96=0AEnd:=0A --iFRdW5/EC4oqxDHL Content-Type: text/html; charset=utf-8 Content-Disposition: attachment; filename="ex-tbl.html" Content-Transfer-Encoding: 8bit ex-tbl

ex-tbl

Table 1: test
α β γ

Author: Vladimir Lomov

Created: 2014-01-20 Пн 09:38

Emacs 24.3.50.1 (Org mode 8.2.5d)

Validate

--iFRdW5/EC4oqxDHL Content-Type: text/html; charset=utf-8 Content-Disposition: attachment; filename="ex-tbl2.html" Content-Transfer-Encoding: 8bit ex-tbl2

ex-tbl2

Table 1: test
α β γ

This is the Euler formula \(\exp^{\imath\phi}=\cos{\phi}+\imath\sin{\phi}\).

Author: Vladimir Lomov

Created: 2014-01-20 Пн 09:40

Emacs 24.3.50.1 (Org mode 8.2.5d)

Validate

--iFRdW5/EC4oqxDHL--