On 21/04/2023 23:20, Samuel Muldoon wrote:

# pfr is partially_formatted_result 
pfr    = r"\mathjax{{color}}{{text}}".format(color = "blue")   # ERROR! missing parameter `text`
result = r"\mathjax{{color}}{{text}}".format(text = "Spanish") # ERROR! missing parameter `color`
Is there any reason you can't write
pfr    = r"\mathjax{{color}}{{text}}".replace("{color}", "blue")

result = r"\mathjax{{color}}{{text}}".replace("{text}", "Spanish")

Best wishes

Rob Cliffe