25 | 25 |
% http://www.thp.uni-koeln.de/~ses/ ses@thp.uni-koeln.de
|
26 | 26 |
%
|
27 | 27 |
% November, 2018
|
28 | |
% Added: random bleeding splash
|
|
28 |
% Added: random bleeding splash \cofeBleed{} (requires ifthen)
|
|
29 |
% Added: package option to put random bleeding splash throughout pages
|
29 | 30 |
% by Anthony Mirand
|
30 | 31 |
% https://anthonymirand.github.io anthonypmirand@gmail.com
|
31 | 32 |
%
|
|
548 | 549 |
|
549 | 550 |
|
550 | 551 |
|
|
552 |
%generate bleeding cofe splash:
|
|
553 |
\newcommand{\cofeBleed}[7]{
|
|
554 |
\pgfmathsetmacro{\alpha}{#1 - #7 * \value{depth}}
|
|
555 |
\pgfmathsetmacro{\scale}{#2}
|
|
556 |
\pgfmathsetmacro{\angle}{#3}
|
|
557 |
\pgfmathsetlengthmacro{\xoff}{#4}
|
|
558 |
\pgfmathsetlengthmacro{\yoff}{#5}
|
|
559 |
\pgfmathtruncatemacro{\variety}{#6}
|
|
560 |
|
|
561 |
\ifthenelse{\variety<2}{
|
|
562 |
\ifthenelse{\variety=0}{
|
|
563 |
\cofeAm{\alpha}{\scale}{\angle}{\xoff}{\yoff}
|
|
564 |
}{
|
|
565 |
\cofeBm{\alpha}{\scale}{\angle}{\xoff}{\yoff}
|
|
566 |
}
|
|
567 |
}{
|
|
568 |
\ifthenelse{\variety=2}{
|
|
569 |
\cofeCm{\alpha}{\scale}{\angle}{\xoff}{\yoff}
|
|
570 |
}{
|
|
571 |
\cofeDm{\alpha}{\scale}{\angle}{\xoff}{\yoff}
|
|
572 |
}
|
|
573 |
}
|
|
574 |
|
|
575 |
\addtocounter{depth}{1}
|
|
576 |
}%end bleed command
|
|
577 |
|
|
578 |
|
|
579 |
|
551 | 580 |
\ifthenelse{\boolean{coffee@bleed}}{
|
552 | 581 |
%bleed random splash across multiple pages:
|
553 | 582 |
\RequirePackage{eso-pic}
|
554 | |
\AddToShipoutPicture{\cofeAm{1}{1.0}{0}{5.5cm}{3cm}}
|
|
583 |
|
|
584 |
\newcounter{depth}\setcounter{depth}{0}
|
|
585 |
|
|
586 |
\pgfmathsetmacro{\alpha}{0.9 + 0.1 * rand}
|
|
587 |
\pgfmathsetmacro{\scale}{0.7 + 0.5 * rand}
|
|
588 |
\pgfmathsetmacro{\angle}{360 * rand}
|
|
589 |
\pgfmathsetlengthmacro{\xoff}{rand * 2cm}
|
|
590 |
\pgfmathsetlengthmacro{\yoff}{rand * 5cm}
|
|
591 |
|
|
592 |
\pgfmathtruncatemacro{\variety}{4 * rand}
|
|
593 |
\pgfmathsetmacro{\bleed}{0.1 + 0.1 * rand}
|
|
594 |
|
|
595 |
\AddToShipoutPicture{\cofeBleed{\alpha}{\scale}{\angle}{\xoff}{\yoff}{\variety}{\bleed}}
|
555 | 596 |
}{}
|
556 | 597 |
|
557 | 598 |
|