From d8bf485c69b6e1d23388d388c00537f2c428798e Mon Sep 17 00:00:00 2001 From: Johan Larsson Date: Fri, 3 May 2019 22:11:28 +0200 Subject: [PATCH] Check for availability of pgfpages before requiring it --- inst/rmarkdown/templates/iqss/resources/template.tex | 2 +- inst/rmarkdown/templates/metropolis/resources/template.tex | 2 +- inst/rmarkdown/templates/monash/resources/template.tex | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/inst/rmarkdown/templates/iqss/resources/template.tex b/inst/rmarkdown/templates/iqss/resources/template.tex index df06c9d..bcbc693 100644 --- a/inst/rmarkdown/templates/iqss/resources/template.tex +++ b/inst/rmarkdown/templates/iqss/resources/template.tex @@ -1,7 +1,7 @@ \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere \PassOptionsToPackage{hyphens}{url} \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(colorlinks)$dvipsnames,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -\usepackage{pgfpages} +\IfFileExists{pgfpages.sty}{\usepackage{pgfpages}}{} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg} diff --git a/inst/rmarkdown/templates/metropolis/resources/template.tex b/inst/rmarkdown/templates/metropolis/resources/template.tex index 6244083..42a8094 100644 --- a/inst/rmarkdown/templates/metropolis/resources/template.tex +++ b/inst/rmarkdown/templates/metropolis/resources/template.tex @@ -1,7 +1,7 @@ \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere \PassOptionsToPackage{hyphens}{url} \documentclass[$if(fontsize)$$fontsize$,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(colorlinks)$dvipsnames,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -\usepackage{pgfpages} +\IfFileExists{pgfpages.sty}{\usepackage{pgfpages}}{} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg} diff --git a/inst/rmarkdown/templates/monash/resources/template.tex b/inst/rmarkdown/templates/monash/resources/template.tex index a05f807..86e2480 100644 --- a/inst/rmarkdown/templates/monash/resources/template.tex +++ b/inst/rmarkdown/templates/monash/resources/template.tex @@ -1,7 +1,7 @@ \PassOptionsToPackage{unicode=true}{hyperref} % options for packages loaded elsewhere \PassOptionsToPackage{hyphens}{url} \documentclass[$if(fontsize)$$fontsize$,$else$14pt,$endif$$if(lang)$$babel-lang$,$endif$$if(handout)$handout,$endif$$if(colorlinks)$dvipsnames,$endif$$if(beamer)$ignorenonframetext,$endif$$for(classoption)$$classoption$$sep$,$endfor$]{$documentclass$} -\usepackage{pgfpages} +\IfFileExists{pgfpages.sty}{\usepackage{pgfpages}}{} \setbeamertemplate{caption}[numbered] \setbeamertemplate{caption label separator}{: } \setbeamercolor{caption name}{fg=normal text.fg}