Paper
HTML HTML (new window) PDF PDF (new window) Manuscripty PDF Manuscript PDF (new window)
HTML HTML (new window) PDF PDF (new window) Manuscripty PDF Manuscript PDF (new window)
---
title: Paper
toc: false
page-layout: full
---
```{r include=FALSE}
# Add the output targets as dependencies to the overall website
targets::tar_load(c(output_nice, output_ms))
```
```{r include=FALSE}
library(dplyr)
library(glue)
links_to_include <- tribble(
~title, ~path,
~icon, ~btn_class, ~target,
"HTML", "/manuscript/output/manuscript.html",
'<i class="fa-solid fa-file-lines"></i>', "btn-success", "manuscript",
"HTML <small>(new window)</small>", "/manuscript/output/manuscript.html",
'<i class="fa-solid fa-arrow-up-right-from-square"></i>', "btn-success", "_blank",
"PDF", "/manuscript/output/manuscript.pdf",
'<i class="fa-solid fa-file-pdf"></i>', "btn-danger", "manuscript",
"PDF <small>(new window)</small>", "/manuscript/output/manuscript.pdf",
'<i class="fa-solid fa-file-arrow-down"></i>', "btn-danger", "_blank",
"Manuscripty PDF", "/manuscript/output-ms/manuscript.pdf",
'<i class="fa-solid fa-file-pdf"></i>', "btn-warning", "manuscript",
"Manuscript PDF <small>(new window)</small>", "/manuscript/output-ms/manuscript.pdf",
'<i class="fa-solid fa-file-arrow-down"></i>', "btn-warning", "_blank"
) %>%
mutate(nice_link = glue(
'<a class="btn [btn_class] btn-sm mb-1" href="[path]" target="[target]">',
'[icon]  [title]',
'</a>', .open = "[", .close = "]"
))
links <- paste(links_to_include$nice_link, collapse = "\n")
```
```{=html}
<p class="text-center">
`r links`
</p>
<iframe src="/manuscript/output/manuscript.html" frameborder="0" style="overflow:hidden;height:90%;width:100%;border:2px solid #ccc;" height="90%" width="100%" name="manuscript"></iframe>
```