emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Exponential numbers in latex table export
@ 2018-03-27 17:49 Günter Lichtenberg
  2018-03-28 11:55 ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Günter Lichtenberg @ 2018-03-27 17:49 UTC (permalink / raw)
  To: emacs-orgmode

Hi 

I have a document with many automatically generated tables that contain 
numbers in exponential Format, e.g. 2e09. When I export the tables to LaTeX 
and pdf I get something like 2 (-09) in the pdf, if there is no character 
after the number in the table

Minimal Example:
|--------------|
| 1.2e09 (abs) |
|      2.3e-09 |
|       3.4e09 |
|--------------|

exports to a latex table as

\begin{center}
\begin{tabular}{r}
\hline
1.2e09 (abs)\\
2.3\,(-09)\\
3.4\,(09)\\
\hline
\end{tabular}

Note that in the first line the number is an exponential, the following 2 are 
not. I could not find anything in the documentation. What am I missing?

orgmode version is 9.1.4, but the same happens with emacs 25.3 built-in 
version 8.3.

gl

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

* Re: Exponential numbers in latex table export
  2018-03-27 17:49 Exponential numbers in latex table export Günter Lichtenberg
@ 2018-03-28 11:55 ` Nicolas Goaziou
  2018-03-28 16:37   ` Günter Lichtenberg
  2018-03-29  8:37   ` Carsten Dominik
  0 siblings, 2 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2018-03-28 11:55 UTC (permalink / raw)
  To: Günter Lichtenberg; +Cc: emacs-orgmode

Hello,

Günter Lichtenberg <mail@guenterlichtenberg.de> writes:

> I have a document with many automatically generated tables that contain 
> numbers in exponential Format, e.g. 2e09. When I export the tables to LaTeX 
> and pdf I get something like 2 (-09) in the pdf, if there is no character 
> after the number in the table
>
> Minimal Example:
> |--------------|
> | 1.2e09 (abs) |
> |      2.3e-09 |
> |       3.4e09 |
> |--------------|
>
> exports to a latex table as
>
> \begin{center}
> \begin{tabular}{r}
> \hline
> 1.2e09 (abs)\\
> 2.3\,(-09)\\
> 3.4\,(09)\\
> \hline
> \end{tabular}
>
> Note that in the first line the number is an exponential, the following 2 are 
> not. I could not find anything in the documentation. What am I missing?
>
> orgmode version is 9.1.4, but the same happens with emacs 25.3 built-in 
> version 8.3.

See `org-latex-table-scientific-notation'. I also find the default value
a bit surprising. I believe it is what Carsten uses.

Regards,

-- 
Nicolas Goaziou

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

* Re: Exponential numbers in latex table export
  2018-03-28 11:55 ` Nicolas Goaziou
@ 2018-03-28 16:37   ` Günter Lichtenberg
  2018-03-29  8:37   ` Carsten Dominik
  1 sibling, 0 replies; 9+ messages in thread
From: Günter Lichtenberg @ 2018-03-28 16:37 UTC (permalink / raw)
  To: emacs-orgmode

On Wednesday, 28 March 2018 13:55:01 CEST Nicolas Goaziou wrote:

 > > 
> > \begin{center}
> > \begin{tabular}{r}
> > \hline
> > 1.2e09 (abs)\\
> > 2.3\,(-09)\\
> > 3.4\,(09)\\
> > \hline
> > \end{tabular}
> > 

> See `org-latex-table-scientific-notation'. I also find the default value
> a bit surprising. I believe it is what Carsten uses.

Hi

thanks, setting that variable to nil solves my problem. 

It was a bit puzzling to me, because of the fact that once a string is 
somewhere in the column the exponential number came out as is (I guess because 
then the table entry is no longer interpreted as a number but as a string).  
It was also confusing because HTML export is different and just puts out what 
is in the orgmode table.

Maybe one should change the default of the variable to nil? 
Just a suggestion, as I said,  my problem is solved.

Thanks again
gl 

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

* Re: Exponential numbers in latex table export
  2018-03-28 11:55 ` Nicolas Goaziou
  2018-03-28 16:37   ` Günter Lichtenberg
@ 2018-03-29  8:37   ` Carsten Dominik
  2018-03-29 15:51     ` Julius Dittmar
  1 sibling, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2018-03-29  8:37 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: org-mode list, Günter Lichtenberg

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

On Wed, Mar 28, 2018 at 1:55 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Günter Lichtenberg <mail@guenterlichtenberg.de> writes:
>
> > I have a document with many automatically generated tables that contain
> > numbers in exponential Format, e.g. 2e09. When I export the tables to
> LaTeX
> > and pdf I get something like 2 (-09) in the pdf, if there is no character
> > after the number in the table
> >
> > Minimal Example:
> > |--------------|
> > | 1.2e09 (abs) |
> > |      2.3e-09 |
> > |       3.4e09 |
> > |--------------|
> >
> > exports to a latex table as
> >
> > \begin{center}
> > \begin{tabular}{r}
> > \hline
> > 1.2e09 (abs)\\
> > 2.3\,(-09)\\
> > 3.4\,(09)\\
> > \hline
> > \end{tabular}
> >
> > Note that in the first line the number is an exponential, the following
> 2 are
> > not. I could not find anything in the documentation. What am I missing?
> >
> > orgmode version is 9.1.4, but the same happens with emacs 25.3 built-in
> > version 8.3.
>
> See `org-latex-table-scientific-notation'. I also find the default value
> a bit surprising. I believe it is what Carsten uses.
>

Hi,

I believe I ended up using this because I wanted something that is not
dependent on having math-mode in the table column.  What I would have
really preferred is "%s\times10^{%s}", but that is less stable because you
need then to know if the column will have math-mode or not.

I agree that it is a bit odd and non-standard - so maybe using nil as
default would be fine.

Carsten


>
> Regards,
>
> --
> Nicolas Goaziou
>
>

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

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

* Re: Exponential numbers in latex table export
  2018-03-29  8:37   ` Carsten Dominik
@ 2018-03-29 15:51     ` Julius Dittmar
  2018-03-29 17:29       ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Julius Dittmar @ 2018-03-29 15:51 UTC (permalink / raw)
  To: emacs-orgmode


On 29.03.2018 10:37, Carsten Dominik wrote:
> I believe I ended up using this because I wanted something that is not 
> dependent on having math-mode in the table column.  What I would have 
> really preferred is "%s\times10^{%s}", but that is less stable because
> you need then to know if the column will have math-mode or not.

How about \ensuremath{%s\times10^{%s}} ?

Julius

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

* Re: Exponential numbers in latex table export
  2018-03-29 15:51     ` Julius Dittmar
@ 2018-03-29 17:29       ` Carsten Dominik
  2018-03-29 20:14         ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2018-03-29 17:29 UTC (permalink / raw)
  To: Julius Dittmar; +Cc: org-mode list

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

On Thu, Mar 29, 2018 at 5:51 PM, Julius Dittmar <Julius.Dittmar@gmx.de>
wrote:

>
> On 29.03.2018 10:37, Carsten Dominik wrote:
>
>> I believe I ended up using this because I wanted something that is not
>> dependent on having math-mode in the table column.  What I would have
>> really preferred is "%s\times10^{%s}", but that is less stable because
>> you need then to know if the column will have math-mode or not.
>>
>
> How about \ensuremath{%s\times10^{%s}} ?


That would do the trick, yes.

Carsten

>
>
> Julius
>
>

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

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

* Re: Exponential numbers in latex table export
  2018-03-29 17:29       ` Carsten Dominik
@ 2018-03-29 20:14         ` Nicolas Goaziou
  2018-03-30 17:52           ` Carsten Dominik
  0 siblings, 1 reply; 9+ messages in thread
From: Nicolas Goaziou @ 2018-03-29 20:14 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Julius Dittmar, org-mode list

Hello,

Carsten Dominik <dominik@uva.nl> writes:

> On Thu, Mar 29, 2018 at 5:51 PM, Julius Dittmar <Julius.Dittmar@gmx.de>
> wrote:
>
>>
>> On 29.03.2018 10:37, Carsten Dominik wrote:
>>
>>> I believe I ended up using this because I wanted something that is not
>>> dependent on having math-mode in the table column.  What I would have
>>> really preferred is "%s\times10^{%s}", but that is less stable because
>>> you need then to know if the column will have math-mode or not.
>>>
>>
>> How about \ensuremath{%s\times10^{%s}} ?
>
>
> That would do the trick, yes.

So, what should be the default value :

  \ensuremath{%s\times10^{%s}}

or

  nil

I don't mind either way.

Regards,

-- 
Nicolas Goaziou

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

* Re: Exponential numbers in latex table export
  2018-03-29 20:14         ` Nicolas Goaziou
@ 2018-03-30 17:52           ` Carsten Dominik
  2018-03-30 20:21             ` Nicolas Goaziou
  0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2018-03-30 17:52 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Julius Dittmar, org-mode list

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

Hi Nicolas,

let's make it nil.

- Carsten

On Thu, Mar 29, 2018 at 10:14 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Carsten Dominik <dominik@uva.nl> writes:
>
> > On Thu, Mar 29, 2018 at 5:51 PM, Julius Dittmar <Julius.Dittmar@gmx.de>
> > wrote:
> >
> >>
> >> On 29.03.2018 10:37, Carsten Dominik wrote:
> >>
> >>> I believe I ended up using this because I wanted something that is not
> >>> dependent on having math-mode in the table column.  What I would have
> >>> really preferred is "%s\times10^{%s}", but that is less stable because
> >>> you need then to know if the column will have math-mode or not.
> >>>
> >>
> >> How about \ensuremath{%s\times10^{%s}} ?
> >
> >
> > That would do the trick, yes.
>
> So, what should be the default value :
>
>   \ensuremath{%s\times10^{%s}}
>
> or
>
>   nil
>
> I don't mind either way.
>
> Regards,
>
> --
> Nicolas Goaziou
>

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

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

* Re: Exponential numbers in latex table export
  2018-03-30 17:52           ` Carsten Dominik
@ 2018-03-30 20:21             ` Nicolas Goaziou
  0 siblings, 0 replies; 9+ messages in thread
From: Nicolas Goaziou @ 2018-03-30 20:21 UTC (permalink / raw)
  To: Carsten Dominik; +Cc: Julius Dittmar, org-mode list

Hello,

Carsten Dominik <dominik@uva.nl> writes:

> Hi Nicolas,
>
> let's make it nil.

Done.

Regards,
-- 
Nicolas Goaziou                                                0x80A93738

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

end of thread, other threads:[~2018-03-30 20:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-27 17:49 Exponential numbers in latex table export Günter Lichtenberg
2018-03-28 11:55 ` Nicolas Goaziou
2018-03-28 16:37   ` Günter Lichtenberg
2018-03-29  8:37   ` Carsten Dominik
2018-03-29 15:51     ` Julius Dittmar
2018-03-29 17:29       ` Carsten Dominik
2018-03-29 20:14         ` Nicolas Goaziou
2018-03-30 17:52           ` Carsten Dominik
2018-03-30 20:21             ` Nicolas Goaziou

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