* Table captions in LaTeX export
@ 2015-06-12 6:12 Thomas S. Dye
2015-06-12 7:41 ` Eric S Fraga
2015-06-12 20:09 ` Rasmus
0 siblings, 2 replies; 5+ messages in thread
From: Thomas S. Dye @ 2015-06-12 6:12 UTC (permalink / raw)
To: emacs-orgmode
Aloha all,
With this input:
,----------------------------------------------------------------------------------
| #+begin_margintable
| #+name: tab:eg
| #+attr_latex: :float nil :booktabs t :center nil :caption \caption{Example table}
| | First | Second |
| |-------+--------|
| | One | Two |
| | Three | Four |
| #+end_margintable
`----------------------------------------------------------------------------------
On export to LaTeX, I get this, which lacks a caption and a label:
,--------------------
| \begin{margintable}
| \begin{tabular}{ll}
| \toprule
| First & Second\\
| \midrule
| One & Two\\
| Three & Four\\
| \bottomrule
| \end{tabular}
| \end{margintable}
`--------------------
It would be good to have :caption and label honored, even when :float
nil, like this:
,--------------------------------------
| \begin{margintable}
| \caption{Example table\label{tab:eg}}
| \begin{tabular}{ll}
| \toprule
| First & Second\\
| \midrule
| One & Two\\
| Three & Four\\
| \bottomrule
| \end{tabular}
| \end{margintable}
`--------------------------------------
Is this possible?
All the best,
Tom
--
T.S. Dye & Colleagues, Archaeologists
735 Bishop St, Suite 315, Honolulu, HI 96813
Tel: 808-529-0866, Fax: 808-529-0884
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table captions in LaTeX export
2015-06-12 6:12 Table captions in LaTeX export Thomas S. Dye
@ 2015-06-12 7:41 ` Eric S Fraga
2015-06-12 16:52 ` Thomas S. Dye
2015-06-12 20:09 ` Rasmus
1 sibling, 1 reply; 5+ messages in thread
From: Eric S Fraga @ 2015-06-12 7:41 UTC (permalink / raw)
To: Thomas S. Dye; +Cc: emacs-orgmode
On Thursday, 11 Jun 2015 at 20:12, Thomas S. Dye wrote:
[...]
> It would be good to have :caption and label honored, even when :float
> nil, like this:
You could always resort to direct LaTeX directives, as in
#+begin_src org
,#+begin_margintable
,#+latex: \label{tab:eg} \caption{Example table}
,#+attr_latex: :float nil :booktabs t :center nil
| First | Second |
|-------+--------|
| One | Two |
| Three | Four |
,#+end_margintable
#+end_src
--
: Eric S Fraga (0xFFFCF67D), Emacs 24.4.1, Org release_8.3beta-1216-gb856f6
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table captions in LaTeX export
2015-06-12 7:41 ` Eric S Fraga
@ 2015-06-12 16:52 ` Thomas S. Dye
0 siblings, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2015-06-12 16:52 UTC (permalink / raw)
To: emacs-orgmode
Hi Eric,
Eric S Fraga <e.fraga@ucl.ac.uk> writes:
> On Thursday, 11 Jun 2015 at 20:12, Thomas S. Dye wrote:
>
> [...]
>
>> It would be good to have :caption and label honored, even when :float
>> nil, like this:
>
> You could always resort to direct LaTeX directives, as in
>
> #+begin_src org
> ,#+begin_margintable
> ,#+latex: \label{tab:eg} \caption{Example table}
> ,#+attr_latex: :float nil :booktabs t :center nil
> | First | Second |
> |-------+--------|
> | One | Two |
> | Three | Four |
> ,#+end_margintable
> #+end_src
Unfortunately, this isn't fully functional. The internal link points to
#+name: and not \label{}.
,----------------------------------------------------------
| Here is a reference to Table [[tab:eg]].
| #+begin_margintable
| #+name: tab:eg
| #+latex: \caption{Example table\label{tab:eg}}
| #+attr_latex: :float nil :booktabs t :center nil
| | First | Second |
| |-------+--------|
| | One | Two |
| | Three | Four |
| #+end_margintable
`----------------------------------------------------------
,------------------------------------------------
| Here is a reference to Table~\ref{orgkeyword1}.
| \begin{margintable}
| \caption{Example table\label{tab:eg}}
| \begin{tabular}{ll}
| \toprule
| First & Second\\
| \midrule
| One & Two\\
| Three & Four\\
| \bottomrule
| \end{tabular}
| \end{margintable}
`------------------------------------------------
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table captions in LaTeX export
2015-06-12 6:12 Table captions in LaTeX export Thomas S. Dye
2015-06-12 7:41 ` Eric S Fraga
@ 2015-06-12 20:09 ` Rasmus
2015-06-12 21:57 ` Thomas S. Dye
1 sibling, 1 reply; 5+ messages in thread
From: Rasmus @ 2015-06-12 20:09 UTC (permalink / raw)
To: emacs-orgmode
Hi,
tsd@tsdye.com (Thomas S. Dye) writes:
> | #+attr_latex: :float nil :booktabs t :center nil :caption
Float=nil disables the caption. There's an older thread on this. I
started a patch for this, but I have not finished it, and at the moment
I'm very busy.
> On export to LaTeX, I get this, which lacks a caption and a label:
This is expected behavior (ATM).
Rasmus
--
Slowly unravels in a ball of yarn and the devil collects it
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Table captions in LaTeX export
2015-06-12 20:09 ` Rasmus
@ 2015-06-12 21:57 ` Thomas S. Dye
0 siblings, 0 replies; 5+ messages in thread
From: Thomas S. Dye @ 2015-06-12 21:57 UTC (permalink / raw)
To: Rasmus; +Cc: emacs-orgmode
Rasmus <rasmus@gmx.us> writes:
> Hi,
>
> tsd@tsdye.com (Thomas S. Dye) writes:
>
>> | #+attr_latex: :float nil :booktabs t :center nil :caption
>
>
> Float=nil disables the caption. There's an older thread on this. I
> started a patch for this, but I have not finished it, and at the moment
> I'm very busy.
Thanks for the response. Let me know if there is something I can do to
help.
All the best,
Tom
--
Thomas S. Dye
http://www.tsdye.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-06-12 21:57 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-12 6:12 Table captions in LaTeX export Thomas S. Dye
2015-06-12 7:41 ` Eric S Fraga
2015-06-12 16:52 ` Thomas S. Dye
2015-06-12 20:09 ` Rasmus
2015-06-12 21:57 ` Thomas S. Dye
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).