Skip to content
This repository was archived by the owner on Mar 23, 2020. It is now read-only.

Commit 88c8fbf

Browse files
committed
example width
1 parent ef05183 commit 88c8fbf

File tree

2 files changed

+32
-32
lines changed

2 files changed

+32
-32
lines changed

examples/docx_example.R

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ doc = addParagraph( doc, "Document title", stylename = "TitleDoc" )
1717

1818
# add a paragraph
1919
doc = addParagraph( doc , "This document is generated with ReporteRs."
20-
, stylename="Citationintense")
20+
, stylename="Citationintense")
2121

2222
# add page break
2323
doc = addPageBreak( doc )
@@ -44,8 +44,8 @@ doc = addPageBreak( doc )
4444
# add a title
4545
doc = addTitle( doc, "Texts demo", level = 1 )
4646
texts = c( "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
47-
, "In sit amet ipsum tellus. Vivamus dignissim arcu sit amet faucibus auctor."
48-
, "Quisque dictum tristique ligula."
47+
, "In sit amet ipsum tellus. Vivamus dignissim arcu sit amet faucibus auctor."
48+
, "Quisque dictum tristique ligula."
4949
)
5050

5151
# add simple text
@@ -54,19 +54,19 @@ doc = addParagraph( doc, value = texts, stylename="BulletList" )
5454
# Add "My tailor is rich" and "Cats and Dogs"
5555
# format some of the pieces of text
5656
pot1 = pot("My tailor"
57-
, textProperties(color="red", font.size = 12 ) ) + " is " + pot("rich"
58-
, textProperties(font.weight="bold") )
57+
, textProperties(color="red", font.size = 12 ) ) + " is " + pot("rich"
58+
, textProperties(font.weight="bold") )
5959
pot2 = pot("Cats"
60-
, textProperties(color="red", font.size = 12)
61-
) + " and " + pot("Dogs"
62-
, textProperties(color="blue", font.size = 12) )
60+
, textProperties(color="red", font.size = 12)
61+
) + " and " + pot("Dogs"
62+
, textProperties(color="blue", font.size = 12) )
6363
doc = addParagraph(doc, set_of_paragraphs( pot1, pot2 ), stylename="Normal" )
6464

6565
################ PLOT DEMO ################
6666

6767
myplot = qplot(Sepal.Length, Petal.Length
68-
, data = iris, color = Species
69-
, size = Petal.Width, alpha = I(0.7)
68+
, data = iris, color = Species
69+
, size = Petal.Width, alpha = I(0.7)
7070
)
7171
# Add titles and then 'myplot'
7272
doc = addTitle( doc, "Plot examples", level = 1 )
@@ -91,18 +91,18 @@ doc = addTitle( doc, "FlexTable example", level = 1 )
9191
# Create a FlexTable with data.frame mtcars, display rownames
9292
# use different formatting properties for header and body cells
9393
MyFTable = FlexTable( data = mtcars, add.rownames = TRUE
94-
, body.cell.props = cellProperties( border.color = "#EDBD3E")
95-
, header.cell.props = cellProperties( background.color = "#5B7778" )
94+
, body.cell.props = cellProperties( border.color = "#EDBD3E")
95+
, header.cell.props = cellProperties( background.color = "#5B7778" )
9696
)
9797
# zebra stripes - alternate colored backgrounds on table rows
9898
MyFTable = setZebraStyle( MyFTable, odd = "#D1E6E7", even = "#93A8A9" )
9999

100100
# applies a border grid on table
101101
MyFTable = setFlexTableBorders(MyFTable
102-
, inner.vertical = borderProperties( color="#EDBD3E", style="dotted" )
103-
, inner.horizontal = borderProperties( color = "#EDBD3E", style = "none" )
104-
, outer.vertical = borderProperties( color = "#EDBD3E", style = "solid" )
105-
, outer.horizontal = borderProperties( color = "#EDBD3E", style = "solid" )
102+
, inner.vertical = borderProperties( color="#EDBD3E", style="dotted" )
103+
, inner.horizontal = borderProperties( color = "#EDBD3E", style = "none" )
104+
, outer.vertical = borderProperties( color = "#EDBD3E", style = "solid" )
105+
, outer.horizontal = borderProperties( color = "#EDBD3E", style = "solid" )
106106
)
107107

108108
# add MyFTable into document

man/docx.Rd

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ doc = addParagraph( doc, "Document title", stylename = "TitleDoc" )
6565
6666
# add a paragraph
6767
doc = addParagraph( doc , "This document is generated with ReporteRs."
68-
, stylename="Citationintense")
68+
, stylename="Citationintense")
6969
7070
# add page break
7171
doc = addPageBreak( doc )
@@ -92,8 +92,8 @@ doc = addPageBreak( doc )
9292
# add a title
9393
doc = addTitle( doc, "Texts demo", level = 1 )
9494
texts = c( "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
95-
, "In sit amet ipsum tellus. Vivamus dignissim arcu sit amet faucibus auctor."
96-
, "Quisque dictum tristique ligula."
95+
, "In sit amet ipsum tellus. Vivamus dignissim arcu sit amet faucibus auctor."
96+
, "Quisque dictum tristique ligula."
9797
)
9898
9999
# add simple text
@@ -102,19 +102,19 @@ doc = addParagraph( doc, value = texts, stylename="BulletList" )
102102
# Add "My tailor is rich" and "Cats and Dogs"
103103
# format some of the pieces of text
104104
pot1 = pot("My tailor"
105-
, textProperties(color="red", font.size = 12 ) ) + " is " + pot("rich"
106-
, textProperties(font.weight="bold") )
105+
, textProperties(color="red", font.size = 12 ) ) + " is " + pot("rich"
106+
, textProperties(font.weight="bold") )
107107
pot2 = pot("Cats"
108-
, textProperties(color="red", font.size = 12)
109-
) + " and " + pot("Dogs"
110-
, textProperties(color="blue", font.size = 12) )
108+
, textProperties(color="red", font.size = 12)
109+
) + " and " + pot("Dogs"
110+
, textProperties(color="blue", font.size = 12) )
111111
doc = addParagraph(doc, set_of_paragraphs( pot1, pot2 ), stylename="Normal" )
112112
113113
################ PLOT DEMO ################
114114
115115
myplot = qplot(Sepal.Length, Petal.Length
116-
, data = iris, color = Species
117-
, size = Petal.Width, alpha = I(0.7)
116+
, data = iris, color = Species
117+
, size = Petal.Width, alpha = I(0.7)
118118
)
119119
# Add titles and then 'myplot'
120120
doc = addTitle( doc, "Plot examples", level = 1 )
@@ -139,18 +139,18 @@ doc = addTitle( doc, "FlexTable example", level = 1 )
139139
# Create a FlexTable with data.frame mtcars, display rownames
140140
# use different formatting properties for header and body cells
141141
MyFTable = FlexTable( data = mtcars, add.rownames = TRUE
142-
, body.cell.props = cellProperties( border.color = "#EDBD3E")
143-
, header.cell.props = cellProperties( background.color = "#5B7778" )
142+
, body.cell.props = cellProperties( border.color = "#EDBD3E")
143+
, header.cell.props = cellProperties( background.color = "#5B7778" )
144144
)
145145
# zebra stripes - alternate colored backgrounds on table rows
146146
MyFTable = setZebraStyle( MyFTable, odd = "#D1E6E7", even = "#93A8A9" )
147147
148148
# applies a border grid on table
149149
MyFTable = setFlexTableBorders(MyFTable
150-
, inner.vertical = borderProperties( color="#EDBD3E", style="dotted" )
151-
, inner.horizontal = borderProperties( color = "#EDBD3E", style = "none" )
152-
, outer.vertical = borderProperties( color = "#EDBD3E", style = "solid" )
153-
, outer.horizontal = borderProperties( color = "#EDBD3E", style = "solid" )
150+
, inner.vertical = borderProperties( color="#EDBD3E", style="dotted" )
151+
, inner.horizontal = borderProperties( color = "#EDBD3E", style = "none" )
152+
, outer.vertical = borderProperties( color = "#EDBD3E", style = "solid" )
153+
, outer.horizontal = borderProperties( color = "#EDBD3E", style = "solid" )
154154
)
155155
156156
# add MyFTable into document

0 commit comments

Comments
 (0)