summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/callouts/callouts.sty
blob: 878c99405113f4ae2830e7745983b574a393de11 (plain)
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
% ==================================================================
% callouts.sty 
% ==================================================================
% (c) 2017 Markus Stuetz, markus.stuetz@gmail.com
% This program can be redistributed and/or modified under the terms
% of the LaTeX Project Public License Distributed from CTAN
% archives in directory macros/latex/base/lppl.txt; either
% version 1 of the License, or any later version.
% ==================================================================

\ProvidesPackage{callouts}[2017/03/16 Callouts]
\NeedsTeXFormat{LaTeX2e}
\RequirePackage{tikz}
% \RequirePackage{kvoptions}
% 
% \tikzset{every picture/.style={font issue=\footnotesize},
%          font issue/.style={execute at begin picture={#1\selectfont}}
%         }

% \DeclareStringOption[red]{color}[black]{
%   \@arrowcolor
%   }

\DeclareOption{plain}{%
\newcommand{\focol}{black}
\newcommand{\bgcol}{none}
\newcommand{\arcol}{black}
}

\DeclareOption{bwr}{%
\newcommand{\focol}{black}
\newcommand{\bgcol}{white}
\newcommand{\arcol}{red}
}

\DeclareOption{wby}{%
\newcommand{\focol}{white}
\newcommand{\bgcol}{black}
\newcommand{\arcol}{yellow}
}

\DeclareOption{bww}{%
\newcommand{\focol}{black}
\newcommand{\bgcol}{white}
\newcommand{\arcol}{white}
}

\DeclareOption*{\ClassWarning{annotations}{Unknown color option '\CurrentOption'}\ExecuteOptions{none}}

\newcommand{\hecol}{black}

\ProcessOptions\relax	% terminate option processing

% ==================================================================

\newenvironment{annotate}[2]%[num]%
{ \begin{tikzpicture}[scale=#2]% }%
% Annotate
\node (pic) at (0,0) {#1};%
}%
{ \end{tikzpicture} }

% ==================================================================

\newcommand{\helpgrid}{%
\draw[help lines, \hecol] (pic.south west) grid (pic.north east); \fill[\hecol] (0,0) circle (5pt);%
}
\newcommand{\callout}[3]{%
\node [fill=\bgcol] (text) at (#1) {\scriptsize\color{\focol} #2};
\draw [\arcol,thick,->] (text) -- (#3);
}
\newcommand{\note}[2]{%
\node [fill=\bgcol] at (#1) {\scriptsize\color{\focol} #2};
}
\newcommand{\arrow}[2]{%
\draw [\arcol,thick,->] (#1) -- (#2);
}

\endinput % === EOF ================================================