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

2013-04-06 Thread John Hendy
On Fri, Apr 5, 2013 at 9:40 PM, Simon Guest simon.gu...@tesujimath.org 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




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

2013-04-06 Thread Simon Guest
At Sat, 6 Apr 2013 13:07:03 -0500,
John Hendy wrote:
 
 What's the output of =M-x org-version= ?

Hi John,

I was using 7.9.2.  Following your suggestions, I upgraded to 8.0-pre,
and switched to the new syntax for selecting longtable.  It's all
perfect now, thanks, very much appreciated!

cheers,
Simon



[O] Latex export of longtable with multiline heading

2013-04-05 Thread Simon Guest
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.

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 |
|---+-|

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

It's important that I get this working, or find a work-around.

Any suggestions?

cheers,
Simon