read Word styles and get results in a data.frame.

styles_info(
  x,
  type = c("paragraph", "character", "table", "numbering"),
  is_default = c(TRUE, FALSE)
)

Arguments

x

an rdocx object

type, is_default

subsets for types (i.e. paragraph) and default style (when is_default is TRUE or FALSE)

See also

Other functions for Word document informations: doc_properties(), docx_bookmarks(), docx_dim(), length.rdocx(), set_doc_properties()

Examples

x <- read_docx()
styles_info(x)
#>    style_type             style_id             style_name is_custom is_default
#> 1   paragraph               Normal                 Normal     FALSE       TRUE
#> 2   paragraph               Titre1              heading 1     FALSE      FALSE
#> 3   paragraph               Titre2              heading 2     FALSE      FALSE
#> 4   paragraph               Titre3              heading 3     FALSE      FALSE
#> 5   character       Policepardfaut Default Paragraph Font     FALSE       TRUE
#> 6       table        TableauNormal           Normal Table     FALSE       TRUE
#> 7   numbering          Aucuneliste                No List     FALSE       TRUE
#> 8   character               strong                 strong      TRUE      FALSE
#> 9   paragraph             centered               centered      TRUE      FALSE
#> 10      table        tabletemplate         table_template      TRUE      FALSE
#> 11      table  Listeclaire-Accent2    Light List Accent 2     FALSE      FALSE
#> 12  character            Titre1Car            Titre 1 Car      TRUE      FALSE
#> 13  character            Titre2Car            Titre 2 Car      TRUE      FALSE
#> 14  character            Titre3Car            Titre 3 Car      TRUE      FALSE
#> 15  paragraph         ImageCaption          Image Caption      TRUE      FALSE
#> 16  paragraph         TableCaption          Table Caption      TRUE      FALSE
#> 17      table Tableauprofessionnel     Table Professional     FALSE      FALSE
#> 18  paragraph                  TM1                  toc 1     FALSE      FALSE
#> 19  paragraph                  TM2                  toc 2     FALSE      FALSE
#> 20  paragraph        Textedebulles           Balloon Text     FALSE      FALSE
#> 21  character     TextedebullesCar    Texte de bulles Car      TRUE      FALSE
#> 22  character          referenceid           reference_id      TRUE      FALSE
#> 23  paragraph         graphictitle          graphic title      TRUE      FALSE
#> 24  paragraph           tabletitle            table title      TRUE      FALSE
styles_info(x, type = "paragraph", is_default = TRUE)
#>   style_type style_id style_name is_custom is_default
#> 1  paragraph   Normal     Normal     FALSE       TRUE