* 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
* Re: Long table with NAME but no CAPTION
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
0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2014-11-18 21:28 UTC (permalink / raw)
To: presnell; +Cc: emacs-orgmode
Hello,
presnell@member.fsf.org writes:
> 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?
You can use a table filter to remove \label and \\ from longtables. See
(info "(org) Advanced configuration")
> Perhaps I should also file a bug report with the author/maintainer of
> longtable, David Carlisle?
Probably.
> 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.
It isn't wrong, though.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Long table with NAME but no CAPTION
2014-11-18 21:28 ` Nicolas Goaziou
@ 2014-11-19 8:04 ` Eric S Fraga
2014-11-19 18:11 ` presnell
1 sibling, 0 replies; 5+ messages in thread
From: Eric S Fraga @ 2014-11-19 8:04 UTC (permalink / raw)
To: presnell; +Cc: emacs-orgmode
On Tuesday, 18 Nov 2014 at 22:28, Nicolas Goaziou wrote:
> Hello,
>
> presnell@member.fsf.org writes:
[...]
>> 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.
>
> It isn't wrong, though.
and in fact is common practice!
--
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.1, Org release_8.3beta-558-g83d8a2
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Long table with NAME but no CAPTION
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
1 sibling, 1 reply; 5+ messages in thread
From: presnell @ 2014-11-19 18:11 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: presnell, emacs-orgmode
Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
> You can use a table filter to remove \label and \\ from longtables. See
> (info "(org) Advanced configuration")
Thanks. Just to be clear, you are suggesting a filter that would remove
\label and \\ from longtables that have no caption, but that would leave
them in for longtables that do have a caption. Is that right?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Long table with NAME but no CAPTION
2014-11-19 18:11 ` presnell
@ 2014-11-19 20:54 ` Nicolas Goaziou
0 siblings, 0 replies; 5+ messages in thread
From: Nicolas Goaziou @ 2014-11-19 20:54 UTC (permalink / raw)
To: presnell; +Cc: emacs-orgmode
presnell@member.fsf.org writes:
> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> You can use a table filter to remove \label and \\ from longtables. See
>> (info "(org) Advanced configuration")
>
> Thanks. Just to be clear, you are suggesting a filter that would remove
> \label and \\ from longtables that have no caption, but that would leave
> them in for longtables that do have a caption. Is that right?
Correct.
Regards,
^ 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).