emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Rasmus <rasmus@gmx.us>
Cc: emacs-orgmode@gnu.org
Subject: Re: [bug][ox-latex] Captions in equations
Date: Sat, 25 Jan 2014 23:30:10 +0100	[thread overview]
Message-ID: <8738kbvgnh.fsf@gmail.com> (raw)
In-Reply-To: <877g9ojfj6.fsf@gmx.us> (rasmus@gmx.us's message of "Sat, 25 Jan 2014 15:35:09 +0100")

Hello,

Rasmus <rasmus@gmx.us> writes:

> Attached is a simple patch that works by silently drops the caption in
> a sneaky way.  I didn't experience any problems when testing it, but
> you might have more insights as to whether this approach have latent
> issues.

Thank you.

Altering the parse tree seems a bit drastic to me, though. See below.

> I think we had the discussion with leaving out packages earlier, when
> discussing things like wrap-float etc.  As I recall, the consensus was
> to include the necessary packages.  Thus, I think solution (iii) would
> require adding caption to the default package alist.  Caption is a
> package that's very good, so I wouldn't mind it.  But, I'm still not
> convinced that non-floating caption for equation is the correct
> behavior.

We don't need to add "caption" to the default packages set. We can
specify that this feature is available only if that package is required.

> -  (let* ((caption (org-latex--caption/label-string table info))
> +  (let* (;; Silently drop captions as they are not supported in
> +	 ;; math-mode.
> +	 (caption (org-latex--caption/label-string
> +		   (org-element-put-property table :caption nil) info))

We could replace

  (caption (org-latex--caption/label-string ...))

with

  (label (let ((label (org-element-property :name table)))
           (and label (format "\\label{%s}\n" (org-export-solidify-link-text label)))))

and change "caption" into "label" later in the function.

WDYT?


Regards,

-- 
Nicolas Goaziou

      reply	other threads:[~2014-01-25 22:30 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
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 [this message]

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=8738kbvgnh.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=rasmus@gmx.us \
    /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).