DEV Community

Discussion on: Let's find something better than LaTeX

Collapse
 
hoffmann profile image
Peter Hoffmann

Bookdown contains some nice extensions of Markdown but lacks a style language, table support and is bound too tightly to R (which itself contains some strange constructs by itself)

Collapse
 
clsource profile image
Camilo

Bookdown is a wraper to pandoc and rmarkdown. You can choose to use simple tables or advanced tables using latex or R code.

pandoc.org/MANUAL.html#tables

bookdown.org/yihui/bookdown/tables...

When you do not want a table to float in PDF, you may use the LaTeX package longtable, which can break a table across multiple pages. To use longtable, pass longtable = TRUE to kable(), and make sure to include \usepackage{longtable} in the LaTeX preamble (see Section 4.1 for how to customize the LaTeX preamble). Of course, this is irrelevant to HTML output, since tables in HTML do not need to float.

knitr::kable(
  iris[1:55, ], longtable = TRUE, booktabs = TRUE,
  caption = 'A table generated by the longtable package.'
)

For styling you can use themes bookdown.org/yihui/bookdown/themin...

I know that it can be seen odd that even using a powerful tool like bookdown you still need LaTex for certain operations. But I think using LaTex in certain areas that excells, it's better to use LaTeX for everything

:)