emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: John Hendy <jw.hendy@gmail.com>
To: Simon Guest <simon.guest@tesujimath.org>
Cc: emacs-org list <emacs-orgmode@gnu.org>
Subject: Re: Latex export of longtable with multiline heading
Date: Sat, 6 Apr 2013 13:07:03 -0500	[thread overview]
Message-ID: <CA+M2ft8RJ63WfytTPfAj0bo2qPyMQJCO-Xmyz_nuoCdwJjTKmg@mail.gmail.com> (raw)
In-Reply-To: <86y5cw755y.wl%simon.guest@tesujimath.org>

On Fri, Apr 5, 2013 at 9:40 PM, Simon Guest <simon.guest@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
>

  reply	other threads:[~2013-04-06 18:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-06  2:40 Latex export of longtable with multiline heading Simon Guest
2013-04-06 18:07 ` John Hendy [this message]
2013-04-07  2:39   ` Simon Guest

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+M2ft8RJ63WfytTPfAj0bo2qPyMQJCO-Xmyz_nuoCdwJjTKmg@mail.gmail.com \
    --to=jw.hendy@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=simon.guest@tesujimath.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).