Re: \textwidth

#18517
Up
0
Down
::


Grazie grazie.. qualcosa sono riuscito a combinare.. ma adex vorrei definire dei comandi per accorciarmi il lavoro…

e mi da questo errore..

`
Runaway argument?
{
! Paragraph ended before \factor was complete.

\par
`

e questo è il codice..

`
\makeatletter
\newcommand*{\factor}[1]{\number\numexpr\dimexpr#1/\unitlength\relax}
\makeatother

\newcommand{\rectangle}[2]{
\put(\factor{.006\textwidth}-\factor{#1},\factor{#2}){\framebox(\factor{.05\textwidth}, \factor{.025\textwidth})}
}

\begin{document}

\setlength{\unitlength}{1pt}
\begin{picture}(\factor{\textwidth},\factor{1.2\textwidth})
\rectangle{\factor{.06\textwidth},\factor{1.1\textwidth}}
\end{picture}

\end{document}`

Go to top