title: Error with german umlauts in R Markdown generated pdf, when a string is inserted by a function
body: <p>I ran into a strange problem when trying to use a selfmade function, which inserts strings from a dataframe in a specific format, based on their location in the text, in a document with several child docs. The generation of the PDF-document always stops with a LaTeX error code 1, after using the name of a german institution with umlauts in my df of strings. No encoding workaround (e.g. <code>\"u, &amp;uuml;</code>) solves the problem.</p>
  
  <p><strong>The setup</strong>: RStudio (1.1.442) with rmarkdown (1.9) and papaja (0.1.0) on Windows 10 (1803). Function is defined in the main document, but called, during the knitting, in a child document.</p>
  
  <p>I've already fiddled with the LaTeX-templates encoding/language settings to no success. Umlauts in the main document work as expected, so I am pretty sure there is something wrong with the knitting of the child documents. </p>
  
  <p><strong>Note</strong>: <em>I've already solved this for myself (see answers). However, I suppose this is a problem with functions and child documents, rather than the papaja package, so it might be helpful in similar cases. Maybe somebody else can say more about this issue or there is some more reliable way to prevent this?</em></p>