brentthorne / posterdown

Use RMarkdown to generate PDF Conference Posters via HTML
https://brentthorne.github.io/posterdown_html_showcase/
Other
842 stars 131 forks source link

Add option to adjust column widths in posterdown_betterland #106

Closed dr-JT closed 4 years ago

dr-JT commented 5 years ago

Add option to adjust column widths in posterdown_betterland.

It would be nice to have the option to make the central panel (Main Section) narrower or wider

hollzzar commented 5 years ago

I would also like this option, as well as for posterdown_html.

brentthorne commented 4 years ago

Great idea! I have made this possible now :tada:

To change the main section width of the poster please use the YAML option main_width and provide a number between 0 and 1. The outer columns will adjust accordingly :upside_down_face:

Here's a minimal example where the width of the "main section" is set to 40% of the posters width thus making each outer column width 30% of the poster width, and because 40 + 30 + 30 = 100 everyone is happy! :fire:

pretend Rmd file:

---
title: My title
main_findings: 
    - My main finding
main_width: 0.4
output: posterdown_posterdown_betterland
---

# Introduction

Some text in the paragraph.

I will close this issue for now and will ask kindly that you submit a new issue for any future problems with this feature once you've had time to try it out!

Cheers!

thealk commented 4 years ago

This is such a lovely package - thank you! I am concerned that main_width is not doing as intended though.

From the template, here's a slightly edited YAML:

Attempting main_width: 0.2

---
title: A MWE of main_width with `posterdown`
author:
  - name: thealk
main_findings:
  - "This is with main_width: 0.2"
main_width: 0.2
output: 
  posterdown::posterdown_betterland:
    self_contained: false
    pandoc_args: --mathjax
    highlight: haddock
    number_sections: false
link-citations: true
bibliography: packages.bib
---

Output

mwe_2.pdf

Attempting main_width: 0.8

---
title: A MWE of main_width with `posterdown`
author:
  - name: thealk
main_findings:
  - "This is with main_width: 0.8"
main_width: 0.8
output: 
  posterdown::posterdown_betterland:
    self_contained: false
    pandoc_args: --mathjax
    highlight: haddock
    number_sections: false
link-citations: true
bibliography: packages.bib
---

Output

mwe_8.pdf

Other information:

Session info

R version 3.6.1 (2019-07-05)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] rmarkdown_1.18     knitr_1.26         posterdown_1.0     betterposter_0.0.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.3        highr_0.8         later_1.0.0       compiler_3.6.1    prettyunits_1.0.2 remotes_2.1.0    
 [7] tools_3.6.1       testthat_2.3.1    digest_0.6.23     packrat_0.5.0     pkgbuild_1.0.6    pkgload_1.0.2    
[13] jsonlite_1.6      memoise_1.1.0     evaluate_0.14     rlang_0.4.3       cli_2.0.1         rstudioapi_0.10  
[19] yaml_2.2.0        curl_4.3          pagedown_0.6      xfun_0.11         stringr_1.4.0     withr_2.1.2      
[25] desc_1.2.0        fs_1.3.1          devtools_2.2.1    websocket_1.1.0   rprojroot_1.3-2   glue_1.3.1       
[31] R6_2.4.1          processx_3.4.1    fansi_0.4.1       bookdown_0.16     sessioninfo_1.1.1 servr_0.15       
[37] callr_3.3.2       magrittr_1.5      promises_1.1.0    backports_1.1.5   ps_1.3.0          ellipsis_0.3.0   
[43] htmltools_0.4.0   usethis_1.5.1     rsconnect_0.8.16  assertthat_0.2.1  mime_0.7          httpuv_1.5.2     
[49] stringi_1.4.5     crayon_1.3.4 
jj-zhu commented 4 years ago

I'm also experiencing this issue. Setting `main_width' doesn't seem to make a difference.

le-huynh commented 4 years ago

This is such a lovely package - thank you! I am concerned that main_width is not doing as intended though.

Hi. I'm also experiencing this issue. The "posterdown" package installed from CRAN doesn't work with main_width option. I reinstalled the package directly from GitHub and main_width worked well.

rikudoukarthik commented 2 years ago

@le-huynh main-width started to work for me after reinstalling from GitHub as you suggested. However, my body text doesn't seem to respect the main section, and body text runs behind the main section instead of wrapping to the next line. I've tried all possible YAML options, but haven't been able to find a workaround.