From: jorge.a.alfaro@gmail.com (Jorge A. Alfaro-Murillo)
To: emacs-orgmode@gnu.org
Subject: Re: Feature request: creating separate tables on same rows
Date: Thu, 05 Jun 2014 19:06:45 -0400 [thread overview]
Message-ID: <874mzz2by2.fsf@gmail.com> (raw)
In-Reply-To: 871tv3qcqq.fsf@gmail.com
Thorsten Jolitz <tjolitz@gmail.com> writes:
> In Org-mode that would be (at least) very strange, but Org-mode uses
> backends for the final docs, so you might want to look at e.g. LaTeX
> multi-column styles and if Org-mode supports them somehow. But even if
> so, it might get complicated and using AucTex directly might be the
> better choice in such cases.
I agree, in such cases I use AucTeX directly. You can use orgtbl-mode in
your tex file to build the main data of the table in LaTeX in Org form,
check: (info "(org) A LaTeX example"). Then add your multi-columns with:
#+BEGIN_LaTeX
\multirow{''num_rows''}{''width''}{''contents''}
#+END_LaTeX
If you want multi-rows:
#+BEGIN_LaTeX
\usepackage{multirow}
\multirow{''num_rows''}{''width''}{''contents''}
#+END_LaTeX
A complete example, from a recent paper I was working on:
#+BEGIN_LaTeX
\documentclass{article}
\usepackage{multirow}
\usepackage{booktabs}
\begin{document}
\begin{table}
\centering
\begin{tabular}{cccccc}
\toprule
\multirow{2}{*}{Age-group} & \multirow{2}{*}{$L-a$} &
\multirow{2}{*}{$p_{d}$} & \multirow{2}{*}{$p_{h}$} &
\multicolumn{2}{c}{Likelihood} \\
\cmidrule(lr){5-6}
& & & & Mean & 95\% CI \\
\midrule
0-5 & 83.73 & 0.00004 & 0.0141 & 0.38009 & $[0.24024,\,0.53638]$\\
5-17 & 74.78 & 0.00001 & 0.0006 & 0.19399 & $[0.10497,\,0.31382]$\\
18-49 & 52.52 & 0.00009 & 0.0042 & 0.12682 & $[0.07216,\,0.20166]$\\
50-64 & 30.10 & 0.00134 & 0.0193 & 0.12682 & $[0.07216,\,0.20166]$\\
65+ & 14.19 & 0.01170 & 0.0421 & 0.17229 & $[0.09871,\,0.26994]$\\
\bottomrule
\end{tabular}
\caption{Age-dependent health effect parameters.}
\end{table}
\end{document}
#+END_LaTeX
Everything between \midrule and \bottomrule is easier written with
orgtbl-mode.
Best,
Jorge.
next prev parent reply other threads:[~2014-06-05 23:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-05 15:50 Feature request: creating separate tables on same rows Aldric Giacomoni
2014-06-05 16:52 ` Thorsten Jolitz
2014-06-05 19:28 ` Omid
2014-06-05 19:54 ` Aldric Giacomoni
2014-06-05 20:08 ` Omid
2014-06-05 20:47 ` Aldric Giacomoni
2014-06-05 21:15 ` Thorsten Jolitz
2014-06-05 23:06 ` Jorge A. Alfaro-Murillo [this message]
2014-06-05 23:33 ` Aldric Giacomoni
2014-06-06 9:19 ` Rainer M Krug
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=874mzz2by2.fsf@gmail.com \
--to=jorge.a.alfaro@gmail.com \
--cc=emacs-orgmode@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.