[Tioga-users] formatting for numeric label
Vincent Fourmond
fourmond at gmail.com
Mon Jul 9 15:10:49 EDT 2007
Taro Sato wrote:
> I think it would be relatively easy to implement, to let a user
> specify the precise format, maybe using C string formatter, so
>
> "%+.1f"
>
> would give both control over the forcing sign to be present even for >
> 0 numbers. (this will then be processed by xaxis_numeric_label_tex).
I also wanted to modify this at some point, but I think the format
string is also way too restrictive (though, admittedly, more powerful
than what we currently have). I'm fine with implementing that right now,
but the best solution would be to be able to pass a 'block' to the
function -- that is (at least in Ruby's terms) an anonymous Ruby/Python
that would take the float as an argument and handle the formatting,
returning a string. I'm sure this is doable in Python, I know it is in
Ruby, but I'm not sure it will be easy to keep both interfaces matching...
As for the rest, you can do anything with TeX, it just takes ten times
more processing time and a good hundred times more programming time to
make real string processing -- think about docstrip !
Cheers,
Vincent
PS: I did CC you as I was too lazy to check you are in tioga-users; if
that's the case, just mention it next time ;-). Anyway, with gmail,
you're unlikely to get double messages...
More information about the Tioga-users
mailing list