The paper "ODS Layout for RTF - A custom tagset" discusses the concepts of ODS LAYOUT and goes into the details of this code. Advanced material in the talk discusses which rtf command sequences are needed and how they are placed in the tagset output stream.

Changes in the TEMPLATE procedure after the paper was published caused the code in the paper to fail to render.

See, "Problem Note 45138: Creating an RTF file using a modified version of TAGSETS.RTF generates an RTF file without any style information"