Skip to content

Commit

Permalink
Merge pull request #50 from inbo/update
Browse files Browse the repository at this point in the history
Update
  • Loading branch information
ThierryO committed Jun 12, 2019
2 parents 32cd4eb + 075d52d commit 8d9646b
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 26 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
.Rproj.user
.Rhistory
.RData
*.Rproj
*.log
*.toc
*.synctex.gz
Expand Down
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: INBOmd
Type: Package
Title: Markdown Templates for INBO
Version: 0.4.4
Date: 2019-03-12
Version: 0.4.5
Date: 2019-06-11
Authors@R: c(
person("Thierry", "Onkelinx", email = "thierry.onkelinx@inbo.be", role = c("aut", "cre"), comment = c(ORCID = "0000-0001-8804-4216")),
person("Floris", "Vanderhaeghe", email = "floris.vanderhaeghe@inbo.be", role = c("ctb"), comment = c(ORCID = "0000-0002-6378-6229")),
Expand Down
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,15 @@ RUN Rscript -e 'remotes::install_github("inbo/INBOmd")' \
&& Rscript -e 'tinytex::tlmgr_conf(c("auxtrees", "add", system.file("local_tex", package = "INBOmd")))'

## Install fonts
RUN mkdir ~/.fonts \
RUN mkdir /usr/local/lib/R/site-library/INBOmd/local_tex/fonts/truetype/calibri \
&& mkdir /usr/local/lib/R/site-library/INBOmd/local_tex/fonts/truetype/inconsolata \
&& wget https://www.wfonts.com/download/data/2014/12/12/calibri/calibri.zip \
&& unzip calibri.zip -d ~/.fonts \
&& wget -O ~/.fonts/Inconsolatazi4-Regular.otf http://mirrors.ctan.org/fonts/inconsolata/opentype/Inconsolatazi4-Regular.otf \
&& wget -O ~/.fonts/Inconsolatazi4-Bold.otf http://mirrors.ctan.org/fonts/inconsolata/opentype/Inconsolatazi4-Bold.otf
&& unzip calibri.zip -d /usr/local/lib/R/site-library/INBOmd/local_tex/fonts/truetype/calibri \
&& rm calibri.zip \
&& wget -O /usr/local/lib/R/site-library/INBOmd/local_tex/fonts/truetype/inconsolata/Inconsolatazi4-Regular.otf http://mirrors.ctan.org/fonts/inconsolata/opentype/Inconsolatazi4-Regular.otf \
&& wget -O /usr/local/lib/R/site-library/INBOmd/local_tex/fonts/truetype/Inconsolatazi4-Bold.otf http://mirrors.ctan.org/fonts/inconsolata/opentype/Inconsolatazi4-Bold.otf \
&& fc-cache -fv \
&& updmap-sys


## Install dependencies for INBOmd examples
Expand Down
24 changes: 24 additions & 0 deletions INBOmd.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
Version: 1.0

RestoreWorkspace: No
SaveWorkspace: No
AlwaysSaveHistory: No

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: knitr
LaTeX: XeLaTeX

AutoAppendNewline: Yes
StripTrailingWhitespace: Yes

BuildType: Package
PackageUseDevtools: Yes
PackageInstallArgs: --no-multiarch --with-keep.source
PackageCheckArgs: --as-cran
PackageRoxygenize: rd,collate,namespace

QuitChildProcessesOnExit: Yes
1 change: 1 addition & 0 deletions R/inbo_rapport.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#' \item lot: display a list of tables. Defaults to TRUE
#' \item hyphenation: the correct hyphenation for certain words
#' \item flandersfont: Use the Flanders Art Sans font on title page? Defaults to FALSE. Note that this requires the font to be present on the system.
#' \item tocdepth: which level headers to display. 0: upto chapters (`#`), 1: upto section (`##`), 2: upto subsection (`###`), 3: upto subsubsection (`####`). Defaults to 3.
#' }
#' @export
#' @importFrom rmarkdown output_format knitr_options pandoc_options pandoc_variable_arg includes_to_pandoc_args pandoc_version
Expand Down
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,30 @@ Below are some documents created with INBOmd
1. https://doi.org/10.21436/inbop.14901626
1. https://pureportal.inbo.be/portal/files/12819590/rbelgium_20170307.pdf
1. https://doi.org/10.21436/inbor.12304086

## Installation

INBOmd requires a working installation of XeLaTeX. We highly recommend to use the TinyTeX. Close all open R sessions and start a fresh R session. Execute the commands below. This will install TinyTeX on your machine. No admin rights are required. Although TinyTeX is a lightweight installation, it still is several 100 MB large.

```{r eval = FALSE}
if (!"tinytex" %in% rownames(installed.packages())) {
install.packages("tinytex")
tinytex::install_tinytex()
}
```

Once TinyTeX is installed, you need to restart RStudio. Then you can proceed with the installation of `INBOmd`.

```{r eval = FALSE}
if (!"remotes" %in% rownames(installed.packages())) {
install.packages("remotes")
}
remotes::install_github("inbo/INBOmd", dependencies = TRUE)
tinytex::tlmgr_install(c(
'inconsolata', 'times', 'tex', 'helvetic', 'dvips'
))
tinytex::tlmgr_conf(
c("auxtrees", "add", system.file("local_tex", package = "INBOmd"))
)
tinytex::tlmgr_install(c("hyphen-dutch", "hyphen-french"))
```
7 changes: 3 additions & 4 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,12 @@ install:
ps: Bootstrap

cache:
- C:\RLibrary
- C:\RLibrary -> appveyor.yml, DESCRIPTION

# Adapt as necessary starting from here

build_script:
- Rscript -e "install.packages(c('backports', 'colorspace', 'digest', 'htmltools', 'lazyeval', 'plyr', 'Rcpp', 'rlang', 'remotes', 'scales', 'stringi', 'tibble'), repos = 'https://cloud.r-project.org/', type = 'binary')"
- Rscript -e "remotes::install_github('rstudio/bookdown')"
- Rscript -e "install.packages(c('backports', 'bookdown', 'colorspace', 'digest', 'htmltools', 'lazyeval', 'plyr', 'Rcpp', 'rlang', 'remotes', 'scales', 'stringi', 'tibble'), repos = 'https://cloud.r-project.org/', type = 'binary')"
- travis-tool.sh install_deps

test_script:
Expand Down Expand Up @@ -49,7 +48,7 @@ artifacts:
environment:
access_token:
secure: yysQI1zM7yUTewFfHSAPixDMQPH2/Zik3AxI/WSOSM3eHOttl5ZzXbxrb6PjUn5y
PKGTYPE: source
PKGTYPE: win.binary

deploy:
- provider: GitHub
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,16 +78,16 @@
\expandafter\ifstrequal\custom{TRUE}{
\setmainfont[
Ligatures = TeX,
ItalicFont = FlandersArtSans-Light,
ItalicFont = FlandersArtSans-Light.ttf,
ItalicFeatures = {FakeSlant = 0.15},
BoldFont = FlandersArtSans-Medium,
BoldItalicFont = FlandersArtSans-Medium,
BoldFont = FlandersArtSans-Medium.ttf,
BoldItalicFont = FlandersArtSans-Medium.ttf,
BoldItalicFeatures = {FakeSlant = 0.15}
]{FlandersArtSans-Regular}
]{FlandersArtSans-Regular.ttf}
}{
\setmainfont[
Ligatures = TeX
]{Calibri}
]{Calibri.ttf}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

\RequirePackage{beamerthemevlaanderenlayout}

\definecolor{logobackground}{RGB}{244, 244, 239}
\definecolor{logobackground}{RGB}{255, 255, 255}


\newcommand{\titlelogo}{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
\expandafter\ifstrequal\custom{TRUE}{
\setmainfont[
Ligatures = TeX,
ItalicFont = FlandersArtSans-Light,
ItalicFont = FlandersArtSans-Light.ttf,
ItalicFeatures = {FakeSlant = 0.15},
BoldFont = FlandersArtSans-Medium,
BoldItalicFont = FlandersArtSans-Medium,
BoldFont = FlandersArtSans-Medium.ttf,
BoldItalicFont = FlandersArtSans-Medium.ttf,
BoldItalicFeatures = {FakeSlant = 0.15}
]{FlandersArtSans-Regular}
]{FlandersArtSans-Regular.ttf}
}{
\setmainfont[
Ligatures = TeX
]{Calibri}
]{Calibri.ttf}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@

\ifxetex
\RequirePackage[no-math]{fontspec}
\setmainfont[Ligatures=TeX]{Calibri}
\setmainfont[Ligatures=TeX]{Calibri.ttf}
\setmonofont[Mapping=tex-ansi]{inconsolata}
\else
\RequirePackage[T1]{fontenc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@

\ifxetex
\RequirePackage[no-math]{fontspec}
\setmainfont[Ligatures=TeX]{Calibri}
\setmainfont[Ligatures=TeX]{Calibri.ttf}
\setmonofont{Courier New}
\else
\RequirePackage[T1]{fontenc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@

\ifxetex
\RequirePackage[no-math]{fontspec}
\setmainfont[Ligatures=TeX]{Calibri}
\setmainfont[Ligatures=TeX]{Calibri.ttf}
\setmonofont{Courier New}
\else
\RequirePackage[T1]{fontenc}
Expand Down
4 changes: 4 additions & 0 deletions inst/pandoc/inbo_rapport.tex
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,11 @@
\clearpage
\phantomsection
$if(tocdepth)$
\setcounter{tocdepth}{$tocdepth$}
$else$
\setcounter{tocdepth}{3}
$endif$
\tableofcontents
\addcontentsline{toc}{chapter}{\contentsname}
Expand Down
1 change: 1 addition & 0 deletions man/inbo_rapport.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vignettes/introduction.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ INBOmd requires a working installation of XeLaTeX. We highly recommend to use th
```{r eval = FALSE}
if (!"tinytex" %in% rownames(installed.packages())) {
install.packages("tinytex")
tinytex::install_tinytex()
}
tinytex::install_tinytex()
```

Once TinyTeX is installed, you need to restart RStudio. Then you can proceed with the installation of `INBOmd`.
Expand Down

0 comments on commit 8d9646b

Please sign in to comment.