mirror of
https://github.com/How-To-Build-a-Commons/HowToBuildACommonsWorkbooks.git
synced 2026-04-19 16:51:04 +00:00
move helper methods out
This commit is contained in:
parent
620971340b
commit
cd3f2b89b8
2 changed files with 43 additions and 42 deletions
|
|
@ -40,48 +40,7 @@
|
|||
\usetikzlibrary{shapes.geometric, arrows.meta, positioning}
|
||||
\input{src/how-to-consensus-zine/flow-chart-only.tex}%
|
||||
|
||||
% --- Add corner image depending on odd/even page ---
|
||||
\newcommand{\AddCornerImage}{%
|
||||
\AddToShipoutPictureBG{%
|
||||
\ifnum\value{page}>1 % Only add corners if page number > 1
|
||||
% === Bottom Corner ===
|
||||
\AtPageLowerLeft{%
|
||||
\ifodd\value{page}
|
||||
% Odd pages: bottom-right corner (normal), moved up and in 1mm
|
||||
\put(\LenToUnit{\paperwidth-1.5cm-\mylen},\LenToUnit{\mylen}){%
|
||||
\includegraphics[width=1.5cm]{CornerDetail.png}%
|
||||
}%
|
||||
\else
|
||||
% Even pages: bottom-left corner (mirrored), moved up and in 1mm
|
||||
\put(\LenToUnit{\mylen},\LenToUnit{\mylen}){%
|
||||
\reflectbox{\includegraphics[width=1.5cm]{CornerDetail.png}}%
|
||||
}%
|
||||
\fi
|
||||
}%
|
||||
% === Top Corner ===
|
||||
\AtPageUpperLeft{%
|
||||
\ifodd\value{page}
|
||||
% Odd pages: top-right corner (mirrored and flipped), moved down and in 1mm
|
||||
\put(\LenToUnit{\paperwidth-1.5cm-\mylen},-\LenToUnit{\mylen}){%
|
||||
\scalebox{1}[-1]{\includegraphics[width=1.5cm]{CornerDetail.png}}%
|
||||
}%
|
||||
\else
|
||||
% Even pages: top-left corner (flipped), moved down and in 1mm
|
||||
\put(\LenToUnit{\mylen},-\LenToUnit{\mylen}){%
|
||||
\reflectbox{\scalebox{1}[-1]{\includegraphics[width=1.5cm]{CornerDetail.png}}}%
|
||||
}%
|
||||
\fi
|
||||
}%
|
||||
\fi % End of page number check
|
||||
}%
|
||||
}
|
||||
|
||||
\newcommand{\linedpage}{%
|
||||
\noindent
|
||||
\foreach \n in {1,...,10}{%
|
||||
\rule{\textwidth}{0.4pt}\\[\baselineskip]
|
||||
}
|
||||
}
|
||||
\input{helper}
|
||||
|
||||
\input{MakerCheck.tex}%
|
||||
|
||||
|
|
|
|||
42
helper.tex
Normal file
42
helper.tex
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
% --- Add corner image depending on odd/even page ---
|
||||
\newcommand{\AddCornerImage}{%
|
||||
\AddToShipoutPictureBG{%
|
||||
\ifnum\value{page}>1 % Only add corners if page number > 1
|
||||
% === Bottom Corner ===
|
||||
\AtPageLowerLeft{%
|
||||
\ifodd\value{page}
|
||||
% Odd pages: bottom-right corner (normal), moved up and in 1mm
|
||||
\put(\LenToUnit{\paperwidth-1.5cm-\mylen},\LenToUnit{\mylen}){%
|
||||
\includegraphics[width=1.5cm]{CornerDetail.png}%
|
||||
}%
|
||||
\else
|
||||
% Even pages: bottom-left corner (mirrored), moved up and in 1mm
|
||||
\put(\LenToUnit{\mylen},\LenToUnit{\mylen}){%
|
||||
\reflectbox{\includegraphics[width=1.5cm]{CornerDetail.png}}%
|
||||
}%
|
||||
\fi
|
||||
}%
|
||||
% === Top Corner ===
|
||||
\AtPageUpperLeft{%
|
||||
\ifodd\value{page}
|
||||
% Odd pages: top-right corner (mirrored and flipped), moved down and in 1mm
|
||||
\put(\LenToUnit{\paperwidth-1.5cm-\mylen},-\LenToUnit{\mylen}){%
|
||||
\scalebox{1}[-1]{\includegraphics[width=1.5cm]{CornerDetail.png}}%
|
||||
}%
|
||||
\else
|
||||
% Even pages: top-left corner (flipped), moved down and in 1mm
|
||||
\put(\LenToUnit{\mylen},-\LenToUnit{\mylen}){%
|
||||
\reflectbox{\scalebox{1}[-1]{\includegraphics[width=1.5cm]{CornerDetail.png}}}%
|
||||
}%
|
||||
\fi
|
||||
}%
|
||||
\fi % End of page number check
|
||||
}%
|
||||
}
|
||||
|
||||
\newcommand{\linedpage}{%
|
||||
\noindent
|
||||
\foreach \n in {1,...,10}{%
|
||||
\rule{\textwidth}{0.4pt}\\[\baselineskip]
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue