  Two-dimensional (2D) periodic electric modulations of a 2D electron gas split
each Landau level into the well-known butterfly-type spectrum described by a
Harper-type equation multiplied by an envelope function. This equation is
slightly modified for 2D magnetic modulations but the spectrum remains
qualitatively the same. The same holds if both types of modulations are
present. The modulation strengths do not affect the structure of the
butterfly-type spectrum, they only change its scale or its envelope. The latter
is described by the ratio $\alpha$ of the flux quantum $h/e$ to the flux per
unit cell. Exact numerical and approximate analytical results are presented for
the energy spectrum as a function of the magnetic field. For integer $\alpha$
the internal structure collapses into a band for all cases. The bandwidth at
the Fermi energy depends on the modulation strength, the electron density, and,
when both modulations are present, on the phase difference between them. In the
latter case if the modulations have a $\pi/2$ phase difference, the bandwidth
at the Fermi energy is nearly independent of the magnetic field and the
commensurability oscillations of the diffusive contribution to the resistivity
disappear.
