upon the arrival of the republic he was an officer of the generalitat in tortosa and barcelona