I am creating a document in which some tables have some columns that benefit from this solution to force alignment of records with wrapped text.
To implement this solution, we include the following in our preamble:
\newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{
To implement this with help knitr
, I tried:
---
output:
pdf_document:
keep_tex: yes
header-includes:
- \usepackage{array}
- \newcolumntype{R}[1]{>{\raggedleft\arraybackslash}p{
---
But this is not an error:
! LaTeX error: missing \ begin {document}.
...
l.83 \ newcolumntype {R} {[} 1
pandoc: error creating pdf
Error: pandoc document conversion failed with error 43
Studying the .tex output, it is clear what went wrong:
\usepackage{array}
\newcolumntype{R}{[}1{]}\{\textgreater{}\{\raggedleft\arraybackslash\}p\{\
knitr
>
\textgreater{}
, {
\{
, }'
\}
, [
{[}
, ]
{]}
#
\#
. , , .
, , ( YAML) - \
, \
" ".
knitr
?