Continuum theory for nematic liquid crystals with tensorial order