emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Feature request: creating separate tables on same rows
@ 2014-06-05 15:50 Aldric Giacomoni
  2014-06-05 16:52 ` Thorsten Jolitz
  0 siblings, 1 reply; 10+ messages in thread
From: Aldric Giacomoni @ 2014-06-05 15:50 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 699 bytes --]

I'd like to be able to create multiple tables on the same rows, like such:


| Group | Name |     | Something | Else |
|----------+----------|     |-----------------+----- --|
|        1 |     foo |     |           Yes |   No |
|----------+----------|     |-----------------+-------|

This might be based on a pretty fundamental misunderstanding of how to use
tables, org-mode and emacs, but I would find it useful to be able to
compare tables and making changes easily without scrolling too much.

Someone on #emacs pointed me towards clone-indirect-buffer, which works for
my purposes, but I figured I'd ask here and ask all you experts if this
idea is reasonable or crazy-pants.

Thanks,
-Aldric

[-- Attachment #2: Type: text/html, Size: 911 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  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
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2014-06-05 16:52 UTC (permalink / raw)
  To: emacs-orgmode

Aldric Giacomoni <trevoke@gmail.com> writes:

> I'd like to be able to create multiple tables on the same rows, like
> such:
>
> | Group | Name | | Something | Else |
> |----------+----------| |-----------------+----- --|
> | 1 | foo | | Yes | No |
> |----------+----------| |-----------------+-------|
>
> This might be based on a pretty fundamental misunderstanding of how to
> use tables, org-mode and emacs, but I would find it useful to be able
> to compare tables and making changes easily without scrolling too
> much.
>
> Someone on #emacs pointed me towards clone-indirect-buffer, which
> works for my purposes, but I figured I'd ask here and ask all you
> experts if this idea is reasonable or crazy-pants.

1+ for crazy-pants

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 16:52 ` Thorsten Jolitz
@ 2014-06-05 19:28   ` Omid
  2014-06-05 19:54     ` Aldric Giacomoni
  0 siblings, 1 reply; 10+ messages in thread
From: Omid @ 2014-06-05 19:28 UTC (permalink / raw)
  To: emacs-orgmode


With clone-indirect-buffer you'll get a twin copy of your original
buffer. You are in effect editing the same buffer in two different ,
with some additional niceties like having separate modes and
narrow-to-region, etc (see an example usage at
http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/). I
don't see how this can help with your problem, though.

On 06/05/2014 12:52 PM, Thorsten Jolitz wrote:
> Aldric Giacomoni <trevoke@gmail.com> writes:
> 
>> I'd like to be able to create multiple tables on the same rows, like
>> such:
>>
>> | Group | Name | | Something | Else |
>> |----------+----------| |-----------------+----- --|
>> | 1 | foo | | Yes | No |
>> |----------+----------| |-----------------+-------|
>>
>> This might be based on a pretty fundamental misunderstanding of how to
>> use tables, org-mode and emacs, but I would find it useful to be able
>> to compare tables and making changes easily without scrolling too
>> much.
>>
>> Someone on #emacs pointed me towards clone-indirect-buffer, which
>> works for my purposes, but I figured I'd ask here and ask all you
>> experts if this idea is reasonable or crazy-pants.
> 
> 1+ for crazy-pants
> 

-- 
Omid

Sent from my Emacs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 19:28   ` Omid
@ 2014-06-05 19:54     ` Aldric Giacomoni
  2014-06-05 20:08       ` Omid
  0 siblings, 1 reply; 10+ messages in thread
From: Aldric Giacomoni @ 2014-06-05 19:54 UTC (permalink / raw)
  To: Omid; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1492 bytes --]

Omid: The idea is C-x 3, clone-indirect-buffer, so I can see and modify the
same buffer in two different places. So.. A workaround, not a solution.


On Thu, Jun 5, 2014 at 3:28 PM, Omid <omidlink@gmail.com> wrote:

>
> With clone-indirect-buffer you'll get a twin copy of your original
> buffer. You are in effect editing the same buffer in two different ,
> with some additional niceties like having separate modes and
> narrow-to-region, etc (see an example usage at
> http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/). I
> don't see how this can help with your problem, though.
>
> On 06/05/2014 12:52 PM, Thorsten Jolitz wrote:
> > Aldric Giacomoni <trevoke@gmail.com> writes:
> >
> >> I'd like to be able to create multiple tables on the same rows, like
> >> such:
> >>
> >> | Group | Name | | Something | Else |
> >> |----------+----------| |-----------------+----- --|
> >> | 1 | foo | | Yes | No |
> >> |----------+----------| |-----------------+-------|
> >>
> >> This might be based on a pretty fundamental misunderstanding of how to
> >> use tables, org-mode and emacs, but I would find it useful to be able
> >> to compare tables and making changes easily without scrolling too
> >> much.
> >>
> >> Someone on #emacs pointed me towards clone-indirect-buffer, which
> >> works for my purposes, but I figured I'd ask here and ask all you
> >> experts if this idea is reasonable or crazy-pants.
> >
> > 1+ for crazy-pants
> >
>
> --
> Omid
>
> Sent from my Emacs
>
>

[-- Attachment #2: Type: text/html, Size: 2165 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 19:54     ` Aldric Giacomoni
@ 2014-06-05 20:08       ` Omid
  2014-06-05 20:47         ` Aldric Giacomoni
  0 siblings, 1 reply; 10+ messages in thread
From: Omid @ 2014-06-05 20:08 UTC (permalink / raw)
  To: Aldric Giacomoni; +Cc: emacs-orgmode

Then I misunderstood you. I thought you wanted to create tables side
by sides. This of course allows you to look at different parts of your
buffer side by side, with the additional features I mentioned.

On 06/05/2014 03:54 PM, Aldric Giacomoni wrote:
> Omid: The idea is C-x 3, clone-indirect-buffer, so I can see and modify
> the same buffer in two different places. So.. A workaround, not a solution.
> 
> 
> On Thu, Jun 5, 2014 at 3:28 PM, Omid <omidlink@gmail.com
> <mailto:omidlink@gmail.com>> wrote:
> 
> 
>     With clone-indirect-buffer you'll get a twin copy of your original
>     buffer. You are in effect editing the same buffer in two different ,
>     with some additional niceties like having separate modes and
>     narrow-to-region, etc (see an example usage at
>     http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/). I
>     don't see how this can help with your problem, though.
> 
>     On 06/05/2014 12:52 PM, Thorsten Jolitz wrote:
>     > Aldric Giacomoni <trevoke@gmail.com <mailto:trevoke@gmail.com>>
>     writes:
>     >
>     >> I'd like to be able to create multiple tables on the same rows, like
>     >> such:
>     >>
>     >> | Group | Name | | Something | Else |
>     >> |----------+----------| |-----------------+----- --|
>     >> | 1 | foo | | Yes | No |
>     >> |----------+----------| |-----------------+-------|
>     >>
>     >> This might be based on a pretty fundamental misunderstanding of
>     how to
>     >> use tables, org-mode and emacs, but I would find it useful to be able
>     >> to compare tables and making changes easily without scrolling too
>     >> much.
>     >>
>     >> Someone on #emacs pointed me towards clone-indirect-buffer, which
>     >> works for my purposes, but I figured I'd ask here and ask all you
>     >> experts if this idea is reasonable or crazy-pants.
>     >
>     > 1+ for crazy-pants
>     >
> 
>     --
>     Omid
> 
>     Sent from my Emacs
> 
> 

-- 
Omid

Sent from my Emacs

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 20:08       ` Omid
@ 2014-06-05 20:47         ` Aldric Giacomoni
  2014-06-05 21:15           ` Thorsten Jolitz
  0 siblings, 1 reply; 10+ messages in thread
From: Aldric Giacomoni @ 2014-06-05 20:47 UTC (permalink / raw)
  To: Omid; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2185 bytes --]

I did -want- to do that.


On Thu, Jun 5, 2014 at 4:08 PM, Omid <omidlink@gmail.com> wrote:

> Then I misunderstood you. I thought you wanted to create tables side
> by sides. This of course allows you to look at different parts of your
> buffer side by side, with the additional features I mentioned.
>
> On 06/05/2014 03:54 PM, Aldric Giacomoni wrote:
> > Omid: The idea is C-x 3, clone-indirect-buffer, so I can see and modify
> > the same buffer in two different places. So.. A workaround, not a
> solution.
> >
> >
> > On Thu, Jun 5, 2014 at 3:28 PM, Omid <omidlink@gmail.com
> > <mailto:omidlink@gmail.com>> wrote:
> >
> >
> >     With clone-indirect-buffer you'll get a twin copy of your original
> >     buffer. You are in effect editing the same buffer in two different ,
> >     with some additional niceties like having separate modes and
> >     narrow-to-region, etc (see an example usage at
> >     http://demonastery.org/2013/04/emacs-narrow-to-region-indirect/). I
> >     don't see how this can help with your problem, though.
> >
> >     On 06/05/2014 12:52 PM, Thorsten Jolitz wrote:
> >     > Aldric Giacomoni <trevoke@gmail.com <mailto:trevoke@gmail.com>>
> >     writes:
> >     >
> >     >> I'd like to be able to create multiple tables on the same rows,
> like
> >     >> such:
> >     >>
> >     >> | Group | Name | | Something | Else |
> >     >> |----------+----------| |-----------------+----- --|
> >     >> | 1 | foo | | Yes | No |
> >     >> |----------+----------| |-----------------+-------|
> >     >>
> >     >> This might be based on a pretty fundamental misunderstanding of
> >     how to
> >     >> use tables, org-mode and emacs, but I would find it useful to be
> able
> >     >> to compare tables and making changes easily without scrolling too
> >     >> much.
> >     >>
> >     >> Someone on #emacs pointed me towards clone-indirect-buffer, which
> >     >> works for my purposes, but I figured I'd ask here and ask all you
> >     >> experts if this idea is reasonable or crazy-pants.
> >     >
> >     > 1+ for crazy-pants
> >     >
> >
> >     --
> >     Omid
> >
> >     Sent from my Emacs
> >
> >
>
> --
> Omid
>
> Sent from my Emacs
>

[-- Attachment #2: Type: text/html, Size: 3343 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 20:47         ` Aldric Giacomoni
@ 2014-06-05 21:15           ` Thorsten Jolitz
  2014-06-05 23:06             ` Jorge A. Alfaro-Murillo
  0 siblings, 1 reply; 10+ messages in thread
From: Thorsten Jolitz @ 2014-06-05 21:15 UTC (permalink / raw)
  To: emacs-orgmode

Aldric Giacomoni <trevoke@gmail.com> writes:

> I did -want- to do that.
>
> On Thu, Jun 5, 2014 at 4:08 PM, Omid <omidlink@gmail.com> wrote:
>
>     Then I misunderstood you. I thought you wanted to create tables
>     side by sides.

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.

-- 
cheers,
Thorsten

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 21:15           ` Thorsten Jolitz
@ 2014-06-05 23:06             ` Jorge A. Alfaro-Murillo
  2014-06-05 23:33               ` Aldric Giacomoni
  0 siblings, 1 reply; 10+ messages in thread
From: Jorge A. Alfaro-Murillo @ 2014-06-05 23:06 UTC (permalink / raw)
  To: emacs-orgmode

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 23:06             ` Jorge A. Alfaro-Murillo
@ 2014-06-05 23:33               ` Aldric Giacomoni
  2014-06-06  9:19                 ` Rainer M Krug
  0 siblings, 1 reply; 10+ messages in thread
From: Aldric Giacomoni @ 2014-06-05 23:33 UTC (permalink / raw)
  To: Jorge A. Alfaro-Murillo; +Cc: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 2111 bytes --]

Understood, thank you very much for explaining it :)


On Thu, Jun 5, 2014 at 7:06 PM, Jorge A. Alfaro-Murillo <
jorge.a.alfaro@gmail.com> wrote:

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

[-- Attachment #2: Type: text/html, Size: 2974 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: Feature request: creating separate tables on same rows
  2014-06-05 23:33               ` Aldric Giacomoni
@ 2014-06-06  9:19                 ` Rainer M Krug
  0 siblings, 0 replies; 10+ messages in thread
From: Rainer M Krug @ 2014-06-06  9:19 UTC (permalink / raw)
  To: Aldric Giacomoni; +Cc: emacs-orgmode, Jorge A. Alfaro-Murillo

[-- Attachment #1: Type: text/plain, Size: 2974 bytes --]

Aldric Giacomoni <trevoke@gmail.com> writes:

> Understood, thank you very much for explaining it :)

Well - you could define it as one huge table, where the first x columns
belong to the first table, and the last x belong to the second table -
but using this table as an input for further calculations might be
tricky.

Cheers,

Rainer

>
>
> On Thu, Jun 5, 2014 at 7:06 PM, Jorge A. Alfaro-Murillo <
> jorge.a.alfaro@gmail.com> wrote:
>
>> 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.
>>
>>
>>

-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa

Tel :       +33 - (0)9 53 10 27 44
Cell:       +33 - (0)6 85 62 59 98
Fax :       +33 - (0)9 58 10 27 44

Fax (D):    +49 - (0)3 21 21 25 22 44

email:      Rainer@krugs.de

Skype:      RMkrug

PGP: 0x0F52F982

[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-06-06  9:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-06-05 23:33               ` Aldric Giacomoni
2014-06-06  9:19                 ` Rainer M Krug

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