Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to select the language (for captions) in a rmarkdown document

Tags:

r-markdown

Is there a way to select the language for Rmarkdown? For example, I'm writing an assignment in portuguese, but table captions will come off as Table 1: something.

In latex files you can just add \usepackage[brazil]{babel}. Is there an equivalent option for rmarkdown?

like image 279
Freguglia Avatar asked Oct 20 '25 02:10

Freguglia


1 Answers

I found the answer in the TeX SE site: https://tex.stackexchange.com/questions/171711/how-to-include-latex-package-in-r-markdown.

You can just include packages with a header-includes argument.

---
title: "Title"
author: "Me"
header-includes:
   - \usepackage[brazil]{babel}
output:
    pdf_document
---
like image 177
Freguglia Avatar answered Oct 22 '25 04:10

Freguglia