In their textbook, Girondo and Gonzalez-Diez show the following theorem.
Let $S$ be a compact Riemann surface admitting an automorphism $\tau$ of prime order such that $S/\langle \tau\rangle$ is isomorphic to the projective line. Assume that $\tau$ fixes $r+1$ points $P_1,\dots,P_{r+1}$ with rotation numbers $d_1,\dots,d_{r+1}$. Then $S$ is isomorphic to the Riemann surface of an algebraic curve of the form $y^p=(x-a_1)^{m_1} \dots (x-a_r)^{m_r}$, where $1 \le m_i <p$ and $\sum\limits_{i=1}^r m_i$ is prime to $p$. Moreover, there is an isomorphism $\Phi: S \to \{y^p=(x-a_1)^{m_1} \dots (x-a_r)^{m_r}\}$ under which $\tau \in Aut(S)$ corresponds to $(x,y) \to (x,\xi_p y)$, the points $P_1,\dots,P_{r+1}$ to $\hat P_1=(a_1,0),\dots,\hat P_r=(a_r,0)$ and $\hat P_{r+1}=\infty$ and the integers $m_1,\dots,m_r,m_{r+1}:=-\sum\limits_{i=1}^r m_i$ are the inverses of $d_1,\dots,d_{r+1}$ modulo $p$.
My question is the following: they are assuming that $\tau$ must be of prime order. What happens when its order is not a prime number?