  In this article we apply a discrete action principle for the Vlasov--Maxwell
equations in a structure-preserving particle-field discretization framework. In
this framework the finite-dimensional electromagnetic potentials and fields are
represented in a discrete de Rham sequence involving general finite element
spaces, and the particle-field coupling is represented by a set of projection
operators that commute with the differential operators. With a minimal number
of assumptions which allow for a variety of finite elements and shape functions
for the particles, we show that the resulting variational scheme has a general
discrete Poisson structure and thus leads to a semi-discrete Hamiltonian
system. By introducing discrete interior products we derive a second type of
space discretization which is momentum preserving, based on the same finite
elements and shape functions. We illustrate our method by applying it to spline
finite elements, and to a new spectral discretization where the particle-field
coupling relies on discrete Fourier transforms.
