  It is well known that, given a $2d$ purely magnetic Landau Hamiltonian with a
constant magnetic field $b$ which generates a magnetic flux $\varphi$ per unit
area, then any spectral island $\sigma_b$ consisting of $M$ infinitely
degenerate Landau levels carries an integrated density of states
$\mathcal{I}_b=M \varphi$. Wannier later discovered a similar Diophantine
relation expressing the integrated density of states of a gapped group of bands
of the Hofstadter Hamiltonian as a linear function of the magnetic field flux
with integer slope.
  We extend this result to a gap labelling theorem for any $2d$ Bloch-Landau
operator $H_b$ which also has a bounded $\mathbb{Z}^2$-periodic electric
potential. Assume that $H_b$ has a spectral island $\sigma_b$ which remains
isolated from the rest of the spectrum as long as $\varphi$ lies in a compact
interval $[\varphi_1,\varphi_2]$. Then $\mathcal{I}_b=c_0+c_1\varphi$ on such
intervals, where the constant $c_0\in \mathbb{Q}$ while $c_1\in \mathbb{Z}$.
The integer $c_1$ is the Chern marker of the spectral projection onto the
spectral island $\sigma_b$. This result also implies that the Fermi projection
on $\sigma_b$, albeit continuous in $b$ in the strong topology, is nowhere
continuous in the norm topology if either $c_1\ne0$ or $c_1=0$ and $\varphi$ is
rational.
  Our proofs, otherwise elementary, do not use non-commutative geometry but are
based on gauge covariant magnetic perturbation theory which we briefly review
for the sake of the reader. Moreover, our method allows us to extend the
analysis to certain non-covariant systems having slowly varying magnetic
fields.
