For some reason, I am not able to knit a very simple Rmd file if I use \usepackage[x11names]{xcolor}
.
It pops up the message "LaTeX Error: Option clash for package xcolor".
All LaTeX functions works properly. Except this one.
I can work without options, but the color palette is so minimal, that the feeling of documents are very basic. Or I can work with a lot of code to define colors, but I need to work, not to code.
The next code is the minimum expression of my problem. A simple thing like try to change a font color is a nightmare.
The Azure1 color (at the bottom of the code) belongs to the color namespace x11names in xcolor.
If I change it to something basic like gray it will work ONLY if I delete the [option] part in xcolor package.
I am not expert at all. The answer may be too easy, but not for me.
I really need some solution.
I've had tried using \PassOptionsToPackage{x11names}{xcolor}
: Same problem
I did reinstall FULL tinytext,
tinytex::reinstall_tinytex(): Same problem
I did reinstall TeX Live in my Linux.: Same problem (...and a lot of time and resources)
I did reinstall (afterwards) kableExtra, Knitr, Rmarkdown... and nothing seems to work.
Here is my Rmd example (just the problem)
---
always_allow_html: true
output:
pdf_document
header-includes:
\usepackage[x11names]{xcolor}
\usepackage{pifont}
\usepackage[T1]{fontenc}
\usepackage{anyfontsize}
\usepackage{inputenc}
---
knitr::opts_chunk$set(echo = FALSE, warning=FALSE, error=FALSE)
```{r librerias, include = FALSE}
library(formattable)
library(rmarkdown)
library(tidyverse)
library(kableExtra)
library(latexpdf)
library(tinytex)
library(data.table)```
\ding{32}
\vspace{80mm}
**\fontsize{28}{28}\selectfont Changing size works.**\newline
\fontsize{20}{20}\selectfont Up or \fontsize{8}{8}\selectfont down.\newline
\normalsize
The next text will have a color change **\textcolor{blue}{LIKE THIS}**, or like **\textcolor{purple}{THIS}** and finally as **\textcolor{red}{THIS ONE}** ...something else.\newline
A very simple table
\LARGE Sampling
\large
```{r }
tracing <- data.table(X=c(1:10), Y=c(LETTERS[1:10]))
kable(tracing, "latex") %>%
kable_styling(
position = "center",
font_size = 8,
full_width = FALSE,
repeat_header_continued = FALSE,
latex_options = "striped",
stripe_color = "Azure1"
) ```
I am woking over RStudio-server.
I am on your hands.
Thank you so much for your time to solve such a problem to me.
R:
> version
_
platform x86_64-pc-linux-gnu
arch x86_64
os linux-gnu
system x86_64, linux-gnu
status
major 4
minor 0.2
year 2020
month 06
day 22
svn rev 78730
language R
version.string R version 4.0.2 (2020-06-22)
nickname Taking Off Again
Rstudio version:
$mode
[1] "server"
$version
[1] ‘1.3.1073’
$release_name
[1] "Giant Goldenrod"
EDIT:
If I use this code, I can verify some things.
The next text will have a color change **\textcolor[rgb]{0,.7,.3}{LIKE THIS}**,
or like **\textcolor{Azure1}{THIS}**
and finally as **\textcolor{red}{THIS ONE}** ...something else.\newline
The xcolor package is OK. I can use the [rgb] option in the \textcolor, without problem, but it is not possible to use the Azure1, whose definition is inside x11names. I can not use either another name space declared on the options given to xcolor in the header, it is not something specific to x11names.