|
From: Mojca M. <moj...@gm...> - 2013-10-10 12:19:19
|
On Wed, Oct 9, 2013 at 7:36 PM, Ethan A Merritt wrote:
> On Wednesday, 09 October, 2013 15:26:29 Mojca Miklavec wrote:
>>
>> What about something more in the spirit of decimalsign?
>> set decimalsign ','
>
> That doesn't really seem any easier than "set format".
> Either way you have to specify what you want if it's not already
> the default.
>
>> This would allow a much better flexibility, also because one wouldn't
>> need to change the format at all. With your suggestion one would need
>> to set both
>> set format x "%H"
>> set format y "%H"
>> and maybe at some other places displaying numerical values while
>> setting multiplication sign could be done once and for all.
>
> "set format '%H'" is sufficient. You don't need to set it separately for x and y.
It's not just about simplicity, but also about configurability. Let's
say that a user would want
3×10<sup>6</sup>
rather than
3x10<sup>6</sup>
even if UTF-8 isn't recognized.
If a particular user will want a dot (1.10^12) or a bit of extra space
around the multiplication sign or some other weird character, this
would be easy to do. And you would also pollute less letter space: %H
could be used later for a different meaning.
> A related question:
>
> At the moment the new code checks for TERM_IS_LATEX and if so
> replaces the default format "%h" with "$%h$". I.e. it uses the same
> format but wraps it in $...$ so that LaTeX uses numerical mode.
> Would it be a good idea to _always_ do this? Or maybe always do
> it if the format does not already contain $ signs?
What exactly do you mean with "always"? If I use "set title 'some
text'" I don't want it to be enclosed in dollar signs for example.
Which cases exactly fall under "alway wrap it in $...$"?
In my old scripts I was often using something like (please excuse me
if I used the wrong format specifiers here):
set format y "\\m{%t}{%T}"
where the master document defined
\def\m#1#2{$#1\cdot10^{#2}$}
I guess this would fail then?
The reason why I did this was because specifying
set format y "$%t\\cdot10^{%T}$"
led to cca. 12 extra characters in calculation of the string length
and I ended up with way too much empty space. I believe this space
calculations is partially fixed now (even though still not perfect).
Mojca
|