The effective actions of pseudoscalar and scalar particles in theories with gauge and conformal anomalies