Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to use a (locally-sourced) full width image in place of the title banner? #127

Open
petrelhead opened this issue Feb 2, 2021 · 0 comments

Comments

@petrelhead
Copy link

petrelhead commented Feb 2, 2021

Thank you for making posterdown ! This is more a general question than an issue - hope that is ok!

I am trying to use posterdown to recreate a leaflet style A4 size document with a full-width header and 2 columns of content (it's a bit of a hack, but appears to be my best chance of doing this in R...?). I need to reproduce this document annually with updated results. I have previously had to generate the outputs in R but collate them all in Word. The doc requires combinations of text and figures in 2 columns and a header (banner) title with logo at the top that spans across the whole width of the page. I have this full-width header image with logo embedded saved as a .png file and I would like to be able to use it in place of the current topsize and title parts of the poster template. I have removed these existing parts of the poster, so that my content starts right at the top, but can't work out how to include a full-width banner image at the top (that I source from .png) - followed by the column formatting below. Is this possible?

I am using the posterdown_betterport template, but I guess this query could relate to all templates really. I am using windows 10, R version 4.0.2, and R Studio version 1.3.959. I am using the github version of posterdown.

What I have tried so far is removing the title and standard header and then adding my own image as the first thing on the poster - but this doesn't seem to allow the image to span the full page width (it only displays in the left-hand column and is then cut off...

main_topsize: 0 # remove the standard header and footer
main_bottomsize: 0
# title: '**A Better Reproducible Poster Title**' # Remove title - all content should push up to avoid having white space where title would have been.
poster_height: "29.7cm" # Change to A4 size
poster_width: "21cm"
main_textsize: "12pt" # Adjust text size so it is suitable for A4 output
body_textsize: "12pt"
title_textsize: "30pt"
caption_textsize: "12pt"
column_numbers: 2
output: 
  posterdown::posterdown_betterport:
    self_contained: false
    pandoc_args: --mathjax
    number_sections: false
bibliography: packages.bib
link-citations: true
---

```{r, include=FALSE}
knitr::opts_chunk$set(echo = FALSE,
                      warning = FALSE,
                      tidy = FALSE,
                      message = FALSE,
                      fig.align = 'center',
                      out.width = "100%")
options(knitr.table.format = "html") ``` 

![alt text](Header_and_title_bar_square.png) # Try including my full-width .png file that I want as the header image 

Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant