Skip to content

Commit 04806f3

Browse files
committed
doc: added a note to the bookdown example and to the Word template skeleton
1 parent 78273e5 commit 04806f3

3 files changed

Lines changed: 12 additions & 1 deletion

File tree

inst/examples/bookdown/02-toc.Rmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Tables of content {#toc}
22

3+
> Note: tables of content, figures and tables are Word *fields*. They are
4+
> **computed by Word, not by officedown**. When you first open the generated
5+
> document, Word shows the placeholder "No table of contents entries found"
6+
> until the fields are updated: select all (`Ctrl+A`) then press `F9`, or
7+
> right-click a table and choose "Update Field" (fields are also refreshed when
8+
> printing). LibreOffice does not update these fields.
9+
310
## Table of figures
411

512
<!---BLOCK_TOC{style: 'Image Caption'}--->

inst/examples/bookdown/03-tables.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if(require("flextable")){
2929
ft <- fontsize(ft, size = 9, part = "all")
3030
ft <- compose(x = ft, j = "mpg",
3131
value = as_paragraph(
32-
value = lollipop(value = mpg, min = 0, max = 30, positivecol = "#DD2233", rangecol = "#DD2233")
32+
value = minibar(value = mpg, min = 0, max = 30, barcol = "#DD2233")
3333
))
3434
ft <- compose(x = ft, j = "drat",
3535
value = as_paragraph(

inst/rmarkdown/templates/word/skeleton/skeleton.Rmd

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ This document presents most of the features of the package `r ftext("officedown"
2929

3030
## Table of content
3131

32+
> These tables are Word fields, computed by Word and not by officedown. When the
33+
> document opens, update the fields to populate them (`Ctrl+A` then `F9`, or
34+
> right-click > "Update Field"); LibreOffice does not update them.
35+
3236
<!---BLOCK_TOC--->
3337

3438
## List of figures

0 commit comments

Comments
 (0)