  We study N=1 field theories with a U(1)_R symmetry on compact four-manifolds
M. Supersymmetry requires M to be a complex manifold. The supersymmetric theory
on M can be described in terms of conventional fields coupled to background
supergravity, or in terms of twisted fields adapted to the complex geometry of
M. Many properties of the theory that are difficult to see in one formulation
are simpler in the other one. We use the twisted description to study the
dependence of the partition function Z_M on the geometry of M, as well as
coupling constants and background gauge fields, recovering and extending
previous results. We also indicate how to generalize our analysis to
three-dimensional N=2 theories with a U(1)_R symmetry. In this case
supersymmetry requires M to carry a transversely holomorphic foliation, which
endows it with a near-perfect analogue of complex geometry. Finally, we present
new explicit formulas for the dependence of Z_M on the choice of U(1)_R
symmetry in four and three dimensions, and illustrate them for complex
manifolds diffeomorphic to S^3 x S^1, as well as general squashed
three-spheres.
