Hartree-Fock (HF) equations are derived for an N-electron system with a spin-free Hamiltonian. All eigenstates of S2 are considered for both open- and closed-shell states. States which possess two or more spin-coupling schemes (structures) are treated by mixed-structure kets. A procedure to optimize the mixture of structures is incorporated into the HF equations. A certain mixed-structure ket called the immanant is defined and used to derive the HF equations for a spin-projected Slater determinant. The conventional equations for single determinants and doubly occupied orbitals are derived as special cases. The spin-free method is used throughout: Permutational symmetry of a spin-free ket establishes the corresponding spin eigenvalue.