A compact 12 MeV race-track microtron (RTM) which
is under construction at the Technical University of
Catalonia includes a quadrupole magnet for horizontal
beam focusing and four dipole magnets for beam
extraction. As the source of the magnetic field in these
magnets a rare-earth permanent magnet (REPM) material
is used. In the article the main design characteristics of
the quadrupole lens and extraction dipoles are described
and a procedure of tuning of their magnetic fields is
described. We report on the manufacturing of these
magnetic systems and results of the tuning of their
magnetic fields.Postprint (published version