[texhax] calcualtions witihn newcommand

Christopher Olah christopherolah.co at gmail.com
Sun Dec 13 18:01:43 CET 2009


If, in the future, you need something more powerful and easier to use,
you may wish to look into pgf and tikz...

On Sat, Dec 12, 2009 at 6:04 PM, Paul Isambert <zappathustra at free.fr> wrote:
> You can do this:
>
> \newcount\tempnumber
> \newcommand\mycommand[1]{%
>  \tempnumber=#1%
>  \multiply\tempnumber by10
> % Then somewhere in your code, for instance:
>  \put(\tempnumber,5){...}%
>  }
>
> Paul
>
> Selon sheltraw at berkeley.edu:
>
>> Good day LaTex users
>>
>> I am writing a new command that takes as an argument a number. I would like
>> to perform a simple multiplication of that number by 10 and then use its
>> numeric result as an argument to the \put command (used in the picture
>> environment). How can I do this?
>>
>> Thanks for your help!
>>
>> _______________________________________________
>> TeX FAQ: http://www.tex.ac.uk/faq
>> Mailing list archives: http://tug.org/pipermail/texhax/
>> More links: http://tug.org/begin.html
>>
>> Automated subscription management: http://tug.org/mailman/listinfo/texhax
>> Human mailing list managers: postmaster at tug.org
>>
>
>
> _______________________________________________
> TeX FAQ: http://www.tex.ac.uk/faq
> Mailing list archives: http://tug.org/pipermail/texhax/
> More links: http://tug.org/begin.html
>
> Automated subscription management: http://tug.org/mailman/listinfo/texhax
> Human mailing list managers: postmaster at tug.org
>



-- 
Christopher Olah
Email:   christopherolah.co at gmail.com


More information about the texhax mailing list