St.write treats $ symbol as start of latex expression and that spoils the rest of text formatting

Check this related thread to escape the dollar signs so they are just rendered as such: