I've been following Ginsparg's notes (http://arxiv.org/abs/hep-th/9108028) and Francesco et al's big yellow book on modular invariance of CFT on a torus, particularly on the $c=1/2$ (free fermion) case.
I thought I understood the derivation of the modular-invariant partition function, but then I realized I did not. For example, in Ginsparg's notes, the computation of the partition function relies on the mode expansion of the free fermion field (let's say antiperiodic case) $$\psi(z)=\sum_{n\in\mathbb{Z}} b_n z^{-n-1/2},$$ where $[L_0, b_{-n}]=nb_n$, and then the partition function is just summing over the $b_{-n}|0\rangle$ states. Taking this, I can follow the rest of his derivation.
However, this mode expansion is for a plane (which can be transformed into a cylinder, but not into a torus) -- it is only anti-periodic (periodic if you drop the $1/2$) in one direction (here angular direction). The above expansion can never satisfy the periodic or anti-periodic boundary condition in the other direction, which in $z$ plane is the radial direction.
So to be specific, when Mr Ginsparg was calculating the Virasoro character for (A,A) sector (note the second A), say in Eq. (7.13 a), what are his eigenbases for $L_0$?