add default font size for title if user doesn't set one.
remove `comment = FALSE` from knitr options as mentioned in issue #79
diff --git a/inst/rmarkdown/templates/posterdown_betterland/resources/template.html b/inst/rmarkdown/templates/posterdown_betterland/resources/template.html
index 868aa3a..b7f3e31 100644
--- a/inst/rmarkdown/templates/posterdown_betterland/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_betterland/resources/template.html
@@ -157,7 +157,11 @@
color: $secondary_colour$;
}
#title {
+$if(title_textsize)$
font-size: $title_textsize$;
+$else$
+font-size: 125pt;
+$endif$
text-align: left;
padding-right: 7%;
padding-left: 7%;
diff --git a/inst/rmarkdown/templates/posterdown_betterland/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_betterland/skeleton/skeleton.Rmd
index 5bf74e8..573af26 100644
--- a/inst/rmarkdown/templates/posterdown_betterland/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_betterland/skeleton/skeleton.Rmd
@@ -31,7 +31,7 @@
affiliation_textsize: "25px"
affiliation_textcol: '#00000060'
caption_fontsize: "20pt"
-#Middle of the poster
+#Findings Section "Middle" of the poster
middle_fontfamily: "Special Elite"
middle_textcol: "#FFFFFF90"
middle_fontsize: "170px"
@@ -59,78 +59,15 @@
---
```{r, include=FALSE}
-knitr::opts_chunk$set(results = 'asis', echo = FALSE, comment = FALSE, warning = FALSE,tidy = FALSE, message = FALSE, fig.align = 'center')
+knitr::opts_chunk$set(results = 'asis',
+ echo = FALSE,
+ warning = FALSE,
+ tidy = FALSE,
+ message = FALSE,
+ fig.align = 'center')
options(knitr.table.format = "html")
```
# Introduction
This is the `posterdown_betterland` template for the {posterdown} package! I was inspired by the twitter thread of [Mike Morrison](https://mobile.twitter.com/mikemorrison/status/1110191245035479041) and wanted to apply the `#betterposter` concept to the reproducible (yet simple to use) functionality of the {posterdown} package [@thorneposterdown2019]. If you're not an R user don't sweat as you do **NOT** need to use it at all! Feel free to use only the Markdown functionality of this package :)
-
-# Methods
-
-1. Install R and `posterdown`, see [github](github.com/brentthorne/posterdown)
-2. Open the `posterdown_betterland` template
-3. Make all your poster dreams come true!
-
-# Results
-
-```{r, out.width='90%', fig.height=5.5, fig.cap='Using {ggplot} and {patchwork} to generate a layout of multiple plots in one figure [@patchwork2017].'}
-
-library(tidyverse)
-library(patchwork)
-library(ggthemes)
-
-theme_set(theme_tufte() + theme(legend.position = "none"))
-
-base <- ggplot(iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species))
-
-p_point <- base + geom_point()
-p_line <- base + geom_line()
-p_area <- base + geom_area()
-p_box1 <- ggplot(iris) + geom_boxplot(aes(x = Species, y = Sepal.Length, fill = Species))
-p_box2 <- ggplot(iris) + geom_boxplot(aes(x = Species, y = Sepal.Width, fill = Species))
-
-p_line +
- {p_point + p_box1} +
- plot_layout(ncol = 1) + plot_annotation(tag_levels = "a", tag_prefix = "(",tag_suffix = ")")
-
-```
-
-## More Figures and Tables
-
-```{r, mytable, fig.align='center', out.width='90%'}
-
-library(knitr)
-library(kableExtra)
-
-dt <- iris[1:5, 1:5]
-
-kable(dt, caption = 'Here is a caption for the table made with the {kableExtra} package [@kableExtra2019].',align = 'c', col.names = c("Sepal W","Sepal L","Pedal W","Pedal L","Species")) %>%
- kable_styling(full_width = T) %>%
- row_spec(0, color = "#fff", background = "#0b454580")
-```
-
-```{r, echo=TRUE}
-library(ggplot2)
-library(ggspatial)
-
-load_longlake_data()
-
-map <- ggplot() +
- theme_pander() +
- layer_spatial(longlake_depthdf,
- aes(colour = DEPTH)) +
- theme(legend.position = "bottom")
-```
-
-```{r, mymapfig, out.width='70%', cache=FALSE, fig.cap='Map of Long Lake eample from the [ggspatial](https://github.com/paleolimbot/ggspatial) package [@ggspatial].',strip.white= TRUE, comment=FALSE}
-
-ggsave(map,filename = "Figures/map.svg", width = 3.5, height = 3.5, device = 'svg', bg = 'transparent')
-
-knitr::include_graphics("Figures/map.svg")
-```
-
-A **BIG** thank you to [Romain Leasur](https://twitter.com/RLesur) and [Yihui Xie](https://twitter.com/xieyihui) for their wonderful work on [{pagedown}](https://github.com/rstudio/pagedown) which had made this poster possible [@pagedown]!
-
-# References
diff --git a/inst/rmarkdown/templates/posterdown_betterport/resources/template.html b/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
index ec1c048..d83507b 100644
--- a/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
@@ -54,6 +54,7 @@
height: $poster_height$;
text-align: justify;
font-size: $body_textsize$;
+line-height: 1.05;
}
/* RMarkdown Class Styles */
/* center align leaflet map,
@@ -97,18 +98,6 @@
font-size: $caption_fontsize$;
font-style: italic;
}
-tbody tr:nth-child(odd) {
- background-color: $primary_colour$20;
-}
-.table>thead>tr>th, .table>tbody>tr>th, .table>tfoot>tr>th, .table>thead>tr>td, .table>tbody>tr>td, .table>tfoot>tr>td{
- border-spacing: 0;
- border-style: none;
- padding-top: 15px;
- padding-bottom: 15px;
- padding-right: 20px;
- padding-left: 20px;
- line-height: 1.42857143;
-}
.caption {
font-size: $caption_fontsize$;
font-style: italic;
@@ -124,10 +113,10 @@
}
.outer {
width: $poster_width$;
-height: calc($poster_height$ * 0.6325);
--webkit-column-count: 3; /* Chrome, Safari, Opera */
--moz-column-count: 3; /* Firefox */
-column-count: 3;
+height: calc($poster_height$ * $if(emph_size)$ (1 - $emph_size$ - $emphb_size$ - 0.01) $else$ 0.6325 $endif$);
+-webkit-column-count: $column_numbers$; /* Chrome, Safari, Opera */
+-moz-column-count: $column_numbers$; /* Firefox */
+column-count: $column_numbers$;
-webkit-column-fill: auto;
-moz-column-fill: auto;
column-fill: auto;
@@ -145,7 +134,7 @@
column-rule-color: black;
background-color: $body_bgcol$;
font-family: $font_family$;
-margin-top: calc($poster_height$ * 0.25);
+margin-top: calc($poster_height$ * $if(emph_size)$ $emph_size$ $else$ 0.25 $endif$);
padding-top: 1em;
padding-bottom: 1em;
}
@@ -160,25 +149,19 @@
#title {
font-size: $title_textsize$;
text-align: left;
-padding-right: 5%;
-padding-left: 5%;
margin: 0;
line-height: 98%;
border-bottom: 0;
font-weight: normal;
}
#author {
-padding-right: 5%;
-padding-left: 5%;
color: $primary_colour$;
margin: 0;
line-height: 85%;
font-size: $author_textsize$;
}
#affiliation {
-padding-right: 5%;
-padding-left: 5%;
-padding-top: 1em;
+padding-top: 0.1em;
color: $affiliation_textcol$;
font-style: italic;
font-size: $affiliation_textsize$;
@@ -201,8 +184,6 @@
font-size: 30px;
}
.author_extra {
-padding-right: 5%;
-padding-left: 5%;
color: $secondary_colour$;
margin: 0;
line-height: 85%;
@@ -211,16 +192,35 @@
}
.outer h1, h2, h3, h4, h5, h6 {
text-align: center;
-margin-top: 0.5in;
-margin-bottom: 0.5in;
-font-weight: normal;
+margin: 0;
+font-weight: bold;
+}
+.section h1 {
+ text-align:center;
+ padding-bottom:5px;
+ background:
+ linear-gradient(
+ to left,
+ $body_bgcol$ 1%,
+ $body_bgcol$ 20%,
+ $primary_colour$75 33%,
+ $primary_colour$ 50%,
+ $primary_colour$75 66%,
+ $body_bgcol$ 80%,
+ $body_bgcol$ 99%
+ )
+ left
+ bottom
+ $body_bgcol$
+ no-repeat;
+ background-size:100% 5px ;
+ margin-top: 0.5em;
+ margin-bottom: 0.5em;
}
.outer h2 {
text-align: center;
}
.outer p, .level2 {
-padding-right: 5%;
-padding-left: 5%;
color: #000000;
}
.outer ol {
@@ -230,7 +230,7 @@
}
.middle {
width: $poster_width$;
-height: calc($poster_height$ * 0.25);
+height: calc($poster_height$ * $if(emph_size)$ $emph_size$ $else$ 0.25 $endif$);
position: absolute;
background-color: $primary_colour$;
color: $middle_textcol$$middle_textalpha$;
@@ -268,10 +268,11 @@
opacity: 0.6
}
.middle p {
-padding-left: 7%;
-padding-right: 7%;
font-size: $middle_fontsize$;
text-align: left;
+margin: 0;
+margin-left: 0.2em;
+margin-top: 0.75em;
}
.fab {
color: #00000030;
@@ -299,13 +300,18 @@
}
.emphasis_bottom {
width: $poster_width$;
-height: calc($poster_height$ * 0.1);
-margin-top: calc($poster_height$ * 0.9);
+height: calc($poster_height$ * $if(emphb_size)$ $emphb_size$ $else$ 0.1 $endif$);
+margin-top: calc($poster_height$ * $if(emphb_size)$ (1 - $emphb_size$) $else$ 0.9 $endif$);
position: absolute;
background-color: $primary_colour$;
background-image: linear-gradient($secondary_colour$ 10%, $primary_colour$);
}
+.section, #author, #author_extra, #affiliation, #title {
+ padding-left: 7mm;
+ padding-right: 7mm;
+}
+
span > #tab:mytable {
font-weight: bold;
}
@@ -357,7 +363,7 @@
<div class="emphasis_bottom">
<img id="middle-img-left" src=$logoleft_name$>
<img id="middle-img-center" src=$logocenter_name$>
-<img id="middle-img-right" src="$logoright_name$">
+<img id="middle-img-right" src=$logoright_name$>
</div>
</div>
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5834.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5834.png
deleted file mode 100644
index c069f64..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5834.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5835.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5835.png
deleted file mode 100644
index d5646da..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5271_5835.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5834.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5834.png
deleted file mode 100644
index 9f8c5c6..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5834.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5835.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5835.png
deleted file mode 100644
index d730e99..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5272_5835.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5834.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5834.png
deleted file mode 100644
index 2b6b5e5..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5834.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5835.png b/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5835.png
deleted file mode 100644
index cb41c0a..0000000
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/rosm.cache/osm/14_5273_5835.png
+++ /dev/null
Binary files differ
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
index c2fe1d1..7255402 100644
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
@@ -2,6 +2,8 @@
# PLEASE SEE THE README for in depth description github.com/brentthorne/posterdown
poster_height: "48in"
poster_width: "36in"
+emph_size: 0.2 #percent coverage of the poster
+emphb_size: 0.1
font_family: 'Rasa'
#ESSENTIALS
title: '**A Better Reproducible Poster Title**'
@@ -14,7 +16,7 @@
email: bthorne2@brocku.ca
- name: Another G. Contributor
affil: 2
- main: false
+ main: true
email: 'ag.con@posterdown.net'
- name: Person Three
affil: 3
@@ -72,7 +74,6 @@
knitr::opts_chunk$set(
results = 'asis',
echo = FALSE,
- comment = FALSE,
warning = FALSE,
message = FALSE,
fig.align = 'center'
diff --git a/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
index a51d690..f80ef0c 100644
--- a/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_html/skeleton/skeleton.Rmd
@@ -65,7 +65,6 @@
knitr::opts_chunk$set(
results = 'asis',
echo = FALSE,
- comment = FALSE,
warning = FALSE,
message = FALSE,
fig.align = 'center'