A discretized variational formalation of anisotropic small strain plasticity problems