Search code examples
rpapaja

How to change default name for table note in apa_table()?


I'm trying to write a .pdf report using papaja r package. It's not in English so I need to translate some fixed parts to Polish. I managed to translate figure and table name thanks to this question, using:

\renewcommand{\figurename}{Rysunek}
\renewcommand{\tablename}{Tabela}

Yet I don't know how to translate table note from apa_table() from "Note." to "Adnotacja.". The workaround is to keep .tex file, find & replace and render outside RStudio. Is it possible to set it inside the RMarkdown file?


Solution

  • Some of these words are defined in global options named papaja.terms, and you might even want to change more than just the note here to avoid the latex quick fixes all together. See the options here:

    > getOption("papaja.terms")
    
    $author_note
    [1] "Author note"
    
    $abstract
    [1] "Abstract"
    
    $keywords
    [1] "Keywords"
    
    $word_count
    [1] "Word count"
    
    $table
    [1] "Table"
    
    $figure
    [1] "Figure"
    
    $note
    [1] "Note"
    
    $correspondence
    [1] "Correspondence concerning this article should be addressed to "
    
    $email
    [1] "E-mail"
    

    In order to change the language of the word corresponding to 'note'.

    E.g.

    polish_terms <- getOption("papaja.terms")
    polish_terms$note <- "Adnotacja"
    options("papaja.terms" = polish_terms)