1

This question already has an answer here:

I would like to use a number that is a fraction of one constant and one argument of function. I tried:

\newcommand{\myfunction}[1]{
\newcommand{\tailleimg}{0.95/#1}
}

But I get an error

! Illegal unit of measure (pt inserted).

Adding units after the fraction does not solve the problem. What can I do?

marked as duplicate by Mico, Marco Daniel, Paul Gaborit, ChrisS, Jesse Mar 1 '14 at 8:24

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.