I'm trying to construct a totally ramified covering (of order $d$) of the complex projective line $\mathbb{P}^1$ with exactly 3 branch points $0,1,\infty$.
Here is what I'm trying: consider the smooth projective curve obtained as the normalization of the affine curve $$y^d=x^a(x-1)^b,$$ where $a$, $b$, and $a+b$ are all coprime to $d$. Then this covering has degree $d$ and branch points $0,1,\infty$ with ramification index $d$. (ref. e.g. page 61 of Christian Rohde's Cyclic Coverings, Calabi-Yau Manifolds and Complex Multiplication https://link.springer.com/content/pdf/10.1007/978-3-642-00639-5_3.pdf)
However, when I try to apply the Riemann-Hurwitz formula, I get $$2-2g=2d-3(d-1)=3-d,$$ which looks incorrect when I take $d$ to be even.
What is wrong with this approach and how to solve the original question correctly?