  A dark energy scalar (or a function of the Ricci scalar) coupled with the
derivative to the matter fields will violate the $CPT$ symmetry during the
expansion of the Universe. This type of cosmological $CPT$ violation helps to
generate the baryon number asymmetry and gives rise to the rotation of the
photon polarization which can be measured in the astrophysical and cosmological
observations, especially the experiments of the cosmic microwave background
radiation. In this paper, we derive the rotation angle in a fully general
relativistic way and present the rotation formulas used for the cosmic
microwave background data analysis. Our formulas include the corrections from
the spatial fluctuations of the scalar field. We also estimate the magnitude of
these corrections in a class of dynamical dark energy models for quintessential
baryo/leptogenesis.
