modify tex file with addition of SOS network portion