Added support for boxes around section titles, will push to master when the readme is updated with it.
diff --git a/inst/rmarkdown/templates/posterdown_pdf/resources/template.tex b/inst/rmarkdown/templates/posterdown_pdf/resources/template.tex
index c09ee88..f290836 100644
--- a/inst/rmarkdown/templates/posterdown_pdf/resources/template.tex
+++ b/inst/rmarkdown/templates/posterdown_pdf/resources/template.tex
@@ -15,6 +15,7 @@
\RequirePackage{lmodern}
\RequirePackage{multicol}
\RequirePackage{graphicx}
+\RequirePackage{lipsum}
\RequirePackage{blindtext}
\RequirePackage[svgnames,table]{xcolor}
\RequirePackage{tikz}
@@ -22,6 +23,7 @@
\RequirePackage{color}
\RequirePackage{geometry}
\RequirePackage{adjmulticol}
+\RequirePackage[skins,most,listings,skins]{tcolorbox}
%For kable extra package :)
@@ -48,6 +50,7 @@
\definecolor{columnlinecol}{HTML}{$columnline_col$}
\definecolor{posterbgcol}{HTML}{$poster_bgcol$}
\definecolor{headerbgcol}{HTML}{$header_bgcol$}
+\definecolor{headerbordercol}{HTML}{$header_bordercol$}
% Text Colours
\definecolor{titletextcol}{HTML}{$title_textcol$}
@@ -84,11 +87,25 @@
\setlength{\columnseprule}{1pt}
\def\columnseprulecolor{\color{columnlinecol}}
+%define section header title features
\setsubsubsecheadstyle{\small\color{headertextcol}\textbf}% Set \section style
-\setsecheadstyle{\small\color{headertextcol}}
\setsecnumformat{}
\def\sectionmark#1{\markboth{#1}{#1}}
+
+%tcolorbox magic from my stack exchange question
+\newtcolorbox{myboxstuff}[1][]{code={\parindent=0em},colframe=headerbordercol,left skip=0pt,valign=center,halign=center,fontupper=\Large\bfseries,colupper=headertextcol,boxrule=$header_borderwidth$,$header_boxshape$,colback=headerbgcol, #1}
+\newcommand{\mybox}[1]{%
+\begin{myboxstuff}
+\strut #1
+\end{myboxstuff}%
+}
+\makeheadstyles{MyBox}{
+ \setsecheadstyle{\mybox}
+}
+\headstyles{MyBox}\makepagestyle{MyBox}
+
+
%-----------------------------------------------------
\thispagestyle{empty}
@@ -96,7 +113,7 @@
%biblatex options
\RequirePackage[sorting=none,backend=biber]{biblatex}
-\renewcommand*{\bibfont}{\$bibliography_font_size$}
+\renewcommand*{\bibfont}{\tiny}
\bibliography{$bibliography$}
\defbibheading{bibliography}[\bibname]{%
\section*{#1}%
@@ -109,9 +126,11 @@
\author{$author$}
\title{$title$}
\counterwithout{section}{chapter}
+
+
\makechapterstyle{mydefault}{
\addtocounter{secnumdepth}{2}
-\setsecheadstyle{\centering\Large\color{headertextcol}\textbf}
+\setsecheadstyle{\mybox}
\setsubsecheadstyle{\itshape}
\setsubsubsecheadstyle{\itshape}
}
diff --git a/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
index ef92be3..1126b67 100644
--- a/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
@@ -16,26 +16,30 @@
cite_col: "CC0000" #colour of ciation elements
url_col: "008080" #colour of url links
link_col: "008080" #colour of other links within the poster
-columnline_col: "0b4545" #colour
-header_bgcol: "008080"
+columnline_col: "ffffff" #colour
#Text Colours
title_textcol: "ffffff" #colour of title text
author_textcol: "008080" # Colour of author text
affiliation_textcol: "FFFFFF" # Colour of affiliation text
body_textcol: "000000" # Colour of main text in the body of poster
-header_textcol: "CC0000" # Colour of the poster header titles
-footnote_textcol: "FFFFFF" # Colour of footnote text if used
+footnote_textcol: "ffffff" # Colour of footnote text if used
#----POSTER SIZE & COLUMN FORMATTING----#
-poster_height: "38in" # height in inches of poster
+poster_height: "40in" # height in inches of poster
poster_width: "45in" # width in inches of poster
-column_numbers: 3 # Number of columns that the poster has
-column_margins: "10mm" # Margin spacing for columns
+column_numbers: 4 # Number of columns that the poster has
+column_margins: "5mm" # Margin spacing for columns
+
+#---- Section Titles Styling ----#
+header_textcol: "ffffff" # Colour of the poster header titles
+header_bgcol: "0b4545" # Colour of the header title box
+header_bordercol: "0b4545" # Colour of the border around the box (if you dont want one then set border size to 0)
+header_borderwidth: "6pt" # Thicknes of the header box border
+header_boxshape: "sharp corners" # Lots of options can be used for this. Another example is "rounded corners". I will make a list soon!
#----OTHER----#
bibliography: MyLibrary # name of the .bib file used for referencing
-bibliography_font_size: "tiny" # size of the bibliography in latex options (tiny, scriptsize, footnotesize, small, normalsize, etc.)
output: posterdown::posterdown_pdf
---
@@ -88,10 +92,14 @@
This package uses the same workflow approach as the `RMarkdown` you know and love. Basically it goes from RMarkdown > Knitr > Markdown > Pandoc > Latex > PDF
+\lipsum[1-3]
+
# Results
Usually you want to have a nice table displaying some important results that you have calcualated. In posterdown this is as easy as using the `kable` table formatting you are probably use to as per typical `RMarkdown` formatting. I suggesting checking out the `kableExtra` package and its in depth documentation on customizing these tables found [here](https://haozhu233.github.io/kableExtra/awesome_table_in_pdf.pdf).
+\vspace{1in}
+
```{r}
library(kableExtra)
library(ggplot2)
@@ -133,7 +141,7 @@
```
-\vspace{1in}
+
```{r, out.width='80%', fig.width=4.5, fig.align='center', echo=TRUE, fig.height=5, fig.cap='Another figure showing how base R plots might look on this poster!'}
@@ -152,6 +160,7 @@
```
+\lipsum[1-3]
# Next Steps
@@ -164,6 +173,6 @@
- Include References section only if initiated by the user like in RMarkdown.
<!--- Here you can set the size of the citation text as well as remove the "References" section if you choose not to have one for some reason :) -->
-\printbibliography
+\small\printbibliography