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 #5433 of 5474 |
Re: {Disarmed} Re: [TXC-Users] PStricks problem

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 (lengthadjust):
the argument of \ladj is a decimal asking for a drawing a
fraction/multiple of the normal (unit??) one, which draws a soroban of
the actual size.
(I think what you need is decimal lengths??)

Hope this helps.

Alain Delmotte

\RequirePackage{calc,ifthen}
\RequirePackage{tikz}

\definecolor{brun}{rgb}{.55 .27 .08} % nouvelle couleur brune
\newcommand{\colbil}{yellow} % couleur par défaut des billes
\newcommand{\coltig}{brun} % couleur par défaut des billes

\newcounter{xx}
\newcounter{yy}
\newlength{\unba}\setlength{\unba}{1mm} % unité de base, par défaut 1mm
\newlength{\eplia}\setlength{\eplia}{3.9mm} % support et ligne centrale
\newlength{\eplib}\setlength{\eplib}{2pt} % deux barres autour ligne
centrale
\newlength{\eplic}\setlength{\eplic}{6pt} % cadre et barres extérieures
\newlength{\eplid}\setlength{\eplid}{1pt} % arrondi des billes

\newcommand{\ladj}[1]{% ajustement des longueurs
\setlength{\unba}{1mm * \real{#1}}
\setlength{\eplia}{3.9mm * \real{#1}}
\setlength{\eplib}{2pt * \real{#1}}
\setlength{\eplic}{6pt * \real{#1}}
\setlength{\eplid}{1pt * \real{#1}}
}


Arek Kuźniewski a écrit :
> 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 integer (1, 2,
> 3, ...). I need to do these operations on real A and B (1.2, 1.3, 1.25
> etc.).
> If I'm wrong, tell me, where (in your pst-soroban.sty) you can make
> +/-/* operations on the real values.
>
> (I hope my description is clear, because my English is not good).
>
> Greetings,
> Arek
>
>
> Alain Delmotte pisze:
>
>> 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 package. (Have a
>> look to pst-soroban.sty-CTAN)
>>
>> Hope this helped.
>>
>> Alain Delmotte
>>
>> Arek Kuźniewski a écrit :
>>
>>> 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.
>>>
>>>
>>
>>
>
>
> ------------------------------------
>
> Yahoo! Groups Links
>
>
>
>
>
>





Tue Aug 26, 2008 12:45 pm

delmotte46
Offline Offline
Send Email Send Email

Forward
Message #5433 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