  We aim to reveal the sizes of the continuum and broad emission line (BEL)
emitting regions in the gravitationally lensed quasar SDSS J1004+4112 by
analyzing the unique signatures of microlensing in this system. Through a
comprehensive analysis of 20 spectroscopic observations acquired between 2003
and 2018, we studied the striking deformations of various BEL profiles and
determined the sizes of their respective emitting regions. Our approach
involves a detailed analysis of the magnitude differences in the BEL wings and
their adjacent continua, and the implementation of a statistical model to
quantify the distribution and impact of microlensing magnifications. To ensure
a reliable baseline for no microlensing, we used the emission line cores as a
reference. We then applied a Bayesian estimate to derive the size lower limits
of the Ly$\alpha$, Si IV, C IV, C III], and Mg II emitting regions, as well as
the sizes of the underlying continuum-emitting sources. We analyzed the
outstanding microlensing-induced distortions in the line profiles of various
BELs in the quasar image A, characterized by a prominent magnification of the
blue part and a strong demagnification of the red part. From the statistics of
microlensing magnifications and using Bayesian methods, we estimate the lower
limit to the overall size of the regions emitting the BELs to be a few lt-days
across, which is significantly smaller than in typically lensed quasars. The
asymmetric deformations in the BELs indicate that the broad-line region is
generally not spherically symmetric, and is likely confined to a plane and
following the motions of the accretion disk. Additionally, the inferred
continuum-emitting region sizes are larger than predictions based on standard
thin-disk theory by a factor of $\sim$3.6 on average. The size-wavelength
relation is consistent with that of a geometrically thin and optically thick
accretion disk.
