emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Long table with NAME but no CAPTION
@ 2014-11-13  0:27 presnell
  2014-11-18 21:28 ` Nicolas Goaziou
  0 siblings, 1 reply; 5+ messages in thread
From: presnell @ 2014-11-13  0:27 UTC (permalink / raw)
  To: emacs-orgmode


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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-11-19 20:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-13  0:27 Long table with NAME but no CAPTION presnell
2014-11-18 21:28 ` Nicolas Goaziou
2014-11-19  8:04   ` Eric S Fraga
2014-11-19 18:11   ` presnell
2014-11-19 20:54     ` Nicolas Goaziou

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).