Merge pull request #18 from brentthorne/master

Fixed the kableExtra table error
diff --git a/.RData b/.RData
index a7eda15..3aa7b30 100644
--- a/.RData
+++ b/.RData
Binary files differ
diff --git a/.Rhistory b/.Rhistory
index 860f3d2..2ccee4b 100644
--- a/.Rhistory
+++ b/.Rhistory
@@ -13,7 +13,6 @@
 library(posterdown)
 library(posterdown)
 library(posterdown)
-library(posterdown)
 tibble(iris)
 iris <- tibble(iris)
 data("iris")
@@ -510,3 +509,4 @@
 install.packages("cranlogs")
 weights <- dep_weight("posterdown")
 View(weights)
+library(posterdown)
diff --git a/.Rproj.user/441ADA46/pcs/files-pane.pper b/.Rproj.user/441ADA46/pcs/files-pane.pper
index f2ab743..de6e98a 100644
--- a/.Rproj.user/441ADA46/pcs/files-pane.pper
+++ b/.Rproj.user/441ADA46/pcs/files-pane.pper
@@ -1,5 +1,5 @@
 {
-    "path" : "~/Documents/GitHub/posterdown",
+    "path" : "~/Documents/GitHub/posterdown/inst/rmarkdown/templates/posterdown_pdf/skeleton",
     "sortOrder" : [
         {
             "ascending" : false,
diff --git a/.Rproj.user/441ADA46/pcs/source-pane.pper b/.Rproj.user/441ADA46/pcs/source-pane.pper
index 1743e40..70829f6 100644
--- a/.Rproj.user/441ADA46/pcs/source-pane.pper
+++ b/.Rproj.user/441ADA46/pcs/source-pane.pper
@@ -1,3 +1,3 @@
 {
-    "activeTab" : 0
+    "activeTab" : 1
 }
\ No newline at end of file
diff --git a/.Rproj.user/441ADA46/pcs/workbench-pane.pper b/.Rproj.user/441ADA46/pcs/workbench-pane.pper
index 0e24b84..b15bf23 100644
--- a/.Rproj.user/441ADA46/pcs/workbench-pane.pper
+++ b/.Rproj.user/441ADA46/pcs/workbench-pane.pper
@@ -1,5 +1,5 @@
 {
-    "TabSet1" : 0,
+    "TabSet1" : 3,
     "TabSet2" : 0,
     "TabZoom" : {
     }
diff --git a/.Rproj.user/441ADA46/persistent-state b/.Rproj.user/441ADA46/persistent-state
index 65a654a..248cac3 100644
--- a/.Rproj.user/441ADA46/persistent-state
+++ b/.Rproj.user/441ADA46/persistent-state
@@ -1,6 +1,6 @@
 build-last-errors="[]"
 build-last-errors-base-dir="~/Documents/GitHub/posterdown/"
-build-last-outputs="[{\"output\":\"==> R CMD INSTALL --preclean --no-multiarch --with-keep.source posterdown\\n\\n\",\"type\":0},{\"output\":\"* installing to library ‘/home/thornux/R/x86_64-pc-linux-gnu-library/3.5’\\n\",\"type\":1},{\"output\":\"* installing *source* package ‘posterdown’ ...\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** R\\n\",\"type\":1},{\"output\":\"** inst\\n\",\"type\":1},{\"output\":\"** byte-compile and prepare package for lazy loading\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** help\\n\",\"type\":1},{\"output\":\"*** installing help indices\\n\",\"type\":1},{\"output\":\"** building package indices\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** testing if installed package can be loaded\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"* DONE (posterdown)\\n\",\"type\":1},{\"output\":\"\",\"type\":1}]"
+build-last-outputs="[{\"output\":\"==> R CMD INSTALL --preclean --no-multiarch --with-keep.source posterdown\\n\\n\",\"type\":0},{\"output\":\"* installing to library ‘/home/thornux/R/x86_64-pc-linux-gnu-library/3.5’\\n\",\"type\":1},{\"output\":\"* installing *source* package ‘posterdown’ ...\\n\",\"type\":1},{\"output\":\"** R\\n\",\"type\":1},{\"output\":\"** inst\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** byte-compile and prepare package for lazy loading\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"** help\\n\",\"type\":1},{\"output\":\"*** installing help indices\\n\",\"type\":1},{\"output\":\"** building package indices\\n\",\"type\":1},{\"output\":\"** testing if installed package can be loaded\\n\",\"type\":1},{\"output\":\"\",\"type\":1},{\"output\":\"* DONE (posterdown)\\n\",\"type\":1},{\"output\":\"\",\"type\":1}]"
 compile_pdf_state="{\"errors\":[],\"output\":\"\",\"running\":false,\"tab_visible\":false,\"target_file\":\"\"}"
 files.monitored-path=""
 find-in-files-state="{\"handle\":\"\",\"input\":\"\",\"path\":\"\",\"regex\":true,\"results\":{\"file\":[],\"line\":[],\"lineValue\":[],\"matchOff\":[],\"matchOn\":[]},\"running\":false}"
diff --git a/.Rproj.user/441ADA46/sources/s-D813FBD9/2F24B1BB b/.Rproj.user/441ADA46/sources/per/t/2F24B1BB
similarity index 81%
rename from .Rproj.user/441ADA46/sources/s-D813FBD9/2F24B1BB
rename to .Rproj.user/441ADA46/sources/per/t/2F24B1BB
index 84d23ba..6b4bd79 100644
--- a/.Rproj.user/441ADA46/sources/s-D813FBD9/2F24B1BB
+++ b/.Rproj.user/441ADA46/sources/per/t/2F24B1BB
@@ -5,10 +5,10 @@
     "dirty" : false,
     "encoding" : "UTF-8",
     "folds" : "",
-    "hash" : "0",
+    "hash" : "2227939390",
     "id" : "2F24B1BB",
-    "lastKnownWriteTime" : 1547924047,
-    "last_content_update" : 1547924047,
+    "lastKnownWriteTime" : 1547934159,
+    "last_content_update" : 1547934159,
     "path" : "~/Documents/GitHub/posterdown/DESCRIPTION",
     "project_path" : "DESCRIPTION",
     "properties" : {
diff --git a/.Rproj.user/441ADA46/sources/s-D813FBD9/2F24B1BB-contents b/.Rproj.user/441ADA46/sources/per/t/2F24B1BB-contents
similarity index 100%
rename from .Rproj.user/441ADA46/sources/s-D813FBD9/2F24B1BB-contents
rename to .Rproj.user/441ADA46/sources/per/t/2F24B1BB-contents
diff --git a/.Rproj.user/441ADA46/sources/s-D813FBD9/815ADF03 b/.Rproj.user/441ADA46/sources/per/t/815ADF03
similarity index 90%
rename from .Rproj.user/441ADA46/sources/s-D813FBD9/815ADF03
rename to .Rproj.user/441ADA46/sources/per/t/815ADF03
index e5c4122..ba254fc 100644
--- a/.Rproj.user/441ADA46/sources/s-D813FBD9/815ADF03
+++ b/.Rproj.user/441ADA46/sources/per/t/815ADF03
@@ -5,7 +5,7 @@
     "dirty" : false,
     "encoding" : "UTF-8",
     "folds" : "",
-    "hash" : "0",
+    "hash" : "83736655",
     "id" : "815ADF03",
     "lastKnownWriteTime" : 1547924098,
     "last_content_update" : 1547924098455,
@@ -13,7 +13,7 @@
     "project_path" : "README.md",
     "properties" : {
         "cursorPosition" : "134,0",
-        "scrollLine" : "124"
+        "scrollLine" : "0"
     },
     "relative_order" : 2,
     "source_on_save" : false,
diff --git a/.Rproj.user/441ADA46/sources/s-D813FBD9/815ADF03-contents b/.Rproj.user/441ADA46/sources/per/t/815ADF03-contents
similarity index 100%
rename from .Rproj.user/441ADA46/sources/s-D813FBD9/815ADF03-contents
rename to .Rproj.user/441ADA46/sources/per/t/815ADF03-contents
diff --git a/.Rproj.user/441ADA46/sources/per/t/CE1C4972 b/.Rproj.user/441ADA46/sources/per/t/CE1C4972
new file mode 100644
index 0000000..4254c7c
--- /dev/null
+++ b/.Rproj.user/441ADA46/sources/per/t/CE1C4972
@@ -0,0 +1,22 @@
+{
+    "collab_server" : "",
+    "contents" : "",
+    "created" : 1547934272425.000,
+    "dirty" : false,
+    "encoding" : "UTF-8",
+    "folds" : "",
+    "hash" : "1644768190",
+    "id" : "CE1C4972",
+    "lastKnownWriteTime" : 1547934305,
+    "last_content_update" : 1547934305964,
+    "path" : "~/Documents/GitHub/posterdown/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd",
+    "project_path" : "inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd",
+    "properties" : {
+        "cursorPosition" : "99,77",
+        "scrollLine" : "96"
+    },
+    "relative_order" : 3,
+    "source_on_save" : false,
+    "source_window" : "",
+    "type" : "r_markdown"
+}
\ No newline at end of file
diff --git a/.Rproj.user/441ADA46/sources/per/t/CE1C4972-contents b/.Rproj.user/441ADA46/sources/per/t/CE1C4972-contents
new file mode 100644
index 0000000..b035b15
--- /dev/null
+++ b/.Rproj.user/441ADA46/sources/per/t/CE1C4972-contents
@@ -0,0 +1,168 @@
+---
+#----ESSENTIALS----#
+title: '\fontfamily{phv}\selectfont Using posterdown to generate reproducible conference posters via RMarkdown > Knitr > Markdown > Pandoc > Latex > PDF workflow'
+author: "Author One^1^ Author Two^2^"
+affiliation: "^1^Department of Poster Layouts, University of Markdown; ^2^Deparment of Another Institution, Institution University"
+
+#----FONT STYLE----#
+font_size: "30pt" #sets '\normalsize' (sizes of the title and sections headings will adjust based on it)
+font_family: "palatino" # choose from typical latex fonts (example: "palatino")
+
+#----COLOURS----#
+
+#Background/ Line Colours
+title_bgcol: "0b4545"  #Hex colour for background of poster title section (default is blue)
+poster_bgcol: "ffffff" #colour of the poster main background
+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"
+
+#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
+
+#----POSTER SIZE & COLUMN FORMATTING----#
+poster_height: "38in" # 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
+
+#----OTHER----#
+bibliography: MyLibrary # name of the .bib file used for referencing
+output: posterdown::posterdown_pdf
+---
+
+```{r, include=FALSE}
+knitr::opts_chunk$set(echo = FALSE, results = 'asis',fig.height = 3.5, fig.width = 4.5, out.width = "100%", warning = FALSE, fig.align = 'center', message = FALSE, dev='cairo_pdf')
+```
+
+<!--
+Bellow you will find typical RMarkdown syntax which should fill in the columns for the poster from top to bottom left to right. The more information you have the more will be filled. Please let me know if you have feedback at brentthorne18@gmail.com or at github.com/brentthorne/posterdown
+
+ENJOY! XD
+-->
+
+# Introduction
+
+Welcome to `posterdown` ! This is my attempt to provide a semi-smooth workflow for those who wish to take their `RMarkdown` skills to the conference world. Many creature comforts from `RMarkdown` are available in this package such as `Markdown` section notation, figure captioning, and even citations like this one [@holden_identifying_2012] The rest of this example poster will show how you can insert typical conference poster features into your own document. 
+
+# Study Site
+
+Here is a map made to show the study site using `ggplot2`, `ggspatial`, and `sf`. Lorem ipsum dolor sit amet, [@middleton_geological_nodate] consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Phasellus vestibulum lorem sed risus ultricies tristique nulla. Mauris vitae ultricies leo integer malesuada nunc vel risus commodo. Suspendisse potenti nullam ac tortor vitae. Enim nunc faucibus a pellentesque sit amet porttitor eget.
+
+```{r, fig.width=4.5, out.width="80%", fig.cap='This is a map of Canada, the ggspatial package is great for GIS folks in R!', cache=TRUE}
+library(ggplot2)
+library(ggspatial)
+library(ggthemes)
+library(sf)
+
+canada <- read_sf("data/Canada.geojson")
+
+ggplot() +
+  ggspatial::layer_spatial(canada, fill = "grey") +
+  ggspatial::annotation_north_arrow(location = "br", which_north = "true", style = north_arrow_nautical()) +
+  coord_sf() +
+  theme_solarized() +
+  NULL
+```
+
+
+# Objectives
+
+\large
+
+1. Easy to use reproducible poster design. 
+2. Integration with `RMarkdown`.
+3. Easy transition from `posterdown` to `thesisdown` or `rticles`
+
+\small
+
+# Methods
+
+This package uses the same workflow approach as the `RMarkdown` you know and love. Basically it goes from RMarkdown > Knitr > Markdown > Pandoc > Latex > PDF
+
+# 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).
+
+```{r}
+library(kableExtra)
+library(ggplot2)
+
+data("iris")
+
+kable(iris[1:4,],align = "c", caption = "Tables are a breeze with Kable and Kable extra package!", booktabs = TRUE) %>% 
+  kable_styling(latex_options = c("striped","HOLD_position"),full_width = TRUE, font_size = 25)
+
+```
+
+\vspace{1in}
+
+```{r, out.width='75%', fig.width=4, fig.height=3, fig.cap='A typical plot using ggplot using the classic iris dataset.'}
+
+library(ggplot2)
+library(ggthemes)
+
+ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
+  geom_point() +
+  theme_fivethirtyeight() +
+  labs(x = "Sepal Length", y = "Sepeal Width") +
+  NULL
+
+```
+
+\vspace{1in}
+
+```{r, out.width='85%', fig.width=4.5, fig.height=4, fig.cap='Another typical plot using ggplot, this time with a different theme and r code chunk options for fig.width and fig.height.'}
+
+library(ggplot2)
+library(ggthemes)
+
+ggplot(data = iris, aes(x = Sepal.Length, y = Sepal.Width, colour = Species)) +
+  geom_point() +
+  theme_hc() +
+  labs(x = "Sepal Length", y = "Sepeal Width") +
+  NULL
+
+```
+
+\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!'}
+
+# Here is some code for people
+# to look at and be in awe of!!!!
+library(ggplot2)
+library(ggthemes)
+
+ggplot(data=iris,
+       aes(x = Sepal.Width,
+           y = Sepal.Length,
+           colour = Species)) +
+  geom_point() +
+  theme_stata() +
+  NULL
+
+```
+
+
+# Next Steps
+
+There is still **A LOT** of work to do on this package which include (but are note limited to): 
+
+- Better softcoding for front end user options in YAML
+- Images in the title section for logo placement which is a common attribut to posters as far as I have come to know.
+- Figure out compatiability with `natbib` which wasn't working during the initial set up.
+- MUCH BETTER PACKAGE DOCUMENTATION. For example, there is nothing in the README...
+- 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 :) -->
+\small\printbibliography
+
+
diff --git a/.Rproj.user/441ADA46/sources/prop/60EAAA4E b/.Rproj.user/441ADA46/sources/prop/60EAAA4E
index 49bceed..cd6cc3c 100644
--- a/.Rproj.user/441ADA46/sources/prop/60EAAA4E
+++ b/.Rproj.user/441ADA46/sources/prop/60EAAA4E
@@ -1,4 +1,4 @@
 {
-    "cursorPosition" : "138,30",
-    "scrollLine" : "82"
+    "cursorPosition" : "99,77",
+    "scrollLine" : "96"
 }
\ No newline at end of file
diff --git a/.Rproj.user/441ADA46/sources/prop/91EB04FB b/.Rproj.user/441ADA46/sources/prop/91EB04FB
index 84f0b4a..ef0305f 100644
--- a/.Rproj.user/441ADA46/sources/prop/91EB04FB
+++ b/.Rproj.user/441ADA46/sources/prop/91EB04FB
@@ -1,4 +1,4 @@
 {
     "cursorPosition" : "134,0",
-    "scrollLine" : "124"
+    "scrollLine" : "0"
 }
\ No newline at end of file
diff --git a/.Rproj.user/441ADA46/sources/s-D813FBD9/lock_file b/.Rproj.user/441ADA46/sources/s-D813FBD9/lock_file
deleted file mode 100644
index e69de29..0000000
--- a/.Rproj.user/441ADA46/sources/s-D813FBD9/lock_file
+++ /dev/null
diff --git a/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/441ADA46899DC320/chunks.json b/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/441ADA46899DC320/chunks.json
new file mode 100644
index 0000000..074cedf
--- /dev/null
+++ b/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/441ADA46899DC320/chunks.json
@@ -0,0 +1 @@
+{"chunk_definitions":[],"doc_write_time":1547934280}
\ No newline at end of file
diff --git a/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/s/chunks.json b/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/s/chunks.json
index c628e71..074cedf 100644
--- a/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/s/chunks.json
+++ b/.Rproj.user/shared/notebooks/E9E00AA3-skeleton/1/s/chunks.json
@@ -1 +1 @@
-{"chunk_definitions":[],"doc_write_time":1547777223}
\ No newline at end of file
+{"chunk_definitions":[],"doc_write_time":1547934280}
\ No newline at end of file
diff --git a/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
index 6b65bf8..b035b15 100644
--- a/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_pdf/skeleton/skeleton.Rmd
@@ -98,7 +98,7 @@
 data("iris")
 
 kable(iris[1:4,],align = "c", caption = "Tables are a breeze with Kable and Kable extra package!", booktabs = TRUE) %>% 
-  kable_styling(latex_options = "striped",full_width = TRUE, font_size = 25)
+  kable_styling(latex_options = c("striped","HOLD_position"),full_width = TRUE, font_size = 25)
 
 ```