-
Notifications
You must be signed in to change notification settings - Fork 3
/
image-base.sty
58 lines (49 loc) · 2.67 KB
/
image-base.sty
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
%% image-base.sty
%% Version: 1.0
%% Author: Florian Sihler, 21.08.2020
%% This package is the base for all src-img inside this document. It is enough to include
%% this package in a document to compile the presented tikz-codes.
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{image-base}[2020/08/21 EagleoutIce - Base-Package for all src-img]
\RequirePackage{tikz,tikzducks,fontawesome,pifont,pgfplots,forest,amssymb}
\usetikzlibrary{shapes,calc,decorations.pathreplacing,arrows.meta,patterns,3d,backgrounds,graphs}
\let\T\texttt
\RequirePackage[hyperref,addons]{color-palettes}
\RequirePackage{tikz-palettes}
\SetShadeContrast{49}
\UsePalette{GreenWater}
% choose random palette (any except IceLake, legacy and print)
\pgfmathsetseed{\number\pdfrandomseed}
\pgfmathdeclarerandomlist{palettes}{%
{Water}{GraySun}{ClayGrass}{PurpleCoin}{Moonshine}{BloodyGrass}{SourCandy}{PurpleSand}%
{NorthernLights}{Rainbow}{Crimson}{Lucy}{UniInfo}{UniMawi}{UniNawi}{UniMed}{Ntts}%
{PastelRainbow}{Vampire}{IceLake}{Peach}{Evening}%
}
\def\rndP{\pgfmathrandomitem{\rndPalette}{palettes}}
\def\fillfont{\def\mdseries@sf{medium}\sffamily}
\tikzset{%
every node/.append style={font=\sffamily},
slimblock/.style={rectangle,draw,rounded corners=2pt,font=\color{black},inner sep=0.15em,minimum width=2cm,align=center},
block/.style={slimblock,rounded corners,minimum height=\baselineskip,execute at begin node={\strut},inner sep=0.46em,minimum width=2cm},
lblock/.style={block,#1,writ,font=\fillfont}, %
lblock/.default={tikzA},
every picture/.append style={line join=round,line cap=round},%
desc/.style={scale=.85,font=\itshape\sffamily,fill=lightgray!42!white,inner sep=1.15ex,align=left},%
}
\newcommand*\entity[3][]{%
\node[minimum width=2.25cm, minimum height=2em, rectangle, draw,fill=shadeA] at #2 (#3) {\parbox{2.25cm}{\centering #1{#3}}};}
%\draw[rotate around={45:#2}] #2++(-0.6,-0.6) rectangle ++ (1.2,1.2);
\newcommand*\relation[3][]{\draw[fill=shadeB] #2++(-1,0) -- ++(1,0.5) -- ++(1,-0.5) -- ++(-1,-0.5) -- ++(-1,0.5); \node[minimum height=1.985*.5cm] at #2 (#3) {\parbox{1.73cm}{\centering\small #1{#3}}};}
\newcommand*\attribute[3][]{\node[minimum width = 1cm, minimum height = 2em, ellipse, draw, fill=shadeC] at #2 (#3) {\parbox{1.1cm}{\centering\footnotesize #1{#3}}};}
%% Key attribute
\newcommand*\kattribute[3][]{\attribute[#1\underline]{#2}{#3};}
\pgfdeclarepatternformonly{small north west lines}{\pgfqpoint{-1pt}{-1pt}}{\pgfqpoint{1.5pt}{1.5pt}}{\pgfqpoint{0.5pt}{0.5pt}}%
{%
\pgfsetlinewidth{.2pt}%
\pgfpathmoveto{\pgfqpoint{0pt}{.5pt}}%
\pgfpathlineto{\pgfqpoint{0.6pt}{-.1pt}}%
\pgfusepath{stroke}%
}%
\colorlet{lgray}{gray!35!white}
\def\sbfamily{\fontseries{sb}\selectfont}
\endinput