I am trying to use calc to perform a basic multiplication of arguments of a user-defined command, like this:

 \fontsize{#1}{#1 * \real{1.2}}

But it is not working properly. Not sure if the length is being rounded to integer, of if the calc multiplication just can't operate on command parameters.

EDIT 1: I tried to change 1.2 to 12, but the output is the same. Thus, not really a rounding issue. Looks more like calc not liking to multiply parameter values.

EDIT 2: Temporary solution:

   \setlength{\tmpLength}{#1 * \real{1.2}}

Keeping no answer, in case someone can explain why the length is needed.

  • Please provide a full MWE. What I hacked together, I can't see the problem you are having. So, obviously, my MWE doesn't look like yours. – Steven B. Segletes Aug 30 '17 at 14:12

It's not really clear what you want to achieve, but you can do


\newfontfamily{\PalatinoFont}{TeX Gyre Pagella}






Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.