Skip to content

remlapmot/mr2019-tom-palmer-poster

Repository files navigation

Repository for my poster at the Mendelian randomization conference 2019

Here are the steps to recreate the poster.

  1. Install the posterdown package and, due to the edits I made to my HTML template file, install the version of the bookdown package at this commit.

    # remotes::install_github("brentthorne/posterdown") # uncomment on first run
    # remotes::install_github("rstudio/bookdown@364092a") # uncomment on first run
  2. Launch the posterdown Rmd template for the portrait version of the Better Scientific Poster.

    rmarkdown::draft("mr2019-tom-palmer-poster.Rmd", 
                     template = "posterdown_betterport", 
                     package = "posterdown",
                     edit = FALSE)
  3. Edit the Rmd file with your content.

    • I edited the html template provided by posterdown:
      • to make the icons opaque
      • to make a level 4 header force a column break before the header. This is so that I could position the “Extra Figures & Tables” header at the top of the column. Note since I wanted the text of that header to be at level 1 I had to introduce the column break with a header level that I didn’t use anywhere else on the poster. I used a level 4 header, so in my edited template I included the following code.
      .section h4 {
          break-before: column;
      }
      Then to trigger the column break in the poster Rmd file I included an empty level 4 header ####.
  4. Render the Rmd file to html. This can be achieved either by clicking the Knit button in RStudio or by running (change the file name for your poster’s Rmd file).

    rmarkdown::render('mr2019-tom-palmer-poster.Rmd',  encoding = 'UTF-8')
  5. To render on github pages:

    • I copied the html poster and its associated _files folder and folder of figures, Figures, to the docs folder because I prefer enabling github pages for a repo from the docs folder rather than from a separate branch. The html file is renamed to index.html (its _files folder doesn’t need renaming, and in fact is empty, so doesn’t show on the GitHub repo) so the github pages page will render.
    # install.packages("fs") # uncomment on first run
    fs::file_copy("mr2019-tom-palmer-poster.html",
                  "./docs/index.html",
                  overwrite = TRUE)
    fs::dir_copy("./Figures", "./docs/Figures", overwrite = TRUE)
    fs::dir_copy("./mr2019-tom-palmer-poster_files", 
                 "./docs/mr2019-tom-palmer-poster_files", overwrite = TRUE)
    • I then enabled github pages for this repository in the repository settings on GitHub.
  6. The pdf version of the poster can be generated either by opening the html version in Google Chrome and selecting Print then Save as PDF through the menus or by using the chrome_print() function in the pagedown package as follows.

    pagedown::chrome_print("mr2019-tom-palmer-poster.html")
    • Note, I find that occasionally page and column breaks can be in slightly different positions in the pdf compared to the html, so it’s always worth opening the pdf and checking this.
  7. Note that this README.md file is generated by knitting README.Rmd as follows.

    rmarkdown::render('README.Rmd',  encoding = 'UTF-8')
  8. For reproducibility, I report my R session information.

    # install.packages("sessioninfo") # uncomment on first run
    sessioninfo::session_info()
    ## - Session info ----------------------------------------------------------
    ##  setting  value                       
    ##  version  R version 3.6.0 (2019-04-26)
    ##  os       Windows 10 x64              
    ##  system   x86_64, mingw32             
    ##  ui       RTerm                       
    ##  language (EN)                        
    ##  collate  English_United Kingdom.1252 
    ##  ctype    English_United Kingdom.1252 
    ##  tz       Europe/London               
    ##  date     2019-07-12                  
    ## 
    ## - Packages --------------------------------------------------------------
    ##  package     * version date       lib
    ##  assertthat    0.2.1   2019-03-21 [1]
    ##  bookdown      0.11.2  2019-07-12 [1]
    ##  bpbounds    * 0.1.3   2019-02-10 [1]
    ##  cli           1.1.0   2019-03-19 [1]
    ##  crayon        1.3.4   2017-09-16 [1]
    ##  digest        0.6.20  2019-07-04 [1]
    ##  evaluate      0.14    2019-05-28 [1]
    ##  fs            1.3.1   2019-05-06 [1]
    ##  highr         0.8     2019-03-20 [1]
    ##  htmltools     0.3.6   2017-04-28 [1]
    ##  httpuv        1.5.1   2019-04-05 [1]
    ##  jsonlite      1.6     2018-12-07 [1]
    ##  knitr         1.23    2019-05-18 [1]
    ##  later         0.8.0   2019-02-11 [1]
    ##  magrittr      1.5     2014-11-22 [1]
    ##  mime          0.7     2019-06-11 [1]
    ##  pagedown      0.2.9   2019-07-08 [1]
    ##  posterdown    1.0     2019-07-11 [1]
    ##  processx      3.4.0   2019-07-03 [1]
    ##  promises      1.0.1   2018-04-13 [1]
    ##  ps            1.3.0   2018-12-21 [1]
    ##  R6            2.4.0   2019-02-14 [1]
    ##  Rcpp          1.0.1   2019-03-17 [1]
    ##  rlang         0.4.0   2019-06-25 [1]
    ##  rmarkdown     1.13    2019-05-22 [1]
    ##  servr         0.14    2019-06-11 [1]
    ##  sessioninfo   1.1.1   2018-11-05 [1]
    ##  stringi       1.4.3   2019-03-12 [1]
    ##  stringr       1.4.0   2019-02-10 [1]
    ##  websocket     1.0.0   2019-06-18 [1]
    ##  withr         2.1.2   2018-03-15 [1]
    ##  xfun          0.8     2019-06-25 [1]
    ##  yaml          2.2.0   2018-07-25 [1]
    ##  source                                 
    ##  CRAN (R 3.6.0)                         
    ##  Github (rstudio/bookdown@364092a)      
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.1)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  Github (rstudio/pagedown@65bd7f1)      
    ##  Github (brentthorne/posterdown@d259f41)
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ##  CRAN (R 3.6.0)                         
    ## 
    ## [1] C:/Users/palmertm/library
    ## [2] C:/Program Files/R/R-3.6.0/library
    

References

Morrison, M. A. 2019. Better Scientific Poster. https://osf.io/ef53g.

Thorne, W. Brent. 2019. posterdown: An R Package Built to Generate Reproducible Conference Posters for the Academic and Professional World Where Powerpoint and Pages Just Won’t Cut It. https://github.com/brentthorne/posterdown.