Huxtable has several options.
Details
options("huxtable.add_colnames")sets the default value foradd_colnamesinhuxtable()andas_huxtable(). As of version 5.0.0, this defaults toTRUE.options("huxtable.print")sets the print method for huxtable objects. Seeprint.huxtable().options("huxtable.knitr_output_format")overrides the default output format when huxtable objects are printed by knitr. Set to "html", "latex", "md" or "screen". IfNULL(the default), huxtable guesses the format usingguess_knitr_output_format().options("huxtable.autolabel"). IfTRUE, (the default) automatically setslabel()from the knitr chunk label, if there is one.options("huxtable.color_screen"). IfTRUEand packagecrayonis available, huxtables will be printed in color on screen.options("huxtable.bookdown"). Set toTRUEwithin a bookdown document to automatically print bookdown-style labels. If unset, huxtable will try to guess if we are in a bookdown document.options("huxtable.knit_print_df"). IfTRUE, data frames in knitr will be pretty-printed using huxtable. This option defaults toTRUEonly if huxtable is attached to the search path usinglibrary(); not if huxtable is merely loaded (e.g. imported by another package).options("huxtable.knit_print_df_theme"). A function applied to data frames before printing in knitr. The function should take one argument (a data frame) and return a huxtable. Defaults totheme_plain().options("huxtable.autoformat")sets the default value forautoformatinhuxtable()andas_huxtable(). It defaults toTRUE.options("huxtable.latex_use_fontspec"). IfTRUE, use the "fontspec" package, which allows you to use the same font names in TeX and HTML. This requires the the xetex or xelatex engine, which can be set using an .rmd header option. Note thatquick_pdf()may use pdflatex. The default isFALSE.options("huxtable.long_minus"). IfTRUE, prints long minus signs for numbers. The default isFALSE. In LaTeX output, this option is overridden byoptions("huxtable.latex_siunitx_align").options("huxtable.latex_siunitx_align"). IfTRUE, uses the\tablenummacro from the "siunitx" package to align numbers whenalign(ht)is"."or similar. Seealign()for details. The default isFALSE.options("huxtable.quarto_process"). IfTRUE, enables quarto processing of HTML tables. This overrides some huxtable styles, but may allow quarto to do other things, e.g. process citations correctly. The default isFALSE.options("huxtable.autoformat_number_format")andoptions("huxtable.autoformat_align")are lists. The list names are base R classes.huxtable()withautoformat = TRUEwill setnumber_format()andalign()for data columns according to the corresponding list values. For example, to center-alignDateobjects you could set"huxtable.autoformat_align"to something likelist(..., Date = "center", ...).
Author
Maintainer: David Hugh-Jones davidhughjones@gmail.com