remove xcolor latex dependency
diff --git a/docs/awesome_table_in_pdf.Rmd b/docs/awesome_table_in_pdf.Rmd
index ad14459..515d66a 100644
--- a/docs/awesome_table_in_pdf.Rmd
+++ b/docs/awesome_table_in_pdf.Rmd
@@ -2,16 +2,17 @@
title: "Create Awesome LaTeX Table with knitr::kable and kableExtra"
author: "Hao Zhu"
date: "`r Sys.Date()`"
+classoption: table
output:
pdf_document:
toc: true
toc_depth: 2
+ keep_tex: true
header-includes:
- \usepackage{booktabs}
- \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- - \usepackage[table]{xcolor}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{colortbl}
@@ -50,6 +51,10 @@
# Getting Started
Here we are using the first few columns and rows from dataset `mtcars`
+```{r, echo = F}
+options(kableExtra.latex.load_packages = F)
+```
+
```{r}
library(knitr)
library(kableExtra)
@@ -87,7 +92,6 @@
- \usepackage{longtable}
- \usepackage{array}
- \usepackage{multirow}
- - \usepackage[table]{xcolor}
- \usepackage{wrapfig}
- \usepackage{float}
- \usepackage{colortbl}
@@ -99,6 +103,8 @@
- \usepackage{makecell}
```
+Note: `kableExtra` was using `xcolor` for alternative row color before 1.0. However, the recent updates in `fancyvbr` causes a clash in `xcolor` option. Therefore, we removed the `xcolor` dependency in version 1.0 and started to rely on `colortbl` completely. If you experience any issues, please report on github.
+
## Plain LaTeX
Plain LaTeX table looks relatively ugly in 2017.
```{r}