emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [BUGs?] TBLFM & export to LaTeX
@ 2009-01-13 16:04 Giovanni Ridolfi
  2009-01-17 14:10 ` Carsten Dominik
  0 siblings, 1 reply; 2+ messages in thread
From: Giovanni Ridolfi @ 2009-01-13 16:04 UTC (permalink / raw)
  To: emacs-orgmode

Hi, everyone,

I have a problem with 
1. formulas in table and
2. LaTeX export of tables

Org-mode version 6.17c
GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
Win XP

---------Hydrogen.org----------

    -*- mode: org; -*-

* TBLFM: references and columns
I do not consider the "first" column with #
and I assume that "1st \n Temp" is the first column

|   |  1st |        |    3rd |      4th |              |         6th |
|   | Temp |   Temp |  EXPNS | $\alpha$ | $\alpha_{c}$ | Calcd EXPNS |
|   |      |    (K) |        |          |         x1e6 |        x1e6 |
|---+------+--------+--------+----------+--------------+-------------|
| / |    < |        |        |        > |            < |           > |
| ! |      |      T |        |          |          c_a |      c_expn |
| # |   20 |    293 |      0 |  4.78e-6 |         4.78 |           0 |
| # |      |    294 |        |          |              |             |
| # |   27 |    300 |  34e-6 |  4.82e-6 |         4.82 |          34 |
| # |      |    303 |        |          |              |             |
| # |      |    313 |        |          |              |             |
| # |   47 |    320 | 131e-6 |  4.91e-6 |         4.91 |         131 |
| # |      |    323 |        |          |              |         146 |
| # |      |    333 |        |          |              |         195 |
| # |   67 |    340 |    230 |  4.99e-6 |         4.99 |         230 |
|---+------+--------+--------+----------+--------------+-------------|
| $ |      | T0=293 |        |          |              |             |
#+TBLFM: $2=$T-273.15;%.0f::$c_a=0.8651+2.3569e-2*$3-4.2277e-5($3^2)+2.5408e-8*($3^3);%.2f::$c_expn=0.8651*($3-T0)+2.3569e-2*0.5*($3^2-T0^2)-4.2277e-5*0.3333333333*($3^3-T0^3)+2.5408e-8*0.25*($3^4-T0^4);%.0f

If I C-c on the TBLFM only the first formula is applied: 
$2=$T-273.15;%.0f
The other columns remain the same.
   Perhaps the numbering is wrong and I should also consider 
   the column with #, but it worked with version org-6.15d

On the other hand if I C-c on the TBLFM of the following 
table it /works/.
The formula is different in some ways:

1. columns are referred to with numbers and not names
2. T0 is substituted by its value (and not used as a parameter)
3. the numbering of columns considers the column with #s
   as the first column
 
 $1
   
|    |   $2 |        |        |       $5 |              | $7          |
|    | Temp |   Temp |  EXPNS | $\alpha$ | $\alpha_{c}$ | Calcd EXPNS |
|    |      |    (K) |        |        4 |         x1e6 | x1e6        |
|----+------+--------+--------+----------+--------------+-------------|
| /  |    < |        |        |        > |            < | >           |
| !  |      |      T |        |          |          c_a | c_expn      |
| #  |   20 |    293 |      0 |  4.78e-6 |         4.78 | 0           |
| #  |      |    294 |        |          |              |             |
| #  |   27 |    300 |  34e-6 |  4.82e-6 |         4.82 | 34          |
| #  |      |    303 |        |          |              |             |
| #  |      |    313 |        |          |              |             |
| #  |   47 |    320 | 131e-6 |  4.91e-6 |         4.91 | 131         |
| #  |      |    323 |        |          |              |             |
| #  |      |    333 |        |          |              |             |
| #  |   67 |    340 |    230 |  4.99e-6 |         4.99 | 230         |
|----+------+--------+--------+----------+--------------+-------------|
| $  |      | T0=293 |        |          |              |             |
#+TBLFM:$2=$3-273.15;%.0f::$6=0.8651+2.3569e-2*$3-4.2277e-5($3^2)+2.5408e-8*($3^3);%.2f::$7=0.8651*($3-293)+2.3569e-2*0.5*($3^2-293^2)-4.2277e-5*0.3333333333*($3^3-293^3)+2.5408e-8*0.25*($3^4-293^4);%.0f

*  LaTeX export of columns with #
The previous columns are exported to a LaTeX file with 
the column with #s, whereas this column does not appear 
in the HTML export.
I think this is a bug.

--------------------------------------------

cheers,
Giovanni





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

* Re: [BUGs?] TBLFM & export to LaTeX
  2009-01-13 16:04 [BUGs?] TBLFM & export to LaTeX Giovanni Ridolfi
@ 2009-01-17 14:10 ` Carsten Dominik
  0 siblings, 0 replies; 2+ messages in thread
From: Carsten Dominik @ 2009-01-17 14:10 UTC (permalink / raw)
  To: giovanni.ridolfi; +Cc: emacs-orgmode

Hi Giovanni,

On Jan 13, 2009, at 5:04 PM, Giovanni Ridolfi wrote:

> Hi, everyone,
>
> I have a problem with
> 1. formulas in table and
> 2. LaTeX export of tables
>
> Org-mode version 6.17c
> GNU Emacs 22.3.1 (i386-mingw-nt5.1.2600) of 2008-09-06 on SOFT-MJASON
> Win XP
>
> ---------Hydrogen.org----------
>
>    -*- mode: org; -*-
>
> * TBLFM: references and columns
> I do not consider the "first" column with #
> and I assume that "1st \n Temp" is the first column
>
> |   |  1st |        |    3rd |      4th |              |         6th |
> |   | Temp |   Temp |  EXPNS | $\alpha$ | $\alpha_{c}$ | Calcd EXPNS |
> |   |      |    (K) |        |          |         x1e6 |        x1e6 |
> |---+------+--------+--------+----------+--------------+-------------|
> | / |    < |        |        |        > |            < |           > |
> | ! |      |      T |        |          |          c_a |      c_expn |
> | # |   20 |    293 |      0 |  4.78e-6 |         4.78 |           0 |
> | # |      |    294 |        |          |              |             |
> | # |   27 |    300 |  34e-6 |  4.82e-6 |         4.82 |          34 |
> | # |      |    303 |        |          |              |             |
> | # |      |    313 |        |          |              |             |
> | # |   47 |    320 | 131e-6 |  4.91e-6 |         4.91 |         131 |
> | # |      |    323 |        |          |              |         146 |
> | # |      |    333 |        |          |              |         195 |
> | # |   67 |    340 |    230 |  4.99e-6 |         4.99 |         230 |
> |---+------+--------+--------+----------+--------------+-------------|
> | $ |      | T0=293 |        |          |              |             |
> #+TBLFM: $2=$T-273.15;%.0f::$c_a=0.8651+2.3569e-2* 
> $3-4.2277e-5($3^2)+2.5408e-8*($3^3);%.2f::$c_expn=0.8651*($3- 
> T0)+2.3569e-2*0.5*($3^2-T0^2)-4.2277e-5*0.3333333333*($3^3- 
> T0^3)+2.5408e-8*0.25*($3^4-T0^4);%.0f
>
> If I C-c on the TBLFM only the first formula is applied:
> $2=$T-273.15;%.0f
> The other columns remain the same.
>   Perhaps the numbering is wrong and I should also consider
>   the column with #, but it worked with version org-6.15d


The special column does count as column 1 when it comes to column
numbers.  This was always like this, no changes recently.

>
>
> On the other hand if I C-c on the TBLFM of the following
> table it /works/.
> The formula is different in some ways:
>
> 1. columns are referred to with numbers and not names

Both should work.

>
> 2. T0 is substituted by its value (and not used as a parameter)

I tested it with using $T0 and it worked fine.

>
> 3. the numbering of columns considers the column with #s
>   as the first column

Yes, this you must do.

>
>
> $1
>
> |    |   $2 |        |        |       $5 |              |  
> $7          |
> |    | Temp |   Temp |  EXPNS | $\alpha$ | $\alpha_{c}$ | Calcd  
> EXPNS |
> |    |      |    (K) |        |        4 |         x1e6 |  
> x1e6        |
> |----+------+--------+--------+----------+-------------- 
> +-------------|
> | /  |    < |        |        |        > |            < |  
> >           |
> | !  |      |      T |        |          |          c_a |  
> c_expn      |
> | #  |   20 |    293 |      0 |  4.78e-6 |         4.78 |  
> 0           |
> | #  |      |    294 |        |          |               
> |             |
> | #  |   27 |    300 |  34e-6 |  4.82e-6 |         4.82 |  
> 34          |
> | #  |      |    303 |        |          |               
> |             |
> | #  |      |    313 |        |          |               
> |             |
> | #  |   47 |    320 | 131e-6 |  4.91e-6 |         4.91 |  
> 131         |
> | #  |      |    323 |        |          |               
> |             |
> | #  |      |    333 |        |          |               
> |             |
> | #  |   67 |    340 |    230 |  4.99e-6 |         4.99 |  
> 230         |
> |----+------+--------+--------+----------+-------------- 
> +-------------|
> | $  |      | T0=293 |        |          |               
> |             |
> #+TBLFM:$2=$3-273.15;%.0f::$6=0.8651+2.3569e-2* 
> $3-4.2277e-5($3^2)+2.5408e-8*($3^3);%.2f:: 
> $ 
> 7 
> = 
> 0.8651 
> *($ 
> 3 
> -293 
> ) 
> + 
> 2.3569e 
> -2 
> *0.5 
> *($ 
> 3 
> ^ 
> 2 
> -293 
> ^2)-4.2277e-5*0.3333333333*($3^3-293^3)+2.5408e-8*0.25*($3^4-293^4); 
> %.0f
>
> *  LaTeX export of columns with #
> The previous columns are exported to a LaTeX file with
> the column with #s, whereas this column does not appear
> in the HTML export.
> I think this is a bug.

Yes, recently introduced when I was trying to fix the export of
special characters in table fields.

I think this is again working properly now.

- Carsten

>
>
> --------------------------------------------
>
> cheers,
> Giovanni
>
>
>
>
>
>
>
> _______________________________________________
> 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] 2+ messages in thread

end of thread, other threads:[~2009-01-17 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-13 16:04 [BUGs?] TBLFM & export to LaTeX Giovanni Ridolfi
2009-01-17 14:10 ` Carsten Dominik

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