  A well known theorem due to Kasteleyn states that the partition function of
an Ising model on an arbitrary planar graph can be represented as the Pfaffian
of a skew-symmetric matrix associated to the graph. This results both embodies
the free fermionic nature of any planar Ising model and eventually gives an
effective way of computing its partition functions in closed form. An extension
of this result to non planar models expresses the partition function as a sum
of Pfaffians which number is related to the genus of the oriented surface on
which the graph can be embedded. In graph theory, McLane's theorem (1937) gives
a characterization of planarity as a property of the cycle space of a graph,
and recently, Diestel et al. (2009) extended this approach to embeddings in
arbitrary surfaces. Here we show that McLane's approach naturally leads to
Kasteleyn's results: McLane characterization of planar graphs is just what is
needed to turn an Ising partition function into a Pfaffian. Using this
approach, we prove that the Ising partition function on an arbitrary non planar
graph can be written as \emph{the real part}of the Pfaffian of a single matrix
with coefficients taken in a multicomplex algebra $\C_{\tilde g}$, where
$\tilde g$ is the non-orientable genus, or crosscap number, of the embedding
surface. Known representations as sums of Pfaffians follow from this result. In
particular, Kasteleyn's result which involves $4^g$ matrices with real
coefficients, $g$ orientable genus, is also recovered through some algebraic
reduction.
