Skip to content

Commit 39192d9

Browse files
committed
doc: add typst as available output
1 parent 2ce5988 commit 39192d9

10 files changed

Lines changed: 27 additions & 18 deletions

File tree

DESCRIPTION

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: flextable
33
Title: Functions for Tabular Reporting
4-
Version: 0.10.0.003
4+
Version: 0.10.0.004
55
Authors@R: c(
66
person("David", "Gohel", , "david.gohel@ardata.fr", role = c("aut", "cre")),
77
person("ArData", role = "cph"),
@@ -21,8 +21,9 @@ Authors@R: c(
2121
person("Keith", "Newman", role = "ctb")
2222
)
2323
Description: Use a grammar for creating and customizing pretty tables.
24-
The following formats are supported: 'HTML', 'PDF', 'RTF', 'Microsoft
25-
Word', 'Microsoft PowerPoint', R 'Grid Graphics' and 'patchwork'.
24+
The following formats are supported: 'HTML', 'PDF', 'Typst', 'RTF',
25+
'Microsoft Word', 'Microsoft PowerPoint', R 'Grid Graphics' and
26+
'patchwork'.
2627
'R Markdown', 'Quarto' and the package 'officer' can be used to
2728
produce the result files. The syntax is the same for the user
2829
regardless of the type of output to be produced. A set of functions

NEWS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
## new features
44

5-
- flextable now supports PDF/typst output format.
5+
- flextable now supports Typst output: tables are printed automatically in
6+
Quarto documents with `format: typst` and `save_as_typst()` exports one or more
7+
flextables to a standalone `.typ` file.
68

79
## issues
810

R/05_content.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -766,7 +766,7 @@ to_wml_word_field <- function(x, pr_txt) {
766766
#' The chunk is used with [compose()], [append_chunks()]
767767
#' or [prepend_chunks()]. It requires the `flextable-qmd` Lua
768768
#' filter extension (see [use_flextable_qmd()]) and works with
769-
#' HTML, PDF and Word (docx) Quarto output formats.
769+
#' HTML, PDF, Typst and Word (docx) Quarto output formats.
770770
#'
771771
#' @section Setup:
772772
#'

R/flextable.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
#' - Word - a Word 'tab' element
4848
#' - PowerPoint - a PowerPoint 'tab' element
4949
#' - latex - tag "\\quad "
50+
#' - Typst - horizontal space `#h(1em)`
5051
#' @section flextable parts:
5152
#'
5253
#' A `flextable` is made of 3 parts: header, body and footer.

R/printers.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,9 +526,10 @@ print.flextable <- function(x, preview = "html", align = "center", ...) {
526526
#' a flextable in R Markdown and Quarto documents. You do not need to call
527527
#' it directly.
528528
#'
529-
#' Supported output formats: HTML, Word (docx), PDF and PowerPoint (pptx).
530-
#' For other formats (e.g., `github_document`, `beamer_presentation`),
531-
#' the table is rendered as a PNG image.
529+
#' Supported output formats: HTML, Word (docx), PDF, PowerPoint (pptx) and
530+
#' Typst (`format: typst`, Quarto only). For other formats (e.g.,
531+
#' `github_document`, `beamer_presentation`), the table is rendered as a
532+
#' PNG image.
532533
#'
533534
#' @section Getting started:
534535
#'
@@ -616,7 +617,8 @@ print.flextable <- function(x, preview = "html", align = "center", ...) {
616617
#'
617618
#' @section Quarto:
618619
#'
619-
#' flextable works natively in Quarto documents for HTML, PDF and Word.
620+
#' flextable works natively in Quarto documents for HTML, PDF, Word and
621+
#' Typst.
620622
#'
621623
#' The `flextable-qmd` Lua filter extension enables Quarto markdown
622624
#' inside flextable cells: cross-references (`@tbl-xxx`, `@fig-xxx`),

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ publication from a `data.frame` and provides convenience function
4646
such as an object returned from `table()` or a model.
4747

4848
Tables can be embedded within HTML, PDF, Word and PowerPoint documents
49-
from R Markdown and Quarto documents and within RTF or Microsoft Word
50-
or PowerPoint documents with package [officer](https://davidgohel.github.io/officer/).
49+
from R Markdown and Quarto documents (plus Typst with Quarto) and within
50+
RTF or Microsoft Word or PowerPoint documents with package [officer](https://davidgohel.github.io/officer/).
5151
Tables can also be exported as image files (png, svg) or combined with
5252
ggplot2 plots in patchwork layouts.
5353

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ objects to a flextable, such as an object returned from `table()` or a
2020
model.
2121

2222
Tables can be embedded within HTML, PDF, Word and PowerPoint documents
23-
from R Markdown and Quarto documents and within RTF or Microsoft Word or
24-
PowerPoint documents with package
23+
from R Markdown and Quarto documents (plus Typst with Quarto) and within
24+
RTF or Microsoft Word or PowerPoint documents with package
2525
[officer](https://davidgohel.github.io/officer/). Tables can also be
2626
exported as image files (png, svg) or combined with ggplot2 plots in
2727
patchwork layouts.

man/as_qmd.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/flextable.Rd

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/knit_print.flextable.Rd

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)