2

I just want to make German umlauts (ü) work in R Markdown. I know there is already threads on this but I just can't get it to work. Here Dirk EddelBüttel explains, that you simply need to enter proper unicode characters, how can I enter more properly than pressing the key?

I want to knit the document into a pdf, so html work around is not an option. Anyway, it seems to be a problem of the Markdown side of the operation. I tried keeping the tex file and there the umlauts are already screwed.

It would be really nice, if anyone could help.

Community
  • 1
  • 1
Georgery
  • 7,643
  • 1
  • 19
  • 52
  • It is mostly a question of how _your texteditor_ does it, when your keyboard does not. So the answer is specific to how you enter text. By the way, lower-case b so ' Eddelbüttel'. – Dirk Eddelbuettel Jan 10 '17 at 11:22
  • what does the output look like? – Richard Telford Jan 10 '17 at 11:22
  • "Fälle" appears as "Fälle", "Über" appears as "über". Sorry, 'bout the 'B'. How do I specify how I enter the text? I simply press the 'ä' key for example. Is there any other way? – Georgery Jan 10 '17 at 12:41
  • A couple things that have helped with similar issues in the past are to try rendering using `latex_engine: xelatex`, and also try using alternative fonts. Both of these can be specified in the YAML header block. – Keith Hughitt Jan 10 '17 at 13:00
  • I feel like this is not the way to go. The font type and the latex engine use the *.tex file that is knitted by markdown, right? However, the umlauts already incorrectly appear in the *.tex file. – Georgery Jan 10 '17 at 13:07

1 Answers1

1

OK, I randomly tried some stuff and finally made it work. It's obviously something about the Windows language settings. I saved it using the system default encoding (ISO-8859-1) and it worked.

In my opinion should have worked as well when using UTF-8 which was predefined, but it didn't. Maybe this is gonna someone out there.

Georgery
  • 7,643
  • 1
  • 19
  • 52