* Orgtbl-mode questions
@ 2008-11-02 16:13 Nicholas S-A
2008-11-03 11:16 ` Carsten Dominik
2008-11-03 11:53 ` Sebastian Rose
0 siblings, 2 replies; 6+ messages in thread
From: Nicholas S-A @ 2008-11-02 16:13 UTC (permalink / raw)
To: emacs-orgmode
Hi all,
I have some questions pertaining to orgtbl-mode. I am really excited
about using it to compose all my LaTeX tables, and in fact learned Emacs
and Org specifically for this purpose (well, I also learned them for all
the other awesome features of Org-mode.
First of all, I was wondering how I could add vertical bars to a
table (so instead of \begin{tabular}{rrr}, something like
\begin{tabular}{r|rr} is generated when C-c C-c is executed in an
orgtbl-mode remote table). Is this possible?
Second, I have had some problems with calculations. I have the
following format for my table:
% BEGIN RECEIVE ORGTBL test
% END RECEIVE ORGTBL test
\begin{comment}
#+ORGTBL: SEND test orgtbl-to-latex :splice nil :skip 0
| Name | Age | Height |
|-------+-----+--------|
| Bob | 34 | 2 |
| James | 23 | 1.8 |
| Fred | 64 | 1.2 |
|-------+-----+--------|
| TOTAL |<pt> | |
\end{comment}
With <pt> as the location of point. I want to sum the ages and put them
in that cell, then sum the height and put them in the adjacent cell.
When I enter the formula :=vsum(@-II+1$2..-I-1$2) into the current cell
and then tab to the next cell and enter :=vsum(@-II+1$3..-I-1$3), it
works great. However, this is very tedious when many columns are used!
Is there a way to enter many formulae in a row and have the column
automatically updated?
Thanks for the help!
Nicholas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Orgtbl-mode questions
2008-11-02 16:13 Orgtbl-mode questions Nicholas S-A
@ 2008-11-03 11:16 ` Carsten Dominik
2008-11-03 12:32 ` Nicholas S-A
2008-11-03 11:53 ` Sebastian Rose
1 sibling, 1 reply; 6+ messages in thread
From: Carsten Dominik @ 2008-11-03 11:16 UTC (permalink / raw)
To: Nicholas S-A; +Cc: emacs-orgmode
Hi Nicholas,
On Nov 2, 2008, at 5:13 PM, Nicholas S-A wrote:
> Hi all,
> I have some questions pertaining to orgtbl-mode. I am really
> excited
> about using it to compose all my LaTeX tables, and in fact learned
> Emacs
> and Org specifically for this purpose (well, I also learned them for
> all
> the other awesome features of Org-mode.
> First of all, I was wondering how I could add vertical bars to a
> table (so instead of \begin{tabular}{rrr}, something like
> \begin{tabular}{r|rr} is generated when C-c C-c is executed in an
> orgtbl-mode remote table). Is this possible?
Yes. The way to do this is that you write the header of the table
yourself, outside of the receive area, and then you then use
the :splice option in the "ORGTBL: SEND" line. There is even an
example in the manual:
http://orgmode.org/manual/A-LaTeX-example.html#A-LaTeX-example
>
> Second, I have had some problems with calculations. I have the
> following format for my table:
>
> % BEGIN RECEIVE ORGTBL test
> % END RECEIVE ORGTBL test
> \begin{comment}
> #+ORGTBL: SEND test orgtbl-to-latex :splice nil :skip 0
> | Name | Age | Height |
> |-------+-----+--------|
> | Bob | 34 | 2 |
> | James | 23 | 1.8 |
> | Fred | 64 | 1.2 |
> |-------+-----+--------|
> | TOTAL |<pt> | |
> \end{comment}
>
> With <pt> as the location of point. I want to sum the ages and put
> them
> in that cell, then sum the height and put them in the adjacent cell.
> When I enter the formula :=vsum(@-II+1$2..-I-1$2) into the current
> cell
> and then tab to the next cell and enter :=vsum(@-II+1$3..-I-1$3), it
> works great. However, this is very tedious when many columns are used!
> Is there a way to enter many formulae in a row and have the column
> automatically updated?
There is no way to define row formulas.
However, since you are summing in the column, all $-row references
are optional, i.e. you can write the formula as
:=vsum(@-II+1..-I-1)
or even as
:=vsum(@-II..-I)
Since this is the same expression for all columns, you can copy it
into the kill ring and then move with
C-y TAB C-y TAB .....
pretty quickly through the row where you want the formulas.
HTH
- Carsten
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Orgtbl-mode questions
2008-11-02 16:13 Orgtbl-mode questions Nicholas S-A
2008-11-03 11:16 ` Carsten Dominik
@ 2008-11-03 11:53 ` Sebastian Rose
2008-11-03 12:33 ` Nicholas S-A
2008-11-03 13:30 ` Carsten Dominik
1 sibling, 2 replies; 6+ messages in thread
From: Sebastian Rose @ 2008-11-03 11:53 UTC (permalink / raw)
To: Nicholas S-A; +Cc: emacs-orgmode
Nicholas S-A wrote:
> Hi all,
> I have some questions pertaining to orgtbl-mode. I am really excited
> about using it to compose all my LaTeX tables, and in fact learned Emacs
> and Org specifically for this purpose (well, I also learned them for all
> the other awesome features of Org-mode.
> First of all, I was wondering how I could add vertical bars to a
> table (so instead of \begin{tabular}{rrr}, something like
> \begin{tabular}{r|rr} is generated when C-c C-c is executed in an
> orgtbl-mode remote table). Is this possible?
http://orgmode.org/manual/Column-groups.html#Column-groups
works fine for LaTeX.
Regards,
Sebastian
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Orgtbl-mode questions
2008-11-03 11:16 ` Carsten Dominik
@ 2008-11-03 12:32 ` Nicholas S-A
0 siblings, 0 replies; 6+ messages in thread
From: Nicholas S-A @ 2008-11-03 12:32 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode
Hi,
* Carsten Dominik <dominik@science.uva.nl> [2008-11-03 12:16:56 +0100]:
> However, since you are summing in the column, all $-row references
> are optional, i.e. you can write the formula as
>
> :=vsum(@-II+1..-I-1)
>
> or even as
>
> :=vsum(@-II..-I)
>
> Since this is the same expression for all columns, you can copy it
> into the kill ring and then move with
>
> C-y TAB C-y TAB .....
>
> pretty quickly through the row where you want the formulas.
That works very nicely.
Thank you for the clear response and prompt reply!
Nicholas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Orgtbl-mode questions
2008-11-03 11:53 ` Sebastian Rose
@ 2008-11-03 12:33 ` Nicholas S-A
2008-11-03 13:30 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Nicholas S-A @ 2008-11-03 12:33 UTC (permalink / raw)
To: Sebastian Rose; +Cc: emacs-orgmode
* Sebastian Rose <sebastian_rose@gmx.de> [2008-11-03 12:53:57 +0100]:
> http://orgmode.org/manual/Column-groups.html#Column-groups
>
> works fine for LaTeX.
Wow, I clearly missed this section of the manual in my (not so thorough,
it seems) search for how to accomplish what I want.
Thanks!
Nicholas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Orgtbl-mode questions
2008-11-03 11:53 ` Sebastian Rose
2008-11-03 12:33 ` Nicholas S-A
@ 2008-11-03 13:30 ` Carsten Dominik
1 sibling, 0 replies; 6+ messages in thread
From: Carsten Dominik @ 2008-11-03 13:30 UTC (permalink / raw)
To: sebastian_rose; +Cc: emacs-orgmode
On Nov 3, 2008, at 12:53 PM, Sebastian Rose wrote:
> Nicholas S-A wrote:
>> Hi all,
>> I have some questions pertaining to orgtbl-mode. I am really
>> excited
>> about using it to compose all my LaTeX tables, and in fact learned
>> Emacs
>> and Org specifically for this purpose (well, I also learned them
>> for all
>> the other awesome features of Org-mode.
>> First of all, I was wondering how I could add vertical bars to a
>> table (so instead of \begin{tabular}{rrr}, something like
>> \begin{tabular}{r|rr} is generated when C-c C-c is executed in an
>> orgtbl-mode remote table). Is this possible?
>
>
>
> http://orgmode.org/manual/Column-groups.html#Column-groups
>
> works fine for LaTeX.
Ha! I had forgotten about column groups! Great, thanks Sebastian.
- Carsten
>
>
>
> Regards,
>
> Sebastian
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-11-03 13:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-02 16:13 Orgtbl-mode questions Nicholas S-A
2008-11-03 11:16 ` Carsten Dominik
2008-11-03 12:32 ` Nicholas S-A
2008-11-03 11:53 ` Sebastian Rose
2008-11-03 12:33 ` Nicholas S-A
2008-11-03 13:30 ` Carsten Dominik
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.