Magnetohydrodynamics of rotating compact stars with spectral methods: description of the algorithm and tests | Publicación