-
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.
- Loading branch information
1 parent
45b703b
commit 55e5844
Showing
7 changed files
with
377 additions
and
0 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,373 @@ | ||
% original file from https://github.com/AAGI-AUS/AAGITemplates/blob/master/inst/rmarkdown/templates/AAGI_short_report/skeleton/assets/AAGI_markdown.tex | ||
% original author @RusselAndrewEdson | ||
|
||
\documentclass[ | ||
]{article} | ||
|
||
\usepackage[left=12mm,right=12mm,top=22mm,bottom=22mm]{geometry} | ||
|
||
% Force placement of table | ||
\usepackage{float} | ||
\floatplacement{table}{H} | ||
|
||
% Random texts | ||
\usepackage{lipsum} | ||
|
||
% Colours and graphics | ||
\usepackage[dvipsnames,svgnames,x11names,table]{xcolor} | ||
\usepackage{graphicx} | ||
|
||
% AAGI palette colours | ||
\definecolor{aagibrightgreen}{HTML}{b6d438} | ||
\definecolor{aagiteal}{HTML}{00808b} | ||
\definecolor{aagiblue}{HTML}{648fd2} | ||
\definecolor{aagigreen}{HTML}{54921e} | ||
\definecolor{aagiyellow}{HTML}{ffbc42} | ||
\definecolor{aagiorange}{HTML}{ec8525} | ||
\definecolor{aagiblack}{HTML}{414042} | ||
\definecolor{aagigrey}{HTML}{f2f2f2} | ||
|
||
% Enable shading (i.e., Shaded environment) if set | ||
\usepackage{color} | ||
\usepackage{fancyvrb} | ||
\newcommand{\VerbBar}{|} | ||
\newcommand{\VERB}{\Verb[commandchars=\\\{\}]} | ||
\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}} | ||
% Add ',fontsize=\small' for more characters per line | ||
\usepackage{framed} | ||
\definecolor{shadecolor}{RGB}{241,243,245} | ||
\newenvironment{Shaded}{\begin{snugshade}}{\end{snugshade}} | ||
\newcommand{\AlertTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} | ||
\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.40,0.45,0.13}{#1}} | ||
\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\BuiltInTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} | ||
\newcommand{\CharTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} | ||
\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} | ||
\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} | ||
\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.56,0.35,0.01}{#1}} | ||
\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} | ||
\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} | ||
\newcommand{\ErrorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\ExtensionTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} | ||
\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.28,0.35,0.67}{#1}} | ||
\newcommand{\ImportTok}[1]{\textcolor[rgb]{0.00,0.46,0.62}{#1}} | ||
\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} | ||
\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{\textbf{#1}}} | ||
\newcommand{\NormalTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} | ||
\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} | ||
\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} | ||
\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.68,0.00,0.00}{#1}} | ||
\newcommand{\RegionMarkerTok}[1]{\textcolor[rgb]{0.00,0.23,0.31}{#1}} | ||
\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{#1}} | ||
\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} | ||
\newcommand{\StringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} | ||
\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.07,0.07,0.07}{#1}} | ||
\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.13,0.47,0.30}{#1}} | ||
\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.37,0.37,0.37}{\textit{#1}}} | ||
|
||
% Fonts/encoding | ||
\usepackage{amsmath,amssymb} | ||
\usepackage{iftex} | ||
\ifPDFTeX | ||
\usepackage[T1]{fontenc} | ||
\usepackage[utf8]{inputenc} | ||
\usepackage{textcomp} % provide euro and other symbols | ||
\else % if luatex or xetex | ||
\usepackage{unicode-math} | ||
\defaultfontfeatures{Scale=MatchLowercase} | ||
\defaultfontfeatures[\rmfamily]{Ligatures=TeX,Scale=1} | ||
\fi | ||
\usepackage{lmodern} | ||
|
||
%Set the font | ||
% Check to see if this font is installed system-wide | ||
\IfFontExistsTF{Proxima Nova.otf}{% | ||
% One person has this installed system-wide | ||
\setmainfont{Proxima Nova.otf} | ||
}{ | ||
% If not, load it from the file | ||
\setmainfont{Arial.ttf} | ||
} | ||
|
||
|
||
%TODO: more font stuff from template.latex? | ||
|
||
% use upquote if available, for straight quotes in verbatim environments | ||
\IfFileExists{upquote.sty}{\usepackage{upquote}}{} | ||
% use microtype if available | ||
\IfFileExists{microtype.sty}{% | ||
\usepackage{microtype} | ||
\UseMicrotypeSet[protrusion]{basicmath}}{} % disable protrusion for tt fonts | ||
\usepackage{bm} | ||
|
||
\setcounter{secnumdepth}{0} | ||
|
||
% (Default) CSL referencing with citeproc | ||
% definitions for citeproc citations | ||
\NewDocumentCommand\citeproctext{}{} | ||
\NewDocumentCommand\citeproc{mm}{% | ||
\begingroup\def\citeproctext{#2}\cite{#1}\endgroup} | ||
\makeatletter | ||
% allow citations to break across lines | ||
\let\@cite@ofmt\@firstofone | ||
% avoid brackets around text for \cite: | ||
\def\@biblabel#1{} | ||
\def\@cite#1#2{{#1\if@tempswa , #2\fi}} | ||
\makeatother | ||
\newlength{\cslhangindent} | ||
\setlength{\cslhangindent}{1.5em} | ||
\newlength{\csllabelwidth} | ||
\setlength{\csllabelwidth}{3em} | ||
\newenvironment{CSLReferences}[2] % #1 hanging-indent, #2 entry-spacing | ||
{\begin{list}{}{% | ||
\setlength{\itemindent}{0pt} | ||
\setlength{\leftmargin}{0pt} | ||
\setlength{\parsep}{0pt} | ||
% turn on hanging indent if param 1 is 1 | ||
\ifodd #1 | ||
\setlength{\leftmargin}{\cslhangindent} | ||
\setlength{\itemindent}{-1\cslhangindent} | ||
\fi | ||
% set entry spacing | ||
\setlength{\itemsep}{#2\baselineskip}}} | ||
{\end{list}} | ||
\usepackage{calc} | ||
\newcommand{\CSLBlock}[1]{\hfill\break\parbox[t]{\linewidth}{\strut\ignorespaces#1\strut}} | ||
\newcommand{\CSLLeftMargin}[1]{\parbox[t]{\csllabelwidth}{\strut#1\strut}} | ||
\newcommand{\CSLRightInline}[1]{\parbox[t]{\linewidth - \csllabelwidth}{\strut#1\strut}} | ||
\newcommand{\CSLIndent}[1]{\hspace{\cslhangindent}#1} | ||
|
||
% Fancy header/footer, different for the first page of report | ||
\usepackage{fancyhdr} | ||
\usepackage{fancyvrb} | ||
\usepackage{afterpage} | ||
\fancypagestyle{firstpage}{% | ||
\fancyhf{} | ||
\fancyhead[R]{% | ||
\noindent\makebox[\textwidth][r]{% | ||
\includegraphics[height=2.3cm]{aagi_logo.pdf}\hspace*{-0.5cm}}} | ||
\fancyfoot[C]{% | ||
\rule{\textwidth}{0.4pt}\\[-10pt] | ||
\noindent\makebox[\textwidth]{% | ||
%TODO: In here: want a YAML option for 'project-partner' or something, | ||
% in which case we swap out the footer graphic and overlay the partner | ||
% logo in the right place. | ||
\includegraphics[width=\paperwidth]{partners.pdf}}} | ||
\renewcommand{\headrulewidth}{0pt}} | ||
\fancypagestyle{otherpages}{% | ||
\fancyhf{} | ||
\rhead{{\sf Project number:\;ABC1234-567XYZ}} | ||
%TODO: We could make these multiple emails? for(email) email... etc. | ||
\lfoot{{\sf Contact email:\;cbada@curtin.edu.au}} | ||
\cfoot{\thepage}} | ||
|
||
|
||
\usepackage{parskip} | ||
\setlength{\parindent}{0cm} | ||
|
||
% Copied from the old AAGI_markdown.tex (I'm not sure we still need | ||
% it though) | ||
% Set up tightlist because Rmarkdown is crashing on it | ||
\providecommand{\tightlist}{% | ||
\setlength{\itemsep}{0pt} | ||
\setlength{\parskip}{0pt}} | ||
|
||
% A fancy coloured box for notes/warnings | ||
\usepackage[most]{tcolorbox} | ||
\newtcolorbox{note}[1][]{% | ||
colback=aagiteal!7, colframe=aagiteal!7, notitle, sharp corners, | ||
borderline west={2pt}{0pt}{aagiteal}, borderline east={2pt}{0pt}{aagiteal}, | ||
enhanced, breakable} | ||
|
||
% Any other user-defined header inclusions | ||
\makeatletter | ||
\@ifpackageloaded{caption}{}{\usepackage{caption}} | ||
\AtBeginDocument{% | ||
\ifdefined\contentsname | ||
\renewcommand*\contentsname{Table of contents} | ||
\else | ||
\newcommand\contentsname{Table of contents} | ||
\fi | ||
\ifdefined\listfigurename | ||
\renewcommand*\listfigurename{List of Figures} | ||
\else | ||
\newcommand\listfigurename{List of Figures} | ||
\fi | ||
\ifdefined\listtablename | ||
\renewcommand*\listtablename{List of Tables} | ||
\else | ||
\newcommand\listtablename{List of Tables} | ||
\fi | ||
\ifdefined\figurename | ||
\renewcommand*\figurename{Figure} | ||
\else | ||
\newcommand\figurename{Figure} | ||
\fi | ||
\ifdefined\tablename | ||
\renewcommand*\tablename{Table} | ||
\else | ||
\newcommand\tablename{Table} | ||
\fi | ||
} | ||
\@ifpackageloaded{float}{}{\usepackage{float}} | ||
\floatstyle{ruled} | ||
\@ifundefined{c@chapter}{\newfloat{codelisting}{h}{lop}}{\newfloat{codelisting}{h}{lop}[chapter]} | ||
\floatname{codelisting}{Listing} | ||
\newcommand*\listoflistings{\listof{codelisting}{List of Listings}} | ||
\makeatother | ||
\makeatletter | ||
\makeatother | ||
\makeatletter | ||
\@ifpackageloaded{caption}{}{\usepackage{caption}} | ||
\@ifpackageloaded{subcaption}{}{\usepackage{subcaption}} | ||
\makeatother | ||
|
||
% Load hyperref (generally load this one last so all of the tex packages | ||
% play nice with each other) | ||
\usepackage[hyphens]{url} | ||
\usepackage[unicode]{hyperref} | ||
\hypersetup{% | ||
colorlinks=true, | ||
linkcolor=aagiteal, | ||
urlcolor=aagiteal, | ||
citecolor=aagiteal} | ||
|
||
|
||
|
||
%%% Document %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | ||
\begin{document} | ||
\pagestyle{otherpages} | ||
\thispagestyle{firstpage} | ||
\newgeometry{left=12mm, right=12mm, top=20mm, bottom=24mm, includefoot} | ||
\afterpage{\aftergroup\restoregeometry} | ||
|
||
%%% First page top-matter | ||
\setlength{\tabcolsep}{12pt} | ||
|
||
% Title | ||
{\Large\bf Progress report for project ABC1234-567XYZ}\\[4pt] | ||
{\normalsize Subtitle here} | ||
|
||
% Authors | ||
{\normalsize{% | ||
Your.Name\\ Author 2\\ Project Lead: Curtin University -- Prof Mark | ||
Gibberd, Dr Julia Easton, Prof Adam Sparks\\[-20pt] | ||
}} | ||
|
||
% Emails | ||
{\normalsize{% | ||
Contact email:\;cbada@curtin.edu.au\\[-20pt] | ||
}} | ||
|
||
% Version | ||
{\normalsize{% | ||
Document version:\;\texttt{1.0.0}\\[-20pt] | ||
}} | ||
|
||
% Last updated | ||
Last updated 2024-09-25 | ||
\vspace{1mm} | ||
%%% End first page top-matter | ||
|
||
|
||
|
||
\section{Section 1}\label{section-1} | ||
|
||
This template is designed for smaller (``one-page'') AAGI 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 \texttt{\textbackslash{}textcolor\{aagiteal\}\{...\}} for | ||
\texttt{\textbackslash{}textcolor\{aagiteal\}\{AAGI\ Teal\}}, or | ||
\texttt{\textbackslash{}textcolor\{aagibrightgreen\}\{...\}} for | ||
\texttt{\textbackslash{}textcolor\{aagibrightgreen\}\{AAGI\ Bright\ Green\}}, | ||
for instance. Table~\ref{tbl-aagipalette} shows the standard palette | ||
colours available for use. | ||
|
||
\begin{table} | ||
|
||
\caption{\label{tbl-aagipalette}The AAGI palette colours.} | ||
|
||
\centering{ | ||
|
||
\centering | ||
\begin{tabular}{|c | c | c | c |} | ||
\hline | ||
\cellcolor{aagibrightgreen}\texttt{aagibrightgreen} & % | ||
\cellcolor{aagiteal}\color{white}\texttt{aagiteal} & % | ||
\cellcolor{aagiblue}\texttt{aagiblue} & % | ||
\cellcolor{aagigreen}\texttt{aagigreen} \\ | ||
\hline | ||
\cellcolor{aagiyellow}\texttt{aagiyellow} & % | ||
\cellcolor{aagiorange}\texttt{aagiorange} & % | ||
\cellcolor{aagiblack}\color{white}\texttt{aagiblack} & % | ||
\cellcolor{aagigrey}\texttt{aagigrey} \\ | ||
\hline | ||
\end{tabular} | ||
|
||
} | ||
|
||
\end{table}% | ||
|
||
\subsection{This is a subsection | ||
heading}\label{this-is-a-subsection-heading} | ||
|
||
This is an example of a reference (\citeproc{ref-blah}{Person, 2024}). | ||
References appear at the end of the report by default, after the last | ||
heading \texttt{\#\ References} on the last line of this .Rmd file (but | ||
feel free to change the title to whatever you like). | ||
|
||
\begin{note} | ||
{\bf\color{aagiteal!75!black} Example Note}\quad | ||
Use \verb|\begin{note}...\end{note}| to create coloured notes like this | ||
that stand out on the page. | ||
\end{note} | ||
|
||
Example R code, using the | ||
\href{https://aagi-aus.github.io/AAGIThemes/}{\{AAGIThemes\}} package to | ||
produce Figure Figure~\ref{fig-example1}. | ||
|
||
\begin{Shaded} | ||
\begin{Highlighting}[] | ||
\FunctionTok{plot\_aagi}\NormalTok{(pressure)} | ||
\end{Highlighting} | ||
\end{Shaded} | ||
|
||
\begin{figure}[H] | ||
|
||
\centering{ | ||
|
||
\includegraphics{template-pdf-short-report_files/figure-pdf/fig-example1-1.pdf} | ||
|
||
} | ||
|
||
\caption{\label{fig-example1}Here is a plot.} | ||
|
||
\end{figure}% | ||
|
||
\subsubsection{This is a subsubsection | ||
heading}\label{this-is-a-subsubsection-heading} | ||
|
||
\lipsum[1-3] | ||
|
||
And so on. | ||
|
||
\section{Next Section}\label{next-section} | ||
|
||
Add as many sections as needed. | ||
|
||
\section*{References}\label{references} | ||
\addcontentsline{toc}{section}{References} | ||
|
||
\phantomsection\label{refs} | ||
\begin{CSLReferences}{1}{1} | ||
\bibitem[\citeproctext]{ref-blah} | ||
\textsc{Person, M.} (2024) \href{https://doi.org/10.1000/182}{My article | ||
title goes here}. \emph{My Journal}, \textbf{13}, pp.~12--34. | ||
|
||
\end{CSLReferences} | ||
\end{document} |
Binary file added
BIN
+6.1 KB
docs/demos/template-pdf-short-report_files/figure-pdf/fig-example1-1.pdf
Binary file not shown.