Skip to content

Commit

Permalink
Merge pull request #226 from FredHutch/flextable-tex-bugfix
Browse files Browse the repository at this point in the history
latex template fix to allow flextable to render tables
  • Loading branch information
kelliemac authored Aug 12, 2024
2 parents a49081a + 8b0663f commit ebb9496
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Bug fixes
* Provide default CRAN mirror if missing in install_load_cran_packages(), e.g., in a child R session during knitting. Fixes 'trying to use CRAN without setting a mirror' error (#218)
* Update template.tex so that flextable package can be used to create tables in PDF documents (#226)

Other improvements
* create_visc_project() now discards README.Rmd after knitting template to README.md (#223)
Expand Down
5 changes: 5 additions & 0 deletions inst/rmarkdown/templates/visc_report/resources/template.tex
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
\usepackage{threeparttable} % provides a scheme for tables that have a structured (foot)note section, after the caption
\usepackage{threeparttablex} % provides the functionality of the threeparttable package to tables created using the longtable package

% needed for flextable to work
\usepackage{hhline}
\newlength\Oldarrayrulewidth
\newlength\Oldtabcolsep

% being able to set emphasis for entire table row
\newcommand\setrow[1]{\gdef\rowmac{#1}#1\ignorespaces}
\newcommand\clearrow{\global\let\rowmac\relax}
Expand Down

0 comments on commit ebb9496

Please sign in to comment.