is_docx <- knitr::pandoc_to("docx")
is_latex <- knitr::pandoc_to("latex")

table_format <- ifelse(is_docx, "huxtable", 'default')

# I don't know how Texas Instruments smart this is, but p-sure default DPI is 96.
# That's not a problem for LaTeX, but it looks not-so-great for Word.
# For Word, let's up that to 600. This should allow for cross-referencing 
# in {bookdown} while allowing for conditional DPI

if (is_latex) {
  conditional_dpi <- 96
  return(conditional_dpi)
} else {
  conditional_dpi <- 600
  return(conditional_dpi)
} 

knitr::opts_chunk$set(echo = FALSE,
                      message=FALSE, warning=FALSE,
                      fig.path='doc/figs/',
                      cache.path = 'doc/_cache/',
                      fig.width = 8.5, dpi = conditional_dpi,
                      fig.process = function(x) {
                      x2 = sub('-\\d+([.][a-z]+)$', '\\1', x)
                      x2 = paste0(stringr::str_extract(x2, '.*/'), 
                                  "appendix-", 
                                  stringr::str_remove(x2, ".*/"))
                      if (file.rename(x, x2)) x2 else x
                      })

options(knitr.kable.NA = '')

\tableofcontents \newpage

You Can Start Putting Stuff Here

Hi Mom!

References

\setlength{\parskip}{6pt}



svmiller/steveproj documentation built on May 7, 2023, 9:16 p.m.