aboutsummaryrefslogtreecommitdiff
path: root/model_7/resources/10_decoration.tex
diff options
context:
space:
mode:
Diffstat (limited to 'model_7/resources/10_decoration.tex')
-rw-r--r--model_7/resources/10_decoration.tex37
1 files changed, 37 insertions, 0 deletions
diff --git a/model_7/resources/10_decoration.tex b/model_7/resources/10_decoration.tex
new file mode 100644
index 0000000..b9516ce
--- /dev/null
+++ b/model_7/resources/10_decoration.tex
@@ -0,0 +1,37 @@
+% Add a decoration in the corner of each page
+% The image is selected using pdfornament, and is positionned using the margin
+% of the pages.
+
+\usepackage{tikz}
+\usepackage{eso-pic}
+\usepackage{pgfornament}
+\usepackage{tikzpagenodes}
+\usepackage{ifthen}
+\usetikzlibrary{positioning}
+
+% Apply a decoration over each page
+% Arguments
+% 1: the size of the decoration
+% 2: the distance to the page (not the text margin but the page itself
+% 3: the color
+\providecommand{\pageornament}[3]{%
+ \begin{tikzpicture}[remember picture, overlay]
+ \node[yshift=-#2,xshift=-#2, anchor=north east] at (current page.north east){%
+ \pgfornament[color=#3,width=#1,symmetry=v]{41}
+ };
+ \node[yshift=#2,xshift=-#2,anchor=south east] at (current page.south east){%
+ \pgfornament[color=#3,width=#1,symmetry=c]{61}};
+ \node[yshift=-#2,xshift=#2,anchor=north west] at (current page.north west){%
+
+ \pgfornament[color=#3,width=#1]{41}
+ };
+ \node[yshift=#2,xshift=#2,anchor=south west] at (current page.south west){%
+ \pgfornament[color=#3,width=#1,symmetry=h]{61}
+ };
+ \end{tikzpicture}
+}
+
+\AddToShipoutPictureBG{%
+ \pageornament{1.75cm}{0.5cm}{altColor}
+}
+