mirror of
https://github.com/Wandmalfarbe/pandoc-latex-template.git
synced 2025-02-06 11:10:19 +00:00
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:
parent
b2a0703adc
commit
ec6454711e
@ -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.
|
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`)
|
- `caption-justification` (defaults to `raggedright`)
|
||||||
|
|
||||||
justification setting for captions (uses the `justification` parameter of the [caption](https://ctan.org/pkg/caption?lang=en) package)
|
justification setting for captions (uses the `justification` parameter of the [caption](https://ctan.org/pkg/caption?lang=en) package)
|
||||||
|
15
eisvogel.tex
15
eisvogel.tex
@ -531,6 +531,10 @@ $endfor$
|
|||||||
\fi
|
\fi
|
||||||
$endif$
|
$endif$
|
||||||
|
|
||||||
|
$if(page-background)$
|
||||||
|
\usepackage[pages=all]{background}
|
||||||
|
$endif$
|
||||||
|
|
||||||
%
|
%
|
||||||
% for the background color of the title page
|
% for the background color of the title page
|
||||||
%
|
%
|
||||||
@ -828,6 +832,17 @@ $else$
|
|||||||
\renewcommand{\footrulewidth}{0.4pt}
|
\renewcommand{\footrulewidth}{0.4pt}
|
||||||
}
|
}
|
||||||
\pagestyle{eisvogel-header-footer}
|
\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$
|
||||||
$endif$
|
$endif$
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user