[pstricks] Suggestions for \psPrintValue

Buddy Ledger buddyledger at gmail.com
Mon Apr 27 22:19:27 CEST 2009

>This version changes two things. First, it now adds decplaces as a  
>keyword to set the number of decimal places in the output. Second, if  
>decplaces=-1, it returns all precision in the input. Eg,  
>\fmtnum[decplaces=-1]{12.675E-002} outputs 0.12675.

Thanks Michael,

That's a nice function.  I learned alot going through the code.  
I did find one functional bug \fmtnum[decplaces=-1]{1.2670E+5} returns 10.  
Seems to me if the exponent is larger than the number of decimal places in the input the error occurs. 
\fmtnum[decplaces=-1]{1.2670E+4} works fine.

Something I'd be interested in is \fmtnum{arbitrary format number} --> chosen output format of #.# or or #.#E# or #.#x10^{#}
This is the only functionality which is absent from every number format package including siunitx.



More information about the PSTricks mailing list