* [bug?] org-latex-table-caption-above has no effect
@ 2013-07-23 15:56 James Harkins
2013-07-23 16:44 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: James Harkins @ 2013-07-23 15:56 UTC (permalink / raw)
To: orgmode
Not entirely sure if this is a bug or not, but it seems to be a regression.
According to [1], the customization variable org-latex-table-caption-above was added to allow table captions to come underneath the table. I can't see any indication that the variable has been deprecated, but in my environment, it has no effect at all.
I've set the variable to nil:
org-latex-table-caption-above is a variable defined in `ox-latex.el'.
Its value is nil
However, when I use the following minimal example, the exported LaTeX code places the \caption{} before the tabular environment.
~~
#+DATE: <2013-07-23 Tue>
#+OPTIONS: texht:t
#+LATEX_CLASS: article
* Heading
#+CAPTION: A table
#+NAME: table1
#+ATTR_LaTeX: :starred t :options [htb]
#+BEGIN_table
| Row 1 | Something |
| Row 2 | Something else |
#+END_table
~~
Actual exported LaTeX (excluding preamble, with comment added by hand):
~~
\section{Heading}
\label{sec-1}
\begin{table*}[htb]
% Why is this at the beginning?
\caption{\label{table1}A table}
\begin{center}
\begin{tabular}{ll}
Row 1 & Something\\
Row 2 & Something else\\
\end{tabular}
\end{center}
\end{table*}
~~
Expected:
~~
\section{Heading}
\label{sec-1}
\begin{table*}[htb]
\begin{center}
\begin{tabular}{ll}
Row 1 & Something\\
Row 2 & Something else\\
\end{tabular}
\end{center}
\caption{\label{table1}A table}
\end{table*}
~~
Org-mode version 8.0.2 (release_8.0.2-122-gcbf956 @ /home/*****/share/org-mode.git/lisp/)
Thanks,
hjh
[1] http://comments.gmane.org/gmane.emacs.orgmode/47227
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug?] org-latex-table-caption-above has no effect
2013-07-23 15:56 [bug?] org-latex-table-caption-above has no effect James Harkins
@ 2013-07-23 16:44 ` Nicolas Goaziou
2013-07-23 19:49 ` James Harkins
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2013-07-23 16:44 UTC (permalink / raw)
To: James Harkins; +Cc: orgmode
Hello,
James Harkins <jamshark70@gmail.com> writes:
> Not entirely sure if this is a bug or not, but it seems to be a regression.
>
> According to [1], the customization variable
> org-latex-table-caption-above was added to allow table captions to
> come underneath the table. I can't see any indication that the
> variable has been deprecated, but in my environment, it has no effect
> at all.
>
> I've set the variable to nil:
>
> org-latex-table-caption-above is a variable defined in `ox-latex.el'.
> Its value is nil
>
> However, when I use the following minimal example, the exported LaTeX code places the \caption{} before the tabular environment.
>
> ~~
> #+DATE: <2013-07-23 Tue>
> #+OPTIONS: texht:t
> #+LATEX_CLASS: article
>
> * Heading
> #+CAPTION: A table
> #+NAME: table1
> #+ATTR_LaTeX: :starred t :options [htb]
> #+BEGIN_table
> | Row 1 | Something |
> | Row 2 | Something else |
> #+END_table
This variable, as its name suggests, only applies to tables. You're
captioning a special block (begin_table) here. Therefore it is ignored.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [bug?] org-latex-table-caption-above has no effect
2013-07-23 16:44 ` Nicolas Goaziou
@ 2013-07-23 19:49 ` James Harkins
0 siblings, 0 replies; 3+ messages in thread
From: James Harkins @ 2013-07-23 19:49 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: orgmode
At Tue, 23 Jul 2013 18:44:04 +0200,
Nicolas Goaziou wrote:
> James Harkins <jamshark70@gmail.com> writes:
>
> > According to [1], the customization variable
> > org-latex-table-caption-above was added to allow table captions to
> > come underneath the table. I can't see any indication that the
> > variable has been deprecated, but in my environment, it has no effect
> > at all.
> >
> This variable, as its name suggests, only applies to tables. You're
> captioning a special block (begin_table) here. Therefore it is ignored.
Okay, I can understand that. (Actually, I kind of guessed this sometime after getting up from the computer).
It took a minute to play with it, and another visit to the org manual, but this seems to do what I wanted. Posting for the benefit of future archive searches. (The "multicolumn" is necessary for this article, where the conference specifies a two-column format. Maybe optional in other settings.)
#+CAPTION: A table
#+NAME: table1
#+ATTR_LaTeX: :float multicolumn
| Row 1 | Something |
| Row 2 | Something else |
Thanks --
hjh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-23 19:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-23 15:56 [bug?] org-latex-table-caption-above has no effect James Harkins
2013-07-23 16:44 ` Nicolas Goaziou
2013-07-23 19:49 ` James Harkins
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).