summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex
blob: d6d6417062365b2546436a686f5988efa1d9fc49 (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
%% symbol library for TikZ track schematics
%
% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license)
%
% Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
%
\ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}%
%
\RequirePackage{tikz,etoolbox}%
%
%%%%%%%%%%%%%%%
% loading sublibraries
%%%%%%%%%%%%%%%
% \usetikzlibrary{trackschematic.topology}%
% \usetikzlibrary{trackschematic.trafficcontrol}%
% \usetikzlibrary{trackschematic.vehicles}%
% \usetikzlibrary{trackschematic.constructions}%
% \usetikzlibrary{trackschematic.electrics}%
% \usetikzlibrary{trackschematic.measures}%
% \usetikzlibrary{trackschematic.symbology}%
%%%%%%%%%%%%%%%
%% template for new symbol definitions
%%%%%%%%%%%%%%%
% %
% \newcommand\XXXX{}% just for safety
% \def\XXXX[#1]#2(#3)#4(#5){% \XXXX[options] at (coord) label (name);
%   \pic[#1] at (#3) {XXXX={#2/#4/#5}}% symbol
% }%
% % tikz keys
% \pgfkeys{%
%   /tikz/trackschematic/.is family,%
%   /tikz/trackschematic//.cd,%
% }%
% % symbol definition
% \tikzset{%
%   pics/XXXX/.default=,%
%   pics/XXXX/.style args={#1/#2/#3}{code={%
%     %% settings
%     \def\coordcommand{#1}% beware of leading and tailing spaces!
%     \def\labelcommand{#2}% beware of leading and tailing spaces!
%     \def\labelcontent{#3}%
%     %% symbol marker
%     %
%     %% label
%     \ifdefstring{\labelcontent}{}{}{% label NOT empty
%       \coordinate (label-coord) at (coord);%
%       \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
%         \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}%
%         \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);%
%       }%
%       \node at (label-coord) {\footnotesize \labelcontent};%
%     }%
%   }},% END of  pics/XXXX/.style args={#1/#2/#3}
%   % symbology entry
%   symbology_XXXX/.pic = {%
%     \maintrack (0,0) -- (6,0);%
%     \XXXX at (3,0);%
%   },%
% }%
% %
%%%%%%%%%%%%%%%
\endinput%
%