[pstricks] Defining a command

Konrad Viltersten konrad at viltersten.com
Thu Jul 5 00:40:46 CEST 2007


I asked this question on the usenet but realized that
it's fitting here a lot better. Sorry for repetition.

I've defined the following command.

\newcommand{\something}[4]
{\pspolygon (#1,#2) (#3,#2) (#3,#4) (#1,#4)}

As i've been rectangling a lot, it was extremely useful.
Now, i'll be rombing for a while but i seem to get stuck
on how to define it so i only need to specify two points
when calling it...

It will be something like this.

\newcommand{\something}[4]
{\pspolygon
    (#1,#2)
    (#3,#4)
    (2 * #3 - #1,#2)
    (#3,2 * #2 - #4)}

Now, the problem is that i still don't really get how to
perform multiplication and subtraction inside there.
Suggestions?

--
Vänligen
Konrad
---------------------------------------------------

Sleep - thing used by ineffective people
            as a substitute for coffee

Ambition - a poor excuse for not having
                 enough sence to be lazy
--------------------------------------------------- 




More information about the PSTricks mailing list