377 lines
12 KiB
TeX
377 lines
12 KiB
TeX
%% symbol library for TikZ track schematics
|
|
%
|
|
% Copyright 2018 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.
|
|
|
|
\tikzset{
|
|
train_berth_sign_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.3,0); % signal pole
|
|
{ % signal marker
|
|
\path[draw, line width=1pt] (0.3,-0.575) rectangle ++(0.5,0.35);
|
|
\path[draw, line width=0.75pt] (0.375,-0.3) -- ++(0.35,0);
|
|
\path[draw, line width=0.75pt] (0.55,-0.5) -- ++(0,0.2);
|
|
\path[draw, line width=0.75pt] (0.375,-0.5) -- ++(0.35,0);
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
train_berth_sign_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.3,0); % signal pole
|
|
{ % signal marker
|
|
\path[draw, line width=1pt] (-0.3,0.575) rectangle ++(-0.5,-0.35);
|
|
\path[draw, line width=0.75pt] (-0.375,0.3) -- ++(-0.35,0);
|
|
\path[draw, line width=0.75pt] (-0.55,0.5) -- ++(0,-0.2);
|
|
\path[draw, line width=0.75pt] (-0.375,0.5) -- ++(-0.35,0);
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
pics/train_berth_shape/.style n args={1}{
|
|
code={
|
|
\path[draw,line width=0.75pt,dotted] (0, 0.25) -- (0, 0.35) -- (#1, 0.35) -- ++(0,-0.1); % berth shape
|
|
\path[draw,line width=0.75pt,dotted] (0,-0.25) -- (0,-0.35) -- (#1,-0.35) -- ++(0, 0.1); % berth shape
|
|
}
|
|
},
|
|
pics/train_berth_shape/.default=4,
|
|
}
|
|
\tikzset{
|
|
pics/platform_left/.style n args={1}{
|
|
code={
|
|
\path[draw, line width=0.75pt] (0,0.5) -- ++(0,-0.3) -- ++(#1,0) -- ++(0,0.3);
|
|
\path[draw, line width=0.75pt] (0,0.3) -- ++(#1,0);
|
|
}
|
|
},
|
|
pics/platform_left/.default=4,
|
|
}
|
|
\tikzset{
|
|
pics/platform_right/.style n args={1}{
|
|
code={
|
|
\path[draw, line width=0.75pt] (0,-0.5) -- ++(0,0.3) -- ++(#1,0) -- ++(0,-0.3);
|
|
\path[draw, line width=0.75pt] (0,-0.3) -- ++(#1,0);
|
|
}
|
|
},
|
|
pics/platform_right/.default=4,
|
|
}
|
|
\tikzset{
|
|
view_point_forward/.pic={
|
|
\path[draw,<-,>=latex,line width=1pt] (0,-0.1) -- ++(0,-0.3) -- ++(0.2,0); % arrow
|
|
{ % eye
|
|
\filldraw (0.4,-0.4) circle (0.1);
|
|
\path[draw, line width=1pt]
|
|
(0.4,-0.15) .. controls (0.25,-0.25) and (0.25,-0.55) .. (0.4,-0.65) .. controls (0.55,-0.55) and (0.55,-0.25) .. (0.4,-0.15)--cycle;
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
view_point_backward/.pic={
|
|
\tikzset{>=latex}
|
|
\path[draw,<-,>=latex,line width=1pt] (0,0.1) -- ++(0,0.3) -- ++(-0.2,0); % arrow
|
|
{ % eye
|
|
\filldraw (-0.4,0.4) circle (0.1);
|
|
\path[draw, line width=1pt]
|
|
(-0.4,0.15) .. controls (-0.25,0.25) and (-0.25,0.55) .. (-0.4,0.65) .. controls (-0.55,0.55) and (-0.55,0.25) .. (-0.4,0.15)--cycle;
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
pics/distant_signal_forward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.4,0); % signal pole
|
|
\path[draw, line width=1pt] (0.7,-0.6) -- ++(0,0.4) -- ++ (-0.35,-0.2) -- cycle; % signal marker
|
|
\node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/distant_signal_backward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.4,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.7,0.6) -- ++(0,-0.4) -- ++ (0.35,0.2) -- cycle; % signal marker
|
|
\node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/speed_signal_forward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.4,0); % signal pole
|
|
\path[draw, line width=1pt] (0.4,-0.2) -- ++(0,-0.4) -- ++ (0.35,0.2) -- cycle; % signal marker
|
|
\node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/speed_signal_backward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.4,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.4,0.2) -- ++(0,0.4) -- ++ (-0.35,-0.2) -- cycle; % signal marker
|
|
\node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/block_signal_forward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (0.7,-0.6) rectangle ++(0.4,0.4); % signal marker
|
|
\node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/block_signal_backward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.7,0.6) rectangle ++(-0.4,-0.4); % signal marker
|
|
\node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/route_signal_forward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (0.9,-0.4) circle (0.2); % signal marker
|
|
\node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
pics/route_signal_backward/.style args={#1}{
|
|
code={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.9,0.4) circle (0.2); % signal marker
|
|
\node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator
|
|
}
|
|
},
|
|
pics/node/.default=,
|
|
}
|
|
\tikzset{
|
|
shunt_signal_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (0.6,-0.3) circle (0.1); % signal marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
shunt_signal_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.7,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.6,0.3) circle (0.1); % signal marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
shunt_limit_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4) -- ++(0.5,0); % signal pole
|
|
\path[draw, line width=1pt] (0.5,-0.25) arc (270:90:-0.15) -- cycle;; % signal marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
shunt_limit_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4) -- ++(-0.5,0); % signal pole
|
|
\path[draw, line width=1pt] (-0.5,0.55) arc (90:270:0.15) -- cycle;; % signal marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
block_end_marker_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4); % marker
|
|
\path[draw, line width=1pt] (0,-0.4) -- ++(-0.1,-0.1) -- ++(0.1,-0.1) -- ++(0.1,0.1) -- cycle; % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
block_end_marker_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0) -- ++(0,0.4); % marker
|
|
\path[draw, line width=1pt] (0,0.4) -- ++(0.1,0.1) -- ++(-0.1,0.1) -- ++(-0.1,-0.1) -- cycle; % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
block_clearing_point_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0.1) -- ++(0,-0.2); % marker
|
|
\path[draw, line width=1pt] (-0.1,-0.3) rectangle ++(0.2,0.2); % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
block_clearing_point_backward/.pic={
|
|
\path[draw, line width=1pt] (0,-0.1) -- ++(0,0.2); % marker
|
|
\path[draw, line width=1pt] (0.1,0.3) rectangle ++(-0.2,-0.2); % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
route_clearing_point_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0.1) -- ++(0,-0.2); % marker
|
|
\path[draw, line width=1pt] (0,-0.2) circle (0.1); % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
route_clearing_point_backward/.pic={
|
|
\path[draw, line width=1pt] (0,-0.1) -- ++(0,0.2); % marker
|
|
\path[draw, line width=1pt] (0, 0.2) circle (0.1); % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
clearing_point/.pic={
|
|
\path[draw, line width=1pt] (0 ,-0.1) -- ++( 0 ,0.2); % marker
|
|
\path[draw, line width=1pt] (0.1, 0.1) -- ++(-0.2,0 ); % sign
|
|
};
|
|
}
|
|
\tikzset{
|
|
pics/turnout_left_forward/.style args={#1}{
|
|
code={
|
|
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(0.4,0.4) -- ++(0,-0.4); % turnout marker
|
|
}
|
|
},
|
|
pics/turnout_left_forward/.default=black,
|
|
}
|
|
\tikzset{
|
|
pics/turnout_left_backward/.style args={#1}{
|
|
code={
|
|
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(-0.4,-0.4) -- ++(0,0.4); % turnout marker
|
|
}
|
|
},
|
|
pics/turnout_left_forward/.default=black,
|
|
}
|
|
\tikzset{
|
|
pics/turnout_right_forward/.style args={#1}{
|
|
code={
|
|
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(0.4,-0.4) -- ++(0,0.4); % turnout marker
|
|
}
|
|
},
|
|
pics/turnout_left_forward/.default=black,
|
|
}
|
|
\tikzset{
|
|
pics/turnout_right_backward/.style args={#1}{
|
|
code={
|
|
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(-0.4,0.4) -- ++(0,-0.4); % turnout marker
|
|
}
|
|
},
|
|
pics/turnout_left_forward/.default=black,
|
|
}
|
|
\tikzset{
|
|
fouling_point_right_backward/.pic={
|
|
\path[draw,line width=0.75pt] (-0.7,0) -- ++(0,0.7); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
fouling_point_left_backward/.pic={
|
|
\path[draw,line width=0.75pt] (-0.7,0) -- ++(0,-0.7); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
fouling_point_right_forward/.pic={
|
|
\path[draw,line width=0.75pt] (0.7,0) -- ++(0,-0.7); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
fouling_point_left_forward/.pic={
|
|
\path[draw,line width=0.75pt] (0.7,0) -- ++(0,0.7); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
slip_left_forward/.pic={
|
|
\path[draw,line width=0.75pt] (-0.4,0.1) -- (0.3,0.4); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
slip_left_backward/.pic={
|
|
\path[draw,line width=0.75pt] (-0.3,-0.4) -- (0.4,-0.1); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
slip_right_forward/.pic={
|
|
\path[draw,line width=0.75pt] (-0.4,-0.1) -- (0.3,-0.4); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
slip_right_backward/.pic={
|
|
\path[draw,line width=0.75pt] (0.4,0.1) -- (-0.3,0.4); % fouling point indicator
|
|
};
|
|
}
|
|
\tikzset{
|
|
derailer_right_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
|
|
\path[draw,->,>=latex,line width=1pt,dashed] (0,0) -- ++(0.4,-0.4); % derailer arrow
|
|
};
|
|
}
|
|
\tikzset{
|
|
derailer_right_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
|
|
\path[draw,->,>=latex,line width=1pt,dashed] (0,0) -- ++(-0.4,0.4); % derailer arrow
|
|
};
|
|
}
|
|
\tikzset{
|
|
derailer_left_forward/.pic={
|
|
\path[draw, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
|
|
\path[draw,->,>=latex,line width=1pt,dashed] (0,0) -- ++(0.4,0.4); % derailer arrow
|
|
};
|
|
}
|
|
\tikzset{
|
|
derailer_left_backward/.pic={
|
|
\path[draw, line width=1pt] (0,0.2) -- ++(0,-0.4); % derailer marker
|
|
\path[draw,->,>=latex,line width=1pt,dashed] (0,0) -- ++(-0.4,-0.4); % derailer arrow
|
|
};
|
|
}
|
|
\tikzset{
|
|
bufferstop_forward/.pic={
|
|
\path[draw, line width=1pt] (-0.1,0.2) -- ++(0.1,0) -- ++(0,-0.4) -- ++ (-0.1,0); % bufferstop marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
bufferstop_backward/.pic={
|
|
\path[draw, line width=1pt] (0.1,0.2) -- ++(-0.1,0) -- ++(0,-0.4) -- ++ (0.1,0); % bufferstop marker
|
|
};
|
|
}
|
|
\tikzset{
|
|
level_crossing_barrier_left/.pic={
|
|
{ % road
|
|
\path[draw, line width=1pt] (-0.2, 0.8) -- ++(0,-0.6);
|
|
\path[draw, line width=1pt] ( 0.2, 0.8) -- ++(0,-0.6);
|
|
}
|
|
{ % barrier
|
|
\filldraw (-0.4,0.5) circle (0.05);
|
|
\path[draw, line width=1pt] (-0.4,0.5) -- ++(0.39,0);
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
level_crossing_barrier_right/.pic={
|
|
{ % road
|
|
\path[draw, line width=1pt] (-0.2,-0.8) -- ++(0, 0.6);
|
|
\path[draw, line width=1pt] ( 0.2,-0.8) -- ++(0, 0.6);
|
|
}
|
|
{ % barrier
|
|
\filldraw (0.4,-0.5) circle (0.05);
|
|
\path[draw, line width=1pt] (0.4,-0.5) -- ++(-0.39,0);
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
level_crossing/.pic={
|
|
{ % road
|
|
\path[draw, line width=1pt] (-0.2,-0.8) -- ++(0, 0.6);
|
|
\path[draw, line width=1pt] ( 0.2,-0.8) -- ++(0, 0.6);
|
|
}
|
|
};
|
|
}
|
|
\tikzset{
|
|
pics/bridge_left/.style n args={1}{
|
|
code={
|
|
\path[draw, line width=0.75pt] (-0.1,0.48) -- ++(0.08,-0.08) -- ++(#1,0) -- ++(0.08,0.08);
|
|
}
|
|
},
|
|
pics/bridge_left/.default=3,
|
|
}
|
|
\tikzset{
|
|
pics/bridge_right/.style n args={1}{
|
|
code={
|
|
\path[draw, line width=0.75pt] (-0.1,-0.48) -- ++(0.08,0.08) -- ++(#1,0) -- ++(0.08,-0.08);
|
|
}
|
|
},
|
|
pics/bridge_right/.default=3,
|
|
}
|