Merge branch 'master' of https://github.com/brentthorne/posterdown
diff --git a/DESCRIPTION b/DESCRIPTION
index 3f554ef..b6a0cbf 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -16,7 +16,7 @@
person(given = "Luke",
family = "Johnston",
role = "ctb"))
-Description: Use rmarkdown and pagedown to generate
+Description: Use 'rmarkdown' and 'pagedown' to generate
HTML and PDF conference posters.
License: MIT + file LICENSE
URL: https://github.com/brentthorne/posterdown
diff --git a/R/posterdown_html.R b/R/posterdown_html.R
index 31675d2..7b999b9 100644
--- a/R/posterdown_html.R
+++ b/R/posterdown_html.R
@@ -6,12 +6,6 @@
#' @return R Markdown output format to pass to
#' [rmarkdown::render()]
#'
-#' @examples
-#'
-#' \dontrun{
-#' library(rmarkdown)
-#' draft("MyArticle.Rmd", template = "posterdown_html", package = "posterdown")
-#' }
#' @export
posterdown_html <- function(...,
template = find_resource("posterdown_html", "template.html"),
diff --git a/inst/rmarkdown/templates/posterdown_betterport/resources/template.html b/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
index 70cc3cf..db12659 100644
--- a/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
+++ b/inst/rmarkdown/templates/posterdown_betterport/resources/template.html
@@ -334,6 +334,9 @@
span > #tab:mytable {
font-weight: bold;
}
+.orcid img {
+ width: 3%;
+}
</style>
</head>
<body>
@@ -351,7 +354,7 @@
$for(author)$
$if(author.main)$
-$author.name$<sup> $author.affil$</sup><br>
+$author.name$<sup> $author.affil$$if(author.orcid)$, <a class="orcid" src="https://orcid.org/$author.orcid$"><img src="https://raw.githubusercontent.com/brentthorne/posterdown/master/images/orcid.jpg"></a>$else$$endif$</sup><br>
$if(author.twitter)$<a class="twitter" href="https://mobile.twitter.com/$author.twitter$"><i class="fab fa-twitter"></i> @$author.twitter$</a><br>
$else$$endif$
$if(author.email)$
@@ -365,7 +368,7 @@
$for(author)$
$if(author.main)$
$else$
-$author.name$<sup>$author.affil$</sup>
+$author.name$<sup>$author.affil$$if(author.orcid)$, <a class="orcid" src="https://orcid.org/$author.orcid$"><img src="https://raw.githubusercontent.com/brentthorne/posterdown/master/images/orcid.jpg"></a>$else$$endif$</sup>
$endif$
$sep$ $endfor$
</h5>
diff --git a/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd b/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
index 1848a52..3c60770 100644
--- a/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
+++ b/inst/rmarkdown/templates/posterdown_betterport/skeleton/skeleton.Rmd
@@ -40,7 +40,6 @@
posterdown::posterdown_betterport:
self_contained: false
pandoc_args: --mathjax
- highlight: espresso
number_sections: false
bibliography: packages.bib
link-citations: true
@@ -81,13 +80,16 @@
To reference a citation you can add your `.bib` file to the working directory and name it in the YAML metadata or generate an automated one as done here, then you only need to reference the label value in the `.bib` file. For example this package is built on top of the wonderful {pagedown} package and I will cite it at the end of this sentance using this in the rmd `[@R-pagedown]` [@R-pagedown].
+To get a better understanding of how to include features like these please refer to the {posterdown} [wiki](https://github.com/posterdown/wiki).
+
+**_Now on to the results!_**
# Results
Here you may have some figures to show off, bellow I have made a scatterplot with the infamous Iris dataset and I can even reference to the figure automatically like this, `Figure \@ref(fig:irisfigure)`, Figure \@ref(fig:irisfigure).
-```{r, irisfigure, fig.cap='Here is a caption for the figure. This can be added by using the "fig.cap" option in the r code chunk options, see this [link](https://yihui.name/knitr/options/#plots) from the legend himself, [Yihui Xie](https://twitter.com/xieyihui).'}
-
+```{r, irisfigure, fig.cap='Here is a caption for the figure. This can be added by using the "fig.cap" option in the r code chunk options, see this [link](https://yihui.name/knitr/options/#plots) from the legend himself, [Yihui Xie](https://twitter.com/xieyihui).', out.width="80%"}
+par(mar=c(2,2,0,1))
plot(x = iris$Sepal.Length, y = iris$Sepal.Width,
col = iris$Species, pch = 19, xlab = "Sepal Length",
ylab = "Sepal Width")
@@ -95,7 +97,7 @@
Maybe you want to show off some of that fancy code you spent so much time on to make that figure, well you can do that too! Just use the `echo=TRUE` option in the r code chunk options, Figure \@ref(fig:myprettycode)!
-```{r myprettycode, echo=TRUE,collapse=TRUE, fig.cap='Boxplots, so hot right now!', fig.height=9.5, out.width="100%"}
+```{r myprettycode, echo=FALSE, collapse=TRUE, fig.cap='Boxplots, so hot right now!', fig.height=3.5, out.width="80%"}
#trim whitespace
par(mar=c(2,2,0,0))
#plot boxplots
@@ -110,7 +112,7 @@
```{r, iristable}
knitr::kable(
- iris[1:10,1:5], format = "html",
+ iris[1:8,1:5], format = "html",
caption = "A table made with the **knitr::kable** function.",
align = "c", col.names = c("Sepal <br> Length",
"Sepal <br> Width",
diff --git a/man/posterdown_html.Rd b/man/posterdown_html.Rd
index dddff57..3201e71 100644
--- a/man/posterdown_html.Rd
+++ b/man/posterdown_html.Rd
@@ -35,10 +35,3 @@
The output format \code{poster_betterport()} mimics the style of the
BetterPoster movement from twitter.
}
-\examples{
-
-\dontrun{
-library(rmarkdown)
-draft("MyArticle.Rmd", template = "posterdown_html", package = "posterdown")
-}
-}