  Transmission spectroscopy characterizes the wavelength dependence of transit
depth, revealing atmospheric absorption features in planetary terminator
regions. In this context, different optical transmission spectra of HAT-P-12b
reported in previous studies exhibited discrepant atmospheric features (e.g.,
Rayleigh scattering, alkali absorption). We aim to understand the atmosphere of
HAT-P-12b using two transit spectroscopic observations by the Gran Telescopio
CANARIAS (GTC), and to search for evidence of stellar activity contaminating
the transmission spectra, which might be the reason behind the discrepancies.
We used Gaussian processes to account for systematic noise in the transit light
curves and used nested sampling for Bayesian inferences. We performed joint
atmospheric retrievals using the two transmission spectra obtained by GTC
OSIRIS, as well as previously published results, coupled with stellar
contamination corrections for different observations. The retrieved atmospheric
model exhibits no alkali absorption signatures, but shows tentative molecular
absorption features including $\rm H_2O$, $\rm CH_4$ and $\rm NH_3$. The joint
retrieval of the combined additional public data analysis retrieves similar
results, but with a higher metallicity. Based on Bayesian model comparison, the
discrepancies of the transmission spectra of HAT-P-12b can be explained by the
effect of different levels of unocculted stellar spots and faculae. In
addition, we did not find strong evidence for a cloudy or hazy atmosphere from
the joint analysis, which is inconsistent with prior studies based on the
observations of Hubble Space Telescope.
