In the presence of boundaries, the quantum anomalies acquire additional
boundary terms. In odd dimensions the integrated conformal anomaly, for which
the bulk contribution is known to be absent, is non-trivial due to the boundary
terms. These terms became a subject of active study in the recent years. In the
present paper we continue our previous study [1], [2] and compute explicitly
the anomaly for fermions in dimensions d=3, 4 and 5. The calculation
in dimension 5 is new. It contains both contributions of the gravitational
field and the gauge fields to the anomaly. In dimensions d=3 and 4 we
reproduce and clarify the derivation of the results available in the
literature. Imposing the conformal invariant mixed boundary conditions for
fermions in odd dimension d we particularly pay attention to the necessity of
choosing the doubling representation for gamma matrices. In this representation
there exists a possibility to define chirality and thus address the question of
the chiral anomaly. The anomaly is entirely due to terms defined on the
boundary. They are calculated in the present paper in dimensions d=3 and 5
due to both gravitational and gauge fields. To complete the picture we
re-evaluate the chiral anomaly in 4 dimensions and find a new boundary term
that is supplementary to the well-known Pontryagin term.Comment: 32 page