html2pdf: html2pdf

View source: R/html2pdf.R

html2pdfR Documentation

html2pdf

Description

Convert sjPlot::tab_model() html tables to tex and pdf

extracts the table code (from ⁠\begin{longtable}⁠ to ⁠\end{longtable}⁠) from the Tex file which is generated with html2pdf

Usage

html2pdf(
  filename,
  table_width = 30,
  page_width = 8.5,
  page_height = 11,
  build_pdf = FALSE,
  clean = FALSE,
  style = TRUE,
  silent = TRUE,
  OS = NULL,
  path_w2l = NULL,
  name_table = "table1"
)

tex2Rmd(filename, output_file = "table.txt")

Arguments

filename

TeX file to read

table_width

Width of the table

page_width

In inches

page_height

In inches

build_pdf

TRUE/FALSE

clean

TRUE/FALSE clean intermediate files

style

makes table somewhat prettier

silent

TRUE/FALSE

OS

String identifying operating system (Linux, macOS or Windows)

path_w2l

Path to the Writer2latex files

Value

TeX file

txt file

Examples

## Not run: 
model = lmer(mpg ~ cyl * disp + (1|vs), mtcars)

# We save the sjPlot table to an .html file
sjPlot::tab_model(
  model,
  show.r2 = TRUE,
  show.icc = FALSE,
  show.re.var = FALSE,
  p.style = "scientific",
  emph.p = TRUE,
  file = "temp.html")

# Create tex and pdf
html2pdf(filename = "temp.html", table_width = 13, silent = TRUE,
          style = TRUE, build_pdf = TRUE, clean = TRUE)

## End(Not run)

gorkang/html2latex documentation built on Aug. 5, 2023, 3:47 a.m.