2

Elaborating on a solution obtained from the accepted answer of my earlier question, I would like to rotate upside-down labels on the righthand side of the rosetta using modulus.

\documentclass[dvipsnames,pstricks]{standalone}
\usepackage{multido}
\usepackage{arrayjobx}

\begin{document}
\begin{pspicture}(-3.5,-3.5)(3.5,3.5)
\newarray\Names
\readarray{Names}{Tankegang&Problembehandling&Modellering&Ræsonnement&Hjælpemiddel&Kommunikation&Symbol- og formalisme&Repræsentation}
\multido{\iA=1+1,\rA=112+45}{8}{%
  \rput{!\rA\space 180 sub}(2;\rA){\Names(\iA)}}
\end{pspicture}
\end{document}

The output is

Output of MWE

What I mean is that I want to calculate label rotation angles modulo 180, but contrary to my expectation, \rput{!\rA\space 180 sub 180 mod}(... produces multiple copies of the terse error message:

MiKTeX GPL Ghostscript
9.19: Unrecoverable error, exit code 1

I compile on a Win10 PC using TexMaker 4.5, calling XeLaTeX.

I read the following discussions, but do not seem to get to a solution:

2
\listfiles
\documentclass[dvipsnames,pstricks]{standalone}
\usepackage{multido}
\usepackage{arrayjobx}
\newarray\Names

\begin{document}
    \begin{pspicture}(-3.75,-3.75)(4.25,3.75)
    \readarray{Names}{%
        Tankegang&Problembehandling&Modellering&%
        Ræsonnement&Hjælpemiddel&Kommunikation&%
        Symbol-og formalisme&Repræsentation}
    \multido{\iA=1+1,\iB=112+45}{8}{%
        \ifnum\iB<270 
          \rput[r]{!\iB\space 180 add}(1;\iB){\Names(\iA)}%
        \else
          \rput[l]{\iB}(1;\iB){\Names(\iA)}%
        \fi}
    \end{pspicture}
\end{document}

enter image description here

  • 1
    use !\rA\space cvi 180 sub 180 mod – user2478 Jun 27 '17 at 6:04
  • Ah, failing to convert to integer (cvi) was what missed! And, in all probablilty, what triggered the mentioned error message. – Engelsmann Jun 27 '17 at 7:12
  • 1
    Instead of \rA you can also use \iB then you do not need the conversion into an integer. In your first example you startet with a real angle value. However, I have no idea about your error message because I do not have any problem. – user2478 Jun 27 '17 at 7:18
  • Correct, I edited MWE in an attemt to work around having mod provoking the mentioned error. Both arguments to mod must be integers. – Engelsmann Jun 27 '17 at 7:26
  • 1
    See my edited answer ... – user2478 Jun 28 '17 at 11:26

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.