File: theme_tron_legacy.Rd

package info (click to toggle)
r-cran-flextable 0.8.4-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 2,264 kB
  • sloc: sh: 15; makefile: 2
file content (63 lines) | stat: -rw-r--r-- 2,105 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/themes.R
\name{theme_tron_legacy}
\alias{theme_tron_legacy}
\title{Apply tron legacy theme}
\usage{
theme_tron_legacy(x)
}
\arguments{
\item{x}{a flextable object}
}
\description{
Apply theme tron legacy to a flextable
}
\section{Illustrations}{


\if{html}{\figure{fig_theme_tron_legacy_1.png}{options: width="400"}}
}

\section{behavior}{

Theme functions are not like 'ggplot2' themes. They are applied to the existing
table \strong{immediately}. If you add a row in the footer, the new row is not formatted
with the theme. The theme function applies the theme only to existing elements
when the function is called.

That is why theme functions should be applied after all elements of the table
have been added (mainly additionnal header or footer rows).

If you want to automatically apply a theme function to each flextable,
you can use the \code{theme_fun} argument of \code{\link[=set_flextable_defaults]{set_flextable_defaults()}}; be
aware that this theme function is applied as the last instruction when
calling \code{flextable()} - so if you add headers or footers to the array,
they will not be formatted with the theme.

You can also use the \code{post_process_html} argument
of \code{\link[=set_flextable_defaults]{set_flextable_defaults()}} (or \code{post_process_pdf},
\code{post_process_docx}, \code{post_process_pptx}) to specify a theme
to be applied systematically before the \code{flextable()} is printed;
in this case, don't forget to take care that the theme doesn't
override any formatting done before the print statement.
}

\examples{
ft <- flextable(head(airquality))
ft <- theme_tron_legacy(ft)
ft
}
\seealso{
Other functions related to themes: 
\code{\link{get_flextable_defaults}()},
\code{\link{set_flextable_defaults}()},
\code{\link{theme_alafoli}()},
\code{\link{theme_apa}()},
\code{\link{theme_booktabs}()},
\code{\link{theme_box}()},
\code{\link{theme_tron}()},
\code{\link{theme_vader}()},
\code{\link{theme_vanilla}()},
\code{\link{theme_zebra}()}
}
\concept{functions related to themes}