[pstricks] Including Postscript calculations in documents
Chris Sangwin
sangwinc at for.mat.bham.ac.uk
Mon Jul 30 14:28:19 CEST 2001
I had this problem also as I write a lot of mathematics and typeset
figures to illustrate it.
One package I've used quite a lot is the FP package.
Available from http://www.tex.ac.uk search for the file fp.sty
If you use multido (which, if you need to typeset any serious pictures I
think is almost indispensable....) you need to read the FP documentation
at the end.....
Regards
Chris
On 29 Jul 2001, Jay Bloodworth wrote:
> I am trying to write some macros to draw and label various parts of
> geometric figures given information about the figures side lengths and
> angles. For example, TriangleSSS{3}{4}{5} would draw a 3-4-5 right
> triangle.
>
> Drawing the figures has not been a problem; using \SpecialCoor I can
> insert the postscript that does the appropriate algebra right in the
> coordinate specifiers. The problem is that I need to use some of these
> calculated values as labels.
>
> I know that there is no way for postscript to pass a value back to tex.
> So how do I get at these calculations. I know that in theory I can do
> them in tex, but I don't think I have the patience to write tex code to
> do fixed point trig. My other thought was that since I've got my
> calculated value sitting right there on the top of the stack, I can just
> do a show to paint it using raw postscript. This works, but the output
> does not follow the current pstricks paramaters and tex-generated output
> doesn't flow around it. I guess what I asking is given a value on the
> top of the stack, can someone give me postscript code to display the
> value using current parameters and in proper relation to the tex-based
> material around it.
>
> E.G.
>
> Hi, I am \pscustom{\code{13 2 mul <pscode>}} years old
>
> should display
>
> Hi, I am 26 years old
>
> in the current font, color, etc. It is not imperative that spacing be
> perfect (with kerning, etc.), just reasonable.
>
> Any help would be appreciated.
>
> Jay
>
> _______________________________________________
> pstricks mailing list
> pstricks at tug.org
> http://tug.org/mailman/listinfo/pstricks
>
More information about the PSTricks
mailing list