emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* orgtbl-to-latex :splice t :skip x does not radio empty first column
@ 2012-06-13 20:57 Charles
  2012-06-13 21:16 ` Charles
  0 siblings, 1 reply; 2+ messages in thread
From: Charles @ 2012-06-13 20:57 UTC (permalink / raw)
  To: emacs-orgmode Mode

I have searched "radio table", "skip" and "splice" and have attempted to 
understand some of the code in org-table.el concerning orgtbl-to-latex; 
all with no luck.
If there is an post or answer or solution that already exist please 
advise and I'll keep on looking.

I am setting up a document the format of which is required.  Different 
source files will be used. As an example:

Table to radio:

TBLNAME: SCHEDA1
#+ORGTBL: SEND SCHEDA1 orgtbl-to-latex  :splice t :skip 2
| Date | Description                            | Value | Basis | Loss |
| -------+---------------------------------------+---------+--  
-----+--------|
|          | None                                      |   0.00 |  0.00 
| 0.00 |
|          | Total Gains on sales, etc.     |            |           | 
0.00 |

#+TBLFM: @>$>=vsum(@2..-1);%.2f::$5=vsum($3-$4);%.2f

Target table much further down:

Schedule A-1
\begin{tabulary}{parameters}
Date & \multicolumn{1}{c}{Transaction} & \multicolumn{1}{c}{Proceeds} & 
\multicolumn{1}{c}{Basis} & \multicolumn{1}{c}{Gain}\\
\hline \hline
% BEGIN RECEIVE ORGTBL SCHEDA1
% END RECEIVE ORGTBL SCHEDA1
\end{tabulary}

Result after C-c C-c on SCHEDA1

\begin{tabulary}{parameters}
Date & \multicolumn{1}{c}{Transaction} & \multicolumn{1}{c}{Proceeds} & 
\multicolumn{1}{c}{Basis} & \multicolumn{1}{c}{Gain}\\
\hline \hline
% BEGIN RECEIVE ORGTBL SCHEDA1
None & 0.00 & 0.00 & 0.00 \\
Total Gains on sales, etc. & & & 0.00 \\
% END RECEIVE ORGTBL SCHEDA1
\end{tabulary}

As you will observe, the empty column is not radioed, i.e. there is no 
"&" preceding the "None" and the "Total Gains . . . ." AFAIC, it should 
be unnecessary to enter something in the original first column prior to 
sending just to have orgtbl-to-latex correctly radio what should be an 
empty column. At the moment the only hack or kludge (pardon me if I use 
these incorrectly) is to place the "&" prior to "None" and "Total" after 
conversion to LaTeX.  Again, however, this also should not be necessary 
in the first place, i.e. | | foo| bar| should yield & & foo & bar \\

Anyway,  Texworks typesets this as

Date                            Transaction            Proceeds        
Basis        Gain
---------------------------------------------------------------------------------------------- 
(the two \hlines are printed)
None                            0.00                        0.00        
         0.00
Total Gains on sales                                                    
        0.00

For reasons that are not germane, I want to radio only the "data" rows 
from the original ORGTBL, i.e. no headings or hlines since these will be 
provided in what is essentially a LaTeX template.
Also, the table cannot be omitted from the account.

Charlie Millar

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

* Re: orgtbl-to-latex :splice t :skip x does not radio empty first column
  2012-06-13 20:57 orgtbl-to-latex :splice t :skip x does not radio empty first column Charles
@ 2012-06-13 21:16 ` Charles
  0 siblings, 0 replies; 2+ messages in thread
From: Charles @ 2012-06-13 21:16 UTC (permalink / raw)
  To: emacs-orgmode

First I neglected to mention that I am using Org-mode 7.8.11, Emacs 
24.0.93.1 on Windows 7.

Second my example at the end should be | | foo| bar| should yield & foo 
& bar \\

Charlie Millar

On 6/13/2012 4:57 PM, Charles wrote:
> I have searched "radio table", "skip" and "splice" and have attempted 
> to understand some of the code in org-table.el concerning 
> orgtbl-to-latex; all with no luck.
> If there is an post or answer or solution that already exist please 
> advise and I'll keep on looking.
>
> I am setting up a document the format of which is required.  Different 
> source files will be used. As an example:
>
> Table to radio:
>
> TBLNAME: SCHEDA1
> #+ORGTBL: SEND SCHEDA1 orgtbl-to-latex  :splice t :skip 2
> | Date | Description                            | Value | Basis | Loss |
> | -------+---------------------------------------+---------+--  
> -----+--------|
> |          | None                                      |   0.00 |  
> 0.00 | 0.00 |
> |          | Total Gains on sales, etc.     |            |           | 
> 0.00 |
>
> #+TBLFM: @>$>=vsum(@2..-1);%.2f::$5=vsum($3-$4);%.2f
>
> Target table much further down:
>
> Schedule A-1
> \begin{tabulary}{parameters}
> Date & \multicolumn{1}{c}{Transaction} & \multicolumn{1}{c}{Proceeds} 
> & \multicolumn{1}{c}{Basis} & \multicolumn{1}{c}{Gain}\\
> \hline \hline
> % BEGIN RECEIVE ORGTBL SCHEDA1
> % END RECEIVE ORGTBL SCHEDA1
> \end{tabulary}
>
> Result after C-c C-c on SCHEDA1
>
> \begin{tabulary}{parameters}
> Date & \multicolumn{1}{c}{Transaction} & \multicolumn{1}{c}{Proceeds} 
> & \multicolumn{1}{c}{Basis} & \multicolumn{1}{c}{Gain}\\
> \hline \hline
> % BEGIN RECEIVE ORGTBL SCHEDA1
> None & 0.00 & 0.00 & 0.00 \\
> Total Gains on sales, etc. & & & 0.00 \\
> % END RECEIVE ORGTBL SCHEDA1
> \end{tabulary}
>
> As you will observe, the empty column is not radioed, i.e. there is no 
> "&" preceding the "None" and the "Total Gains . . . ." AFAIC, it 
> should be unnecessary to enter something in the original first column 
> prior to sending just to have orgtbl-to-latex correctly radio what 
> should be an empty column. At the moment the only hack or kludge 
> (pardon me if I use these incorrectly) is to place the "&" prior to 
> "None" and "Total" after conversion to LaTeX.  Again, however, this 
> also should not be necessary in the first place, i.e. | | foo| bar| 
> should yield & & foo & bar \\
>
> Anyway,  Texworks typesets this as
>
> Date                            Transaction            Proceeds        
> Basis        Gain
> ---------------------------------------------------------------------------------------------- 
> (the two \hlines are printed)
> None                            0.00                        
> 0.00                0.00
> Total Gains on 
> sales                                                           0.00
>
> For reasons that are not germane, I want to radio only the "data" rows 
> from the original ORGTBL, i.e. no headings or hlines since these will 
> be provided in what is essentially a LaTeX template.
> Also, the table cannot be omitted from the account.
>
> Charlie Millar
>
>
>
>
>
>
>
>
> -----
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 10.0.1424 / Virus Database: 2433/5067 - Release Date: 06/13/12
>
>

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

end of thread, other threads:[~2012-06-13 21:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 20:57 orgtbl-to-latex :splice t :skip x does not radio empty first column Charles
2012-06-13 21:16 ` Charles

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