Open tlcaputi opened 9 months ago
I can reproduce this. To fix it, you also need to load a special tikz
library: \usetikzlibrary{fit}
. This should probably be mentioned in the docs.
Here's an example with an R Markdown document but you can simply use the command above in a tex file.
---
output: pdf_document
header-includes:
- \usepackage{booktabs}
- \usepackage{tikz}
- \usetikzlibrary{fit}
---
```{r, eval=TRUE, results="asis"}
library(fixest)
nm = names(iris)
est = feols(.[nm[1]] ~ .[nm[2:4]], iris, fsplit = ~Species)
etable(
est,
arraystretch = 1.5,
tex = TRUE,
replace = T,
highlight = .(
"Sepal@1",
"cyan4, square" = "Petal.L@3-4",
"thick5, sep8, darkgreen!90, se" = "Petal.W"
)
)
![image](https://github.com/lrberge/fixest/assets/52219252/981613b0-a298-4cd9-a088-7b88cd077100)
Two quick thoughts:
1) We should probably just take a stance on recommending TinyTex as the most convenient way to ensure that you have all of the necessary libraries that integrate well with your R installation. Looking at the docs, I believe the "TinyTex" bundle covers all of the necessary libraries. So users could just do something like:
# install.package("tinytex")
tinytex::install_tinytex(bundle = "TinyTeX")
2) The two etable vignettes should really be combined at this point. I'll try to take a crack at this when I get a sec (ha!) and put in a PR for Laurent to look at.
I am having trouble implementing the etable highlighting features from the vignette-- perhaps I am missing a necessary package somewhere. Please let me know how I can fix this issue.
This is my code:
This is the stdout:
output.pdf
looks like this:Thank you for all of your help and for an excellent package!