davidgohel / officedown

https://ardata-fr.github.io/officeverse/officedown-for-word.html
Other
366 stars 27 forks source link

landscape? #117

Open jkylearmstrong opened 1 year ago

jkylearmstrong commented 1 year ago

Why is there a first and last page that are portrait?

is seems the only way I can get landscape is with the <!---BLOCK_LANDSCAPE_START---> <!---BLOCK_LANDSCAPE_END--->

repo is here https://github.com/jkylearmstrong/officedown_landscape_error

my system machine is in the on the word document in the repo

## [1] 1
##                _                                
## platform       x86_64-w64-mingw32               
## arch           x86_64                           
## os             mingw32                          
## crt            ucrt                             
## system         x86_64, mingw32                  
## status                                          
## major          4                                
## minor          3.1                              
## year           2023                             
## month          06                               
## day            16                               
## svn rev        84548                            
## language       R                                
## version.string R version 4.3.1 (2023-06-16 ucrt)
## nickname       Beagle Scouts

##           sysname           release           version          nodename 
##         "Windows"          "10 x64"     "build 22621" "LAPTOP-E8MGOGH8" 
##           machine             login              user    effective_user 
##          "x86-64"           "jkyle"           "jkyle"           "jkyle"
## [1] 2
``` 

I'm on officedown 0.3.0 
mps9506 commented 1 year ago

@jkylearmstrong , you didn't indicate what exactly didn't work, but if you want the entire document to be landscape you should be able to put the block section at the end of the doc. It defines the properties for the section preceding where it resides (my incorrect instinct is to put it at the start of the section).

```{r}
block_section(
  prop_section(
    page_size = page_size(orient = "landscape"),
    type = "continuous"
  )
)
```