summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/wargame/source/natoapp6c/text.dtx
blob: 5a441dc4826283c0eee6ea3dc7c613060f64198b (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
% \iffalse
% --------------------------------------------------------------------
%<*natoapp6c>
% \fi
%\subsubsection{Text on symbols}
%
% \begin{TikzKey}{/tikz/natoapp6c/normal text,
%   /tikz/natoapp6c/squashed text,
%   /tikz/natoapp6c/small text,
%   /tikz/natoapp6c/small squashed text}
%
%   NATO App6 does not specify any particular font for text symbols
%   (main, modifiers, or amplifiers)  but here we choose to use \TeX{}
%   Gyro Heros (a Gothic font, i.e., Helvetica-like).
%
%    \begin{macrocode}
\newcommand\n@to@ppfont[2][b]{%
  \fontencoding{T1}\fontfamily{qhv}\fontseries{#1}\fontsize{#2}{0}\selectfont}
\tikzset{%
  natoapp6c/text/.style={%
    shape=rectangle,%
    draw=none,%
    fill=none,%
    transform shape,%
    anchor=center},
  natoapp6c/normal text/.style={font=\n@to@ppfont{12}},
  natoapp6c/squashed text/.style={font=\n@to@ppfont[bc]{12}},
  natoapp6c/small text/.style={font=\n@to@ppfont{10}},
  natoapp6c/squashed small text/.style={font=\n@to@ppfont[bc]{10}},
}
%    \end{macrocode}
% \end{TikzKey}
%
% \begin{Macro}{\n@to@pp@text@normal,
%   \n@to@pp@text@squashed,
%   \n@to@pp@text@small,
%   \n@to@pp@text@smallsquashed}
%
% These macros are short-hands for making a node at $(0,0)$ in the
% local scope.
%
%    \begin{macrocode}
\newcommand\n@to@pp@text@normal[2][]  {%
  \node[natoapp6c/text,natoapp6c/normal text,#1]{#2}}
\newcommand\n@to@pp@text@squashed[2][]{%
  \node[natoapp6c/text,natoapp6c/squashed text,#1]{#2}}
\newcommand\n@to@pp@text@small[2][]   {%
  \node[natoapp6c/text,natoapp6c/small text,#1]{#2}}
\newcommand\n@to@pp@text@smallsquashed[2][]{%
  \node[natoapp6c/text,natoapp6c/squashed small text,#1]{#2}}
%    \end{macrocode}
% \end{Macro}
% 
% \iffalse
% </natoapp6c>
% --------------------------------------------------------------------
% \fi