Received: from mout.gmx.net (mout.gmx.net [212.227.17.22]) by h1439878.stratoserver.net (8.14.4/8.14.4/Debian-2ubuntu2.1) with ESMTP id t7RBc5Xd001711 for ; Thu, 27 Aug 2015 13:38:06 +0200 Received: from relay2.uni-heidelberg.de ([129.206.210.211]) by mx-ha.gmx.net (mxgmx105) with ESMTPS (Nemesis) id 0Mh71h-1Z97OJ2Zqz-00MHdc for ; Thu, 27 Aug 2015 13:37:59 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [129.206.100.94]) by relay2.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7RBWOUo011642 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Aug 2015 13:32:24 +0200 Received: from listserv.uni-heidelberg.de (listserv.uni-heidelberg.de [127.0.0.1]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7R7lDed009966; Thu, 27 Aug 2015 13:32:23 +0200 Received: by LISTSERV.UNI-HEIDELBERG.DE (LISTSERV-TCP/IP release 16.0) with spool id 12520298 for LATEX-L@LISTSERV.UNI-HEIDELBERG.DE; Thu, 27 Aug 2015 13:32:23 +0200 Received: from relay.uni-heidelberg.de (relay.uni-heidelberg.de [129.206.100.212]) by listserv.uni-heidelberg.de (8.13.8/8.13.8) with ESMTP id t7RBWNlx011598 for ; Thu, 27 Aug 2015 13:32:23 +0200 Received: from smtp4.clear.net.nz (smtp4.clear.net.nz [203.97.37.64]) by relay.uni-heidelberg.de (8.14.1/8.14.1) with ESMTP id t7RBWDi0007849 for ; Thu, 27 Aug 2015 13:32:16 +0200 Received: from mxin2-orange.clear.net.nz (lb1-srcnat.clear.net.nz [203.97.32.236]) by smtp4.clear.net.nz (CLEAR Net Mail) with ESMTP id <0NTQ00CIXO1M8130@smtp4.clear.net.nz> for LATEX-L@listserv.uni-heidelberg.de; Thu, 27 Aug 2015 23:32:12 +1200 (NZST) Received: from 118-92-67-97.dsl.dyn.ihug.co.nz (HELO [127.0.0.1]) ([118.92.67.97]) by smtpin2.clear.net.nz with ESMTP; Thu, 27 Aug 2015 23:32:10 +1200 MIME-version: 1.0 Content-type: multipart/alternative; boundary=------------040208050300010305040000 X-Antivirus: avast! (VPS 150827-0, 27/08/2015), Outbound message X-Antivirus-Status: Clean References: <55DBB7F6.1070307@clear.net.nz> <55DABA1D.3050706@morningstar2.co.uk> <55DCFDF7.7080305@clear.net.nz> <55DEC161.4050901@morningstar2.co.uk> User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 Message-ID: <55E0006D.8010100@clear.net.nz> Date: Thu, 27 Aug 2015 23:32:13 -0700 Reply-To: Mailing list for the LaTeX3 project Sender: Mailing list for the LaTeX3 project From: aparsloe Subject: Re: Catcode changes To: LATEX-L@LISTSERV.UNI-HEIDELBERG.DE In-Reply-To: <55DEC161.4050901@morningstar2.co.uk> Precedence: list List-Help: , List-Unsubscribe: List-Subscribe: List-Owner: List-Archive: Envelope-To: X-GMX-Antispam: 0 (Mail was not recognized as spam); Detail=V3; X-GMX-Antivirus: 0 (no virus found) X-UI-Filterresults: notjunk:1;V01:K0:c6NBBi+cMGg=:8aMxVuuSl4Tmw6RGDrDDmoPk26 WmVw9EdV7AGTcfvacZ8shQmnlHMTqQW+d0B67aX4MQj0PVcFkocxxSVhq7WsdegJXYBi3OTJK 40Xw3/+CWzpTo7V9oIusDIbM9Z5XII5MG0GOG4RpIenMd2RD/xmX3VfKZNcN6k0TFBRr6so9w olbz6ldWUDprC0F1ri4Jj45gDEIQ3w6BRUZoRaUoOwdvmb8hDK3ez4EpcNsX42q/XCQpUUXxP wssL+E9Ra2aflEEtzaIcFls3kpduaZagOhOMexsKKh/+gOoBlWHh7yPFbBKh5VDfCtKJcduyB OmpV8tcwMOvFWtoQ6m831ioFAfpwgh3XEm1xmcZaCjnoIyKEbhGhLevg7GjrNJB0rQuKJqDmk hK+WaAR5n6dT1rzDnfIDvAHZ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X12Ud/ UCZjst1+yBSqpaMpQTMgqLi3S0AUjr5ws/AzazObo1CYW1S+xqhL2D3XdtQcGH7XzeB6QVMXv W4BSUAqnTk6QAcPWASHU= X-UI-Loop:V01:abIHVGOUIJk=:UyTgoE8oWajZ7xPLfvdh+kxnWs38T+DI7ZPHFyBD6Iw= X-UI-Out-Filterresults: notjunk:1;V01:K0:DMCUATTkQHY=:CdiStFW5nDAc7T14Zdms6Y Q+OpARgTtodvqOFUWkvpGg+Qb/F8JblP2bG9fYTe0KR3V6jLmrx7EIG0UNBNkZHeGZkQjsubH YmvqHISdktDFV9cD8YunnTcAgivedGtcTfz2YvAiKLofsGcbos3BqZKQxJHp/Rcc6IxCzL8VQ XKr1ANz31JGXj4v4Dy0+3RSeLGxDOQsdoyyz+vN//43MOmDHZGMHpj/G1g/Tv1cwcUXhHdcmL 3G8qUj0aovmQof75cw7xoZadt/J0ZWj+JHxJKlHuOHdxg7w5xFWJ9Ij2WQTOXyIreULILcn8+ MaBWX3nwbG1JRzsq8OIWTlWDIOaKRGjNnRf+vfpQO59/Epa6XgU3giQVXZgtoiyoPrlXq/k+i raxfAaELsblQMSJJW7lOMEU3PuZVPP/myUgeZz3sKcBhkKJEF3oWXKUfImAqBOUq3l45vXvJ6 IuNFEaSbg8XmHqX0cwzhw9jgFQE8C53duJ+EpQn9AuRnpRMN8qz2 X-Scanned-By: MIMEDefang 2.71 on 85.214.41.38 Status: R X-Status: X-Keywords: X-UID: 7854 This is a multi-part message in MIME format. --------------040208050300010305040000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 27/08/2015 12:50 a.m., Joseph Wright wrote: > On 26/08/2015 00:44, aparsloe wrote: >> (2) Using \fp_to_scientific:n on the result of an l3fp calculation >> produces, say, 6.023e23. I want to write this as 6.023 \times 10^{23}, >> but the "e" of 6.023e23 doesn't have its "usual" catcode so >> \tl_replace_once:Nnn doesn't find the "e". (I presume "e" has catcode >> "other" -- I haven't checked.) Hence I rescan 6.023e23 with an empty >> setup and then use \tl_replace_once:Nnn (which now does find the "e"). > Your question has prompted us to take another look at > \fp_to_scientific:n/\fp_to_tl:n. The catcode of "e" is clearly not > expected here: I'm going to adjust to produce a 'letter'. We are > wondering about the wider use case for \fp_to_scientific:n: as it stands > the code doesn't *always* produce a number of the for > > [-].e[-] > > so it can't be parsed without some testing. That's little different to > \fp_to_tl:n, which in many ways might be more generally useful. Can you > fill us in on your use? > > Joseph > > P.S. Something seems to be up with your system/e-mail date settings: all > of your mail is from the future! > I had noticed that for numbers in the range 0 < number < 10 that there was no "e" and one had to test for this case. As indicated in an earlier (even if from the future) email I've written a package that evaluates latex mathematical expressions by converting them to l3fp expressions, for use with the preview facility in LyX. The expectation is that the output of calculations will be typeset. Hence, for instance, to calculate Boltzmann's constant k from the gas constant R and Avogadro's number N, form the quotient R/N. Since these numbers are presented in tables in scientific notation, in text one would write them in that form and expect their quotient, when evaluated, to be similarly presented: 1.38\times10^{16} (rather than the 1.38e16 output by l3fp). With my package one might write: "$k=R/N=8.314\times10^{7}/6.023\times10^{23}$ which evaluates to $\clyx(8.314\times10^{7}/6.023\times10^{23})[19e]$". One writes the numerical fraction only once, copy-&-pasting it into the \clyx command which converts to fp form (in this simple case by substituting * for \times) and evaluates the expression. In LyX the math stuff is entered in so-called math insets and the calculation is done "before one's eyes" so that one can see the result while continuing writing further text. Andrew [The system date on my computer is correct. I can't see a setting for time in Thunderbird. But I do live reasonably close to the International Date Line.] LyX Document --- This email has been checked for viruses by Avast antivirus software. https://www.avast.com/antivirus --------------040208050300010305040000 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit On 27/08/2015 12:50 a.m., Joseph Wright wrote:
On 26/08/2015 00:44, aparsloe wrote:
(2) Using \fp_to_scientific:n on the result of an l3fp calculation
produces, say, 6.023e23. I want to write this as 6.023 \times 10^{23},
but the "e" of 6.023e23 doesn't have its "usual" catcode so
\tl_replace_once:Nnn doesn't find the "e". (I presume "e" has catcode
"other" -- I haven't checked.) Hence I rescan 6.023e23 with an empty
setup and then use \tl_replace_once:Nnn (which now does find the "e").
Your question has prompted us to take another look at
\fp_to_scientific:n/\fp_to_tl:n. The catcode of "e" is clearly not
expected here: I'm going to adjust to produce a 'letter'. We are
wondering about the wider use case for \fp_to_scientific:n: as it stands
the code doesn't *always* produce a number of the for

  [-]<digits>.<digits>e[-]<digits>

so it can't be parsed without some testing. That's little different to
\fp_to_tl:n, which in many ways might be more generally useful. Can you
fill us in on your use?

Joseph

P.S. Something seems to be up with your system/e-mail date settings: all
of your mail is from the future!

I had noticed that for numbers in the range 0 < number < 10 that there was no "e" and one had to test for this case.

As indicated in an earlier (even if from the future) email I've written a package that evaluates latex mathematical expressions by converting them to l3fp expressions, for use with the preview facility in LyX. The expectation is that the output of calculations will be typeset. Hence, for instance, to calculate Boltzmann's constant k from the gas constant R and Avogadro's number N, form the quotient R/N. Since these numbers are presented in tables in scientific notation, in text one would write them in that form and expect their quotient, when evaluated, to be similarly presented: 1.38\times10^{16} (rather than the 1.38e16 output by l3fp). With my package one might write: "$k=R/N=8.314\times10^{7}/6.023\times10^{23}$ which evaluates to $\clyx(8.314\times10^{7}/6.023\times10^{23})[19e]$". One writes the numerical fraction only once, copy-&-pasting it into the \clyx command which converts to fp form (in this simple case by substituting * for \times) and evaluates the expression. In LyX the math stuff is entered in so-called math insets and the calculation is done "before one's eyes" so that one can see the result while continuing writing further text.

Andrew
[The system date on my computer is correct. I can't see a setting for time in Thunderbird. But I do live reasonably close to the International Date Line.]
LyX Document



Avast logo

This email has been checked for viruses by Avast antivirus software.
www.avast.com


--------------040208050300010305040000--