tg_gt function

Prepare the table generator data for output