graphics.sty

graphics.sty

Post by Harro Nehlse » Fri, 15 Feb 2002 18:20:12



Hi,

could somebody point me in the right direction please.

I have this code, it should print the lines in a neat circle, but somehow
it doesnt work. The lines are printed in on row after I used dvips it
prints only errormessages.

---

\documentclass[a4paper]{article}
\usepackage{ifthen}
\usepackage[dvips]{graphics}
\begin{document}

\newcounter{grd}
\setcounter{grd}{180}
\whiledo{\value{grd}>-180}{%
        \rotatebox{\value{grd}}{%
                \makebox[0pt][l]{\smash{%
                        .\hspace{12mm}Drehung um
                         $\arabic{grd}^\circ$}}}%
  \addtocounter{grd}{-15}}

\end{document}
---

I hope somebody can help me.

Thanks...

--
Harro Nehlsen....

"The sky over the port was the color of television tuned to a dead
channel..."
                                                        Neuromancer, W.Gibbson

 
 
 

graphics.sty

Post by David Kastru » Fri, 15 Feb 2002 18:44:31



> Hi,

> could somebody point me in the right direction please.

> I have this code, it should print the lines in a neat circle, but somehow
> it doesnt work. The lines are printed in on row after I used dvips it
> prints only errormessages.
> \documentclass[a4paper]{article}
> \usepackage{ifthen}
> \usepackage[dvips]{graphics}
> \begin{document}

> \newcounter{grd}
> \setcounter{grd}{180}
> \whiledo{\value{grd}>-180}{%
>         \rotatebox{\value{grd}}{%
>                 \makebox[0pt][l]{\smash{%
>                         .\hspace{12mm}Drehung um
>                          $\arabic{grd}^\circ$}}}%
>   \addtocounter{grd}{-15}}

> \end{document}

The angle of rotation is not interpreted by*but passed directly
to PostScript.  But PostScript does not know about the value of*
counters.  The solution is to pass \arabic{grd} to \rotatebox, since
PostScript understands the arabic number representation of grd
perfectly well.

--
David Kastrup, Kriemhildstr. 15, 44793 Bochum


 
 
 

graphics.sty

Post by Gert und Ulrike Fische » Fri, 15 Feb 2002 18:55:31


Harro Nehlsen schrieb:

Quote:

> Hi,

> could somebody point me in the right direction please.

> I have this code, it should print the lines in a neat circle, but somehow
> it doesnt work. The lines are printed in on row after I used dvips it
> prints only errormessages.

> ---

> \documentclass[a4paper]{article}
> \usepackage{ifthen}
> \usepackage[dvips]{graphics}
> \begin{document}

> \newcounter{grd}
> \setcounter{grd}{180}
> \whiledo{\value{grd}>-180}{%
>         \rotatebox{\value{grd}}{%
>                 \makebox[0pt][l]{\smash{%
>                         .\hspace{12mm}Drehung um
>                          $\arabic{grd}^\circ$}}}%
>   \addtocounter{grd}{-15}}

> \end{document}

I love people that send so neet little examples ;-)

It works if you change
  \rotatebox{\value{grd}}{%
to
        \rotatebox{\arabic{grd}}{%

Don't ask me why ;-)

I found the answer by first deleting the whiledo, that didn't change
anything. Then I change \value{grd} to a constant, and then ghostscript
didn't complain anymore. So I knew something was wrong with \value

Ulrike Fischer

 
 
 

graphics.sty

Post by Heiko Oberdie » Fri, 15 Feb 2002 19:48:57



> I have this code, it should print the lines in a neat circle, but somehow
> it doesnt work. The lines are printed in on row after I used dvips it
> prints only errormessages.
>         \rotatebox{\value{grd}}{%

This works with pdfTeX, but for dvips the "\value{grd}"


But the PostScript interpreter will not know this TeX command.

Solution:
* \number\value{grd}
* \the\value{grd}
* \thegrd
* \arabic{grd}

Yours sincerely