INWTlab / ireports

R package with RMarkdown Business Reports
GNU General Public License v3.0
82 stars 33 forks source link

Soft coding of `Page` #7

Closed steffenWagner closed 5 years ago

steffenWagner commented 5 years ago

Based on @canholyavkin feedback concerning changes to the Content and Page labels (#6) , we should make the Page label to be set dynamically via the YAML header.

This can be done by changing defs.tex:

% definition of pagename
\newcommand\pagename{Page}

% changes to line 102:
\rfoot{\pagename~\thepage \hspace{1pt} / \pageref{LastPage}}

Once this changes are made, the name can be set via the YAML header of the Rmd file:

---
title: Document Title
author: INWTlab 
date: \today
lang: ngerman
params:
  logo: logo.png
  cover: cover.png
  iblue: 2b4894
  igray: d4dbde
documentclass: article
fontsize: 10
papersize: a4paper
output: 
  IReports::businessReport:
    keep_tex: TRUE
    latex_engine: xelatex
    resetStyleFiles: FALSE
header-includes: 
  - \newcommand{\logo}{`r gsub("_", "\\_", params$logo)`}
  - \newcommand{\cover}{`r gsub("_", "\\_", params$cover)`}
  - \newcommand{\iblue}{`r params$iblue`}
  - \newcommand{\igray}{`r params$igray`}
include-before:
  - \renewcommand{\contentsname}{Inhaltsverzeichnis}
  - \renewcommand{\pagename}{Seite}
---

@SarahWagner Could you please take over? Thx.