LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mailing list for the LaTeX3 project <[log in to unmask]>
Wed, 16 Jul 2014 10:02:51 +1200
Mailing list for the LaTeX3 project <[log in to unmask]>
text/plain; charset=UTF-8; format=flowed
aparsloe <[log in to unmask]>
text/plain (49 lines)
On 16/07/2014 2:00 a.m., Bruno Le Floch wrote:
> On 7/12/14, aparsloe <[log in to unmask]> wrote:
>> On 12/07/2014 3:13 p.m., Bruno Le Floch wrote:
>>> Can you expand on that one exception?  I don't see what it is.
>> I found myself on occasion wanting to substitute a number in expressions
>> where  pi is followed by other terms. For instance the fine structure
>> constant is 2pi e^2/hc (where e is the electronic charge in this case)
>> but direct substitution of values for e etc. simply provokes an
>> "Undefined control sequence" message. Since numbers are not (as far as I
>> understand) elements of control sequences, this felt like an unnecessary
>> limitation. (But I'm not familiar with the underlying constraints. Hence
>> the "perhaps".)
> Not sure what you mean here.  Doing \fp_show:n { 2pi e^2/hc } gives two errors:
>      \LaTeX3 error: Unknown fp word pie.
>      \LaTeX3 error: Unknown fp word hc.
> Doing
>      \fp_const:Nn \c_aparsloe_e_fp { 1.60217657e-19 }
>      \fp_const:Nn \c_aparsloe_h_fp { 6.62606957e-34 }
>      \fp_const:Nn \c_aparsloe_c_fp { 299 792 458 }
>      \fp_show:n { 2pi \c_aparsloe_e_fp ^2 / ( \c_aparsloe_h_fp
> \c_aparsloe_c_fp ) }
> works (except that since I've used values in SI units for e, h, c, the
> formula for the fine structure constant is missing a factor of
> sqrt(4pi*epsilon0)).
>> As I've tried to indicate, I've come to realise that what matters is
>> clarity in what the rules are and the rigour of their application. My
>> concern was with people who might, at present, use a (clunky?) package
>> like calc, or fp, coming across l3fp, being seduced (like me) and coming
>> a cropper (as I did). The proposed change will certainly reduce that
>> possibility.
> I'm not sure what change you propose (besides the precedence of
> juxtaposition, which will change soonish), and it will be helpful if
> you clarify.
> Regards,
> Bruno
OK, my example, has misled. I simply wondered why pi2 (for instance)  is 
not acceptable to l3fp? And in the same vein, why is (3)2 not accepted, 
whereas (3)(2) and 3(2) are accepted? This rejection by l3fp of 
"trailing numbers" felt to me like an oversight in the otherwise 
rigorous application of juxtaposition.