TransWikia.com

Error while set language, despite package is already installed

TeX - LaTeX Asked on November 22, 2020

I’m writing a document in R markdown and using latex for figures and tables. I need the captions in Portuguese, so I try this:

R markdown file:

---
output:
  pdf_document:
      includes:
            in_header: mystyles.sty
  html_document: rmarkdown::github_document
  word_document: default
---

mystyles.sty file:

usepackage[portuguese]{babel}

However, when I build the document using rmarkdown::render("filename.Rmd") I got the error:

! Package babel Error: Unknown option `portuguese'. Either you misspelled it (babel) or the language definition file portuguese.ldf was not found.

As I’m in Ubuntu, I ran:

sudo apt-get install texlive-lang-portuguese

which returns that I already has this package installed:

texlive-lang-portuguese is already the newest version (2015.20160223-1).

I also tried to run sudo apt-get install texlive-lang-european which returns the same

What am I doing wrong here?

One Answer

The babel name for Portuguese seems to be portugues, at leat that that is the name of the language file portuges.ldf.

So try portuges instead

Answered by daleif on November 22, 2020

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP