Plain text doesn't have formatting, like superscript, subscript, bold, italic and/or colors. You need to use some "rich text" format.
The type of "rich text" depends on where you want to use it. Examples: HTML, RTF.
For PDF you need to look into the formatting options provided by your PDF creation library.