knitr kable: Text color in PDF from RNW is grey
问题 When I create a table using the knitr::kable function within a RNW file, the text color of the table items in the PDF appears to be grey. I would like to change this to black. How can I do this? 回答1: \documentclass{article} \begin{document} <<>>= knitr::kable(cars[1:10,]) # grey @ <<results="asis">>= knitr::kable(cars[1:10,]) # black @ \end{document} By default, the output of kable will be wrapped in a knitrout environment where the text color ( fgcolor ) is set to grey ( rgb: 0.345, 0.345, 0