[pstricks] psPrintValue and psPrintValueNew

Herbert Voss Herbert.Voss at FU-Berlin.DE
Sun Dec 10 22:52:03 CET 2017


Am 07.12.2017 um 21:43 schrieb Poul Riis:
> In the project below I just tested some features of pst-tools.
> I wonder why psPrintValue prints 1 decimal even if I have the option 
> decimals=0, whereas psPrintValueNew prints the binomial coefficient as 
> an integer (as intended).
> On the other hand, the option postString seems to work with psPrintValue 
> but not with psPrintValueNew.
> Where can I find documentation on psPrintValueNew? Is it new or obsolete?

It was "new" years ago and maybe finished some day ... and, of course,
it is not documented.

Herbert

> Would it be possible to furthermore improve psPrintValue as to minimize 
> the need for manual horizontal adjustments when combining text and 
> postscript variables printed with psPrintValue? Or can I do it more 
> elegantly with the existing psPrintValue command?
> 
> 
> Poul Riis
> 
> 
> 
> 
> \documentclass[a4paper,12pt]{article}
> \usepackage{pst-tools}
> \usepackage{pstricks-add}
> \usepackage[fleqn]{amsmath}
> \usepackage[left=1.5cm,top=1.5cm,right=1.5cm,bottom=1.5cm]{geometry}
> \pagestyle{empty}
> \begin{document}
> \begin{pspicture}(0,0)(16,8)
>          \pstVerb{/PP [3 4] def /QQ [7 5] def /PplusQ PP QQ cxadd def 
> /PmulQ PP QQ cxmul def}
> 
> %Binomial coefficient, K(6,3):
>          \uput{3pt}[0]{0}(1,0){$\begin{pmatrix}6\\3\end{pmatrix}=$\psPrintValue[decimals=0]{6 3 MoverN}}
>          \uput{3pt}[0]{0}(10,0){$\begin{pmatrix}6\\3\end{pmatrix}=$\psPrintValueNew[decimals=0]{6 3 MoverN}}
> 
> %Complex multiplication:
>          \uput{3pt}[0]{0}(1,2){$($\psPrintValue[postString=+]{PP 0 
> get}\psPrintValue[xShift=10,postString=i]{PP 1 
> get}$\hspace{1.5em})\cdot($\psPrintValue[postString=+]{QQ 0 
> get}\psPrintValue[xShift=10,postString=i]{QQ 1 
> get}$\hspace{1.5em})=$\psPrintValue[postString=+]{PmulQ 0 
> get}\psPrintValue[xShift=10,postString=i]{PmulQ 1 get}}
>          \uput{3pt}[0]{0}(10,2){$($\psPrintValueNew[postString=+]{PP 0 
> get}\psPrintValueNew[xShift=10,postString=i]{PP 1 
> get}$\hspace{1.5em})\cdot($\psPrintValueNew[postString=+]{QQ 0 
> get}\psPrintValueNew[xShift=10,postString=i]{QQ 1 
> get}$\hspace{1.5em})=$\psPrintValueNew[postString=+]{PmulQ 0 
> get}\psPrintValueNew[xShift=10,postString=i]{PmulQ 1 get}}
>          \uput{3pt}[0]{0}(1,4){psPrintValue}
>          \uput{3pt}[0]{0}(10,4){psPrintValueNew}
> \end{pspicture}
> \end{document}
> 
> 
> 
> _______________________________________________
> PSTricks mailing list
> PSTricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
> archive: http://www.tug.org/pipermail/pstricks/
> 



More information about the PSTricks mailing list