Added support for page background (#138)

- The variable `page-background` specifies the path to a background image for any page. The background image is scaled to cover the entire page.
- The variable `page-background-opacity` specifies the background image opacity and has a default value of `0.2`.
This commit is contained in:
Danilo Carrabino 2019-12-23 23:01:56 +01:00 committed by Pascal Wagler
parent b2a0703adc
commit ec6454711e
2 changed files with 23 additions and 0 deletions

View File

@ -76,6 +76,14 @@ This template defines some new variables to control the appearance of the result
the path to a background image for the title page. The background image is scaled to cover the entire page. In the examples folder under `titlepage-background` are a few example background images.
- `page-background`
the path to a background image for any page. The background image is scaled to cover the entire page. In the examples folder under `page-background` are a few example background images.
- `page-background-opacity` (defaults to `0.2`)
the background image opacity
- `caption-justification` (defaults to `raggedright`)
justification setting for captions (uses the `justification` parameter of the [caption](https://ctan.org/pkg/caption?lang=en) package)

View File

@ -531,6 +531,10 @@ $endfor$
\fi
$endif$
$if(page-background)$
\usepackage[pages=all]{background}
$endif$
%
% for the background color of the title page
%
@ -828,6 +832,17 @@ $else$
\renewcommand{\footrulewidth}{0.4pt}
}
\pagestyle{eisvogel-header-footer}
$if(page-background)$
\backgroundsetup{
scale=1,
color=black,
opacity=$if(page-background-opacity)$$page-background-opacity$$else$0.2$endif$,
angle=0,
contents={%
\includegraphics[width=\paperwidth,height=\paperheight]{$page-background$}
}%
}
$endif$
$endif$
$endif$