We show that 4D gauge theories with Green-Schwarz anomaly cancellation and possible generalized Chern-Simons terms admit a formulation that is manifestly covariant with respect to electric/magnetic duality transformations. This generalizes previous work on the symplectically covariant formulation of anomaly-free gauge theories as they typically occur in extended supergravity, and now also includes general theories with (pseudo-)anomalous gauge interactions as they may occur in global or local N=1 supersymmetry. This generalization is achieved by relaxing the linear constraint on the embedding tensor so as to allow for a symmetric 3-tensor related to electric and/or magnetic quantum anomalies in these theories. Apart from electric and magnet...