From: Rasmus <rasmus@gmx.us>
To: n.goaziou@gmail.com
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug][ox-latex] Captions in equations
Date: Sun, 19 Jan 2014 15:14:56 +0100 [thread overview]
Message-ID: <87zjms83dr.fsf@gmx.us> (raw)
In-Reply-To: <87iotg1ffu.fsf@gmail.com> (Nicolas Goaziou's message of "Sun, 19 Jan 2014 10:36:21 +0100")
[-- Attachment #1: Type: text/plain, Size: 2391 bytes --]
Nicolas Goaziou <n.goaziou@gmail.com> writes:
> Hello,
>
> Rasmus <rasmus@gmx.us> writes:
>
>> 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.
>
> As a short term solution, I think the (i) is the best. That's exactly
> what happens to LaTeX environments: in `org-latex-latex-environment',
> the caption is dropped and only the label, if any, is inserted in the
> environment.
OK. I can prepare a patch.
> As a long term solution, it would be interesting to be able to do (ii),
> for both tables in math mode (but not in inline-math) and LaTeX
> environments: captioning an equation is a reasonable request.
Indeed this seems long-term.
I have only rarely seen math-floats. It is, however, sometimes used
in elsarticle.cls from the Elsevier publishing house. See this
example:
http://bayimg.com/aAHDfAAFE
Here the caption can be seen as the text below the equation, ("Where
Λ(·) is...") and (16) is the reference. The attached file play
around with some preliminary LaTeX styles for this.
In LaTeX the floating would be kind of odd, I think. At the very
least math floats shouldn't be Figure or Tables (IMO); unfortunately
the Internets seem to suggest that you usually create additional
floats via packages such as newfloat of "caption". HTML should also
be considered...
–Rasmus
--
This space is left intentionally blank
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: test.tex --]
[-- Type: text/x-tex, Size: 374 bytes --]
\documentclass[11pt]{article}
\usepackage{amsmath}
\begin{document}
first equation
\begin{equation}
x=1
\end{equation}
Second equation
\par\noindent\fbox{\parbox{\textwidth}{
\begin{equation}
x=2\Lambda(x)
\end{equation}
Here, $\Lambda(\cdot)$ is \dots}}
\begin{figure}
\fbox{\parbox{\textwidth}{\[g=3\]}}\caption{Third caption}
\end{figure}
\end{document}
next prev parent reply other threads:[~2014-01-19 14:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-18 19:36 [bug][ox-latex] Captions in equations Rasmus
2014-01-19 3:23 ` Vladimir Lomov
2014-01-19 14:19 ` Rasmus
2014-01-20 0:51 ` Vladimir Lomov
2014-01-20 10:41 ` Rasmus
2014-01-19 9:36 ` Nicolas Goaziou
2014-01-19 14:14 ` Rasmus [this message]
2014-01-19 19:41 ` Nicolas Goaziou
2014-01-20 10:13 ` Rasmus
2014-01-25 14:35 ` Rasmus
2014-01-25 22:30 ` Nicolas Goaziou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zjms83dr.fsf@gmx.us \
--to=rasmus@gmx.us \
--cc=emacs-orgmode@gnu.org \
--cc=n.goaziou@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).