From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [bug][ox-latex] Captions in equations Date: Sun, 19 Jan 2014 15:19:40 +0100 Message-ID: <87sisk835v.fsf@gmx.us> References: <87txd16q0s.fsf@gmx.us> <20140119032333.GF898@smoon> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48802) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4tAO-0001zc-UT for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 09:16:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W4tAG-0001Nx-I1 for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 09:16:00 -0500 Received: from plane.gmane.org ([80.91.229.3]:44485) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W4tAG-0001Nt-An for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 09:15:52 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1W4tAA-0000MR-Uy for emacs-orgmode@gnu.org; Sun, 19 Jan 2014 15:15:46 +0100 Received: from 109.201.154.152 ([109.201.154.152]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Jan 2014 15:15:46 +0100 Received: from rasmus by 109.201.154.152 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 19 Jan 2014 15:15:46 +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 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} > >> But an equation cannot have a caption. > >> I'm not sure what the desired behavior is. (i) To silently drop the >> caption, (ii) to wrap the equation in some sort of float and give it a >> caption; or (iii) to print the text sans the \caption{·}. > >> (iii) can be archived with math-prefix. (ii) is a bit weird, but >> could be archived relatively easy, but it's not really what one would >> expect; it's consistent with how captions work for tables (turned into >> a float when a caption is present). (i) is also a bit weird, but >> seems the most reasonable to me. > >> Since I don't know what the correct behavior is, I don't have a patch >> right now. > > IMHO, this is wrong approach. I don't understand. > 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. –Rasmus -- Summon the Mothership!