library(texPreview)
tex_opts$set(
returnType = 'html',
opts.html = list(width = '50%', height = '50%')
)
readLines(tex_file)
#> [1] "\\begin{tabular}{cccc}" "\\toprule"
#> [3] "C1 & C2 & C3 & C4\\\\" "\\midrule"
#> [5] "a & c & 1 & 1\\\\" "a & c & 2 & 1\\\\"
#> [7] "a & c & 3 & 1\\\\" "a & c & 4 & 0\\\\"
#> [9] "a & c & 5 & 0\\\\" "\\addlinespace"
#> [11] "a & c & 6 & 1\\\\" "a & c & 7 & 1\\\\"
#> [13] "a & d & 8 & 0\\\\" "a & d & 9 & 0\\\\"
#> [15] "a & d & 10 & 0\\\\" "\\addlinespace"
#> [17] "b & c & 11 & 0\\\\" "b & c & 12 & 0\\\\"
#> [19] "b & d & 13 & 1\\\\" "b & d & 14 & 1\\\\"
#> [21] "b & d & 15 & 0\\\\" "\\bottomrule"
#> [23] "\\end{tabular}"