my_string="Thing" + r" ab " + "Other thing" doc.append(NoEscape(my_string)) # LaTeX output: Thing ab Other thing # Text output Thing Other thing