I am struggling with an issue in RMarkdown documents where the German date format (inside the YAML Metadata) that starts with 'N. ' gets interpreted as an enumerated item. I know that if I manually write the date I could escape the dot, but I don't know how that would work inside the format function.
This is my Code:
date: "`r format(Sys.time(), '%d. %B, %Y')`"
adding a backslash to escape the dot:
date: "`r format(Sys.time(), '%d\. %B, %Y')`"
'Scanner error: while parsing a quoted scalar at line 3, column 7 found unknown escape character at line 3, column 49'
and adding two backslashes:
date: "`r format(Sys.time(), '%d\\. %B, %Y')`"
'[pandoc warning] Could not parse YAML header: found unknown escape character "source" (line 5, column 26)'
Thank you in advance!