From: presnell@member.fsf.org
To: emacs-orgmode@gnu.org
Subject: Long table with NAME but no CAPTION
Date: Wed, 12 Nov 2014 19:27:53 -0500 [thread overview]
Message-ID: <87wq6zkqj4.fsf@ufl.edu> (raw)
If I export a table with
#+ATTR_LATEX: :environment longtable
#+NAME: mytable
then the beginning of the longtable environment (in the exported
latex file) has, e.g.,
\begin{longtable}{lrrl}
\label{mytable}
\\
\hline
This is a problem, because of the extra space created by the \\. I
tried to fix it by changing ox-latex.el, but the longtable environment
(in latex) requires the \\ when there is a \label{} command, even in the
absence of a caption. This looks like a bug in longtable to me, but it
is also true that in a pure LaTeX context it would be very unusual for a
table to have a \label{} without a \caption{}, because there would be no
printed target for \ref{mylabel} to refer to.
Note that there is no problem if the org table has no NAME, since then
the lines
\label{mytable}
\\
are not produced. But I want the NAME in the org file because because I
use data from the table to do calculations in other tables via
"remote(mytable, ...)".
So my sugggestion would be for org's latex export to produce no \label{}
(and hence no \\) when the table has no caption, or at least I would
prefer to have this as an option. Is there some way to achieve this?
Perhaps I should also file a bug report with the author/maintainer of
longtable, David Carlisle?
One more minor comment: I notice that org-mode's latex export puts the
\label{} inside the argument of the \caption{} command. This seems
unusual to me.
next reply other threads:[~2014-11-13 16:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-13 0:27 presnell [this message]
2014-11-18 21:28 ` Long table with NAME but no CAPTION Nicolas Goaziou
2014-11-19 8:04 ` Eric S Fraga
2014-11-19 18:11 ` presnell
2014-11-19 20:54 ` 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=87wq6zkqj4.fsf@ufl.edu \
--to=presnell@member.fsf.org \
--cc=emacs-orgmode@gnu.org \
/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).