  We study aspects of two-dimensional nonlinear sigma models with Wess-Zumino
term corresponding to a nonclosed 3-form, which may arise upon dimensional
reduction in the target space. Our goal in this paper is twofold. In a first
part, we investigate the conditions for consistent gauging of sigma models in
the presence of a nonclosed 3-form. In the Abelian case, we find that the
target of the gauged theory has the structure of a contact Courant algebroid,
twisted by a 3-form and two 2-forms. Gauge invariance constrains the theory to
(small) Dirac structures of the contact Courant algebroid. In the non-Abelian
case, we draw a similar parallel between the gauged sigma model and certain
transitive Courant algebroids and their corresponding Dirac structures. In the
second part of the paper, we study two-dimensional sigma models related to
Jacobi structures. The latter generalise Poisson and contact geometry in the
presence of an additional vector field. We demonstrate that one can construct a
sigma model whose gauge symmetry is controlled by a Jacobi structure, and
moreover we twist the model by a 3-form. This construction is then the analogue
of WZW-Poisson structures for Jacobi manifolds.
