Search the web
Sign In
New User? Sign Up
TeXnicCenter-Users · Users of the LaTeX-IDE TeXnicCenter
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
PStricks problem   Message List  
Reply | Forward Message #5430 of 5474 |
I need to define function (in pstricks mode) for drawing lines. Function should work like this:
------------
\def\newhline(#1,#2){#3}{\psline(#1,#2)(#1+#3,#2)
------------
Of course this function doesn't work.
How can I define this function? If I needed only integer values of #1 and #3, I would do it by counters, for example:
------------
\newcounter{nhlc}
\def\newhline(#1,#2){#3}{\setcounter{nhlc}{#1}\stepcounter{nhlc}{#3}
\psline(#1,#2)(\thenhlc,#2)}
-------------
But the problem is, that I need #1 and #3 in real (e.g. #1=1.2 and #3=4.3).
The second definition doesn't work for it.

Is some way to define function for calculation #1+#3?
--
Arek

In darkness there can be light.
In misery there can be beauty.
In death there can be life.


Mon Aug 18, 2008 1:44 pm

s169440
Offline Offline
Send Email Send Email

Forward
Message #5430 of 5474 |
Expand Messages Author Sort by Date

I need to define function (in pstricks mode) for drawing lines. Function ... \def\newhline(#1,#2){#3}{\psline(#1,#2)(#1+#3,#2) ... Of course this function...
Arek Kuźniewski
s169440
Offline Send Email
Aug 18, 2008
1:45 pm

Hello, Have a look at the calc package! It brings changes to the arguments and lengths of the counters. I had the same problem when I created the pst-soroban...
Alain Delmotte
delmotte46
Offline Send Email
Aug 25, 2008
8:08 am

Hello I can't see where are you making operation on non-integer values in your pts-soroban.sty You always have A+B or A-B or A*B, but A and B are always...
Arek Kuźniewski
s169440
Offline Send Email
Aug 25, 2008
4:24 pm

Hi! You are right for pst-soroban. Here is the beginning of pgf-soroban where there is computation of new lengths with decimals in the \ladj command...
Alain Delmotte
delmotte46
Offline Send Email
Aug 26, 2008
12:46 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help