emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Latex export of longtable with multiline heading


From: John Hendy
Subject: Re: [O] Latex export of longtable with multiline heading
Date: Sat, 6 Apr 2013 13:07:03 -0500

On Fri, Apr 5, 2013 at 9:40 PM, Simon Guest <address@hidden> wrote:
> Dear Org-mode people,
>
> I have an Org mode document containing a longtable, which has its
> heading row split over two lines.  Exporting this to Latex doesn't work.

What's the output of =M-x org-version= ?

If it's > 7.9.4f, you're on the new exporter, and syntax has changed.

>
> Here's a really small example (for which I wouldn't need longtable,
> but you get the point):
>
> #+ATTR_LaTeX: longtable align=|r|r|
> |-------+---------|
> | First |     Age |
> | Name  | (years) |
> |-------+---------|
> | Bob   |       6 |
> | Dave  |       7 |
> | Wendy |       9 |
> |-------+---------|
>

Try this:

#+ATTR_LaTeX: :environment longtable :align |r|r|

> The PDF document is missing the first line of the header.  Looking at
> the Latex file which is generated, there appear to be too many
> (i.e. 2) instances of \endhead (but I'm no expert on longtables in
> Latex).

Your example with the #+attr_latex line above gives this:

#+begin_src latex
\begin{longtable}{|r|r|}
\toprule
First & Age\\
Name & (years)\\
\midrule
\endhead
...
...
#+end_src

Keep in mind I'm using booktabs, so instead of \[top/mid]rule, you'd
get \hline with a default setup. Things look decent to me in the
output.

If you're on the "old exporter," see here for upgrading:
- http://orgmode.org/worg/org-8.0.html


Good luck!
John

>
> It's important that I get this working, or find a work-around.
>
> Any suggestions?
>
> cheers,
> Simon
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]