From a5696db7113a3b1d7350775aecb280300a08031c Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Wed, 1 May 2024 14:34:22 +0200 Subject: Added a new model --- model_7/resources/10_decoration.tex | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 model_7/resources/10_decoration.tex (limited to 'model_7/resources/10_decoration.tex') diff --git a/model_7/resources/10_decoration.tex b/model_7/resources/10_decoration.tex new file mode 100644 index 0000000..b394599 --- /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 +\newcommand{\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} +} + -- cgit v1.2.3