factored out Tga from Tex