-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Short pdf report extension for quarto (#11)
* Test to see push to which branch * Test to see push to which branch * Add in the pdf short report format * Table float option and move all include-in-head to template * Add in the blah ref * Add in the float option for figure * Move the yaml block config into extension * Fix my typo * Turn on the makefile for short report * Change the format to match with the extension * Rename to pdf-report to match with Makefile * Change the "-" in the format to "+" to enable quarto to render * Move to the correct location * Update the file path name
- Loading branch information
Showing
10 changed files
with
107 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,52 +3,19 @@ | |
title: "`r paste('Progress report for project', params[['project-number']])`" | ||
subtitle: "Subtitle here" | ||
params: | ||
uni: CU | ||
pri_bio: Your.Name | ||
project-number: ABC1234-567XYZ | ||
author: | ||
- Author 1 | ||
- Author 2 | ||
date: "`r format(Sys.time(), '%d %B, %Y')`" | ||
email: [email protected] | ||
version-number: 1.0.0 | ||
|
||
# Style options (Page/font size, Table of Contents, Section numbers, ..) | ||
fontsize: 12pt | ||
papersize: a4 | ||
toc: no | ||
number-sections: no | ||
sans-serif: yes | ||
links-as-footnotes: no | ||
|
||
# Bibliography options | ||
bibliography: references.bib | ||
csl: assets/biometrics.csl | ||
link-citations: true | ||
|
||
# LaTeX pdflatex options | ||
header-includes: | ||
- \usepackage{lipsum} | ||
output: | ||
bookdown::pdf_document2: | ||
keep_tex: yes | ||
latex_engine: pdflatex | ||
template: assets/AAGI_markdown.tex | ||
format: | ||
aagi-pdf+short+report: default | ||
--- | ||
|
||
```{r} | ||
#| include: false | ||
library(rmarkdown) | ||
knitr::opts_chunk$set( | ||
fig.path = "figure/Rplots-", | ||
fig.align = "center", | ||
fig.show = "hold", | ||
comment = NA, | ||
background = "white", | ||
highlight = FALSE, | ||
size = "small", | ||
prompt = TRUE | ||
) | ||
# library(rmarkdown) | ||
# This is probably necessary on Linux (with Proxima Nova and Cairo | ||
# installed). We may need something else on Mac. | ||
|
@@ -85,6 +52,30 @@ library(AAGIThemes) | |
library(AAGIPalettes) | ||
``` | ||
|
||
```{r} | ||
#| include: false | ||
#| label: config-for-title | ||
if(params$uni == "CU"){ | ||
project_lead = "Curtin University -- Prof Mark Gibberd, Dr Julia Easton, Prof Adam Sparks" | ||
email = "[email protected]" | ||
} else if(params$uni == "UA"){ | ||
project_lead = "University of Adelaide -- Dr Julian Taylor, Dr Olena Kravchuck" | ||
email = paste(params$pri_bio, "adelaide.edu.au", sep = "") | ||
} else { | ||
project_lead = "University of Queensland -- Prof Scott Chapman, Emertius Prof Kaye Basford" | ||
email = paste(params$pri_bio, "@uq.edu.au", sep = "") | ||
} | ||
``` | ||
|
||
--- | ||
author: | ||
- "`r params$pri_bio`" | ||
- Author 2 | ||
- "Project Lead: `r project_lead`" | ||
email: "`r email`" | ||
--- | ||
|
||
# Section 1 | ||
|
||
Report text goes here. This template is designed for smaller ("one-page") AAGI | ||
|
@@ -93,11 +84,10 @@ reports. The AAGI logo and partners footer appear only on this first page. | |
You can colour text/tables/etc using the various AAGI palette colours. Use | ||
`\textcolor{aagiteal}{...}` for \textcolor{aagiteal}{AAGI Teal}, or | ||
`\textcolor{aagibrightgreen}{...}` for | ||
\textcolor{aagibrightgreen}{AAGI Bright Green}, for instance. Table | ||
\@ref(tab:aagipalette) shows the standard palette colours available for use. | ||
\textcolor{aagibrightgreen}{AAGI Bright Green}, for instance. @tbl-aagipalette shows the standard palette colours available for use. | ||
|
||
\begin{table}[h] | ||
\caption{\label{tab:aagipalette}The AAGI palette colours.} | ||
::: {#tbl-aagipalette} | ||
```{=tex} | ||
\centering | ||
\begin{tabular}{|c | c | c | c |} | ||
\hline | ||
|
@@ -111,8 +101,13 @@ You can colour text/tables/etc using the various AAGI palette colours. Use | |
\cellcolor{aagiblack}\color{white}\texttt{aagiblack} & % | ||
\cellcolor{aagigrey}\texttt{aagigrey} \\ | ||
\hline | ||
\end{tabular} | ||
\end{table} | ||
\end{tabular} | ||
``` | ||
|
||
The AAGI palette colours. | ||
|
||
::: | ||
|
||
|
||
## This is a subsection heading | ||
|
||
|
@@ -128,7 +123,10 @@ this .Rmd file (but feel free to change the title to whatever you like). | |
|
||
Example R code, using the `AAGIThemes` package to produce | ||
Figure \@ref(fig:example1). | ||
```{r example1, fig.cap="Here is a plot.", fig.pos="h", fig.height=3} | ||
```{r} | ||
#| label: fig-example1 | ||
#| fig-cap: "Here is a plot." | ||
#| fig-height: 3 | ||
plot_aagi(pressure) | ||
``` | ||
|
||
|