added new symbols for transmitters

reorganized and renamed libraries: e.g. topology.tikz,
constructions.tikz etc.

corrected minor flaws
master v0.2
kaat0 2018-12-19 15:23:27 +01:00
parent 47037c6d02
commit 9d16dd4ef5
21 changed files with 508 additions and 363 deletions

View File

@ -1,6 +1,13 @@
tikz-trackschematic tikz-trackschematic
====== ======
Version 0.2
------
* added transmitters
* reorganized src library
* minor improvements
Version 0.1 Version 0.1
------ ------
@ -11,5 +18,5 @@ Roadmap
* encapsulation of symbols in package for tex infrastructure * encapsulation of symbols in package for tex infrastructure
* provide option for internationalziation (i18n) * provide option for internationalziation (i18n)
* write usefull documantion * write usefull documentation
* re-think syntax * re-think syntax

View File

@ -5,5 +5,5 @@
% 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. % 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0); \draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-2,0) {train_berth_shape=4}; \pic at (-2,0) {train_berth_shape_forward=4};
% change the 4 to desired length \pic at (-1,0) {train_berth_shape_backward=3};

View File

@ -1,6 +1,9 @@
%% symbol library for TikZ track schematics %!TEX TS-program = pdflatexmk
% %!TEX root = ../../overview.tex
% Copyright 2018 Martin Scheidt (ISC license)
% 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. % 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-2,0) {train_berth_shape=4};
% change the 4 to desired length

View File

@ -0,0 +1,9 @@
%!TEX TS-program = pdflatexmk
%!TEX root = ../../overview.tex
% 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-1,0) {transmitter_below};
\pic at ( 1,0) {transmitter_above};

View File

@ -0,0 +1,9 @@
%!TEX TS-program = pdflatexmk
%!TEX root = ../../overview.tex
% 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-1,0) {transmitter_below_backward};
\pic at ( 1,0) {transmitter_above_backward};

View File

@ -0,0 +1,9 @@
%!TEX TS-program = pdflatexmk
%!TEX root = ../../overview.tex
% 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (0,0) {route_signal_forward};
\pic at (0,0) {transmitter_below};

View File

@ -0,0 +1,9 @@
%!TEX TS-program = pdflatexmk
%!TEX root = ../../overview.tex
% 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-1,0) {transmitter_below_bidirectional};
\pic at ( 1,0) {transmitter_above_bidirectional};

View File

@ -0,0 +1,9 @@
%!TEX TS-program = pdflatexmk
%!TEX root = ../../overview.tex
% 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.
\draw[line width=2pt] (-2.5,0) -- ++(5,0);
\pic at (-1,0) {transmitter_below_forward};
\pic at ( 1,0) {transmitter_above_forward};

Binary file not shown.

92
examples/station_berg.tex Executable file → Normal file
View File

@ -6,11 +6,15 @@
\documentclass[tikz,border=2]{standalone} \documentclass[tikz,border=2]{standalone}
\usepackage{lmodern} \usepackage{lmodern}
\usepackage[prefix=]{xcolor-solarized}
\input{../src/solarizedColors.tex} \def\rootTrackschematic{../../tikz-trackschematic}
\input{../src/topologySymbols.tex} % Order 1 \def\srcTrackschematic{\rootTrackschematic/src}
\input{../src/layoutSymbols_DE.tex} % Order 2 (important) \input{\srcTrackschematic/topology.tikz}
\input{../src/vehicles.tex} \input{\srcTrackschematic/constructions.tikz}
\input{\srcTrackschematic/vehicles.tikz}
\input{\srcTrackschematic/trafficControl.tikz} % Order 1
\input{\srcTrackschematic/layoutSymbols_DE.tikz} % Order 2 (important)
\begin{document} \begin{document}
\begin{tikzpicture}[font=\sffamily] \begin{tikzpicture}[font=\sffamily]
@ -22,10 +26,10 @@
} }
{ % tracks { % tracks
\draw[line width=2pt] ( 1.5, 0) -- ++(37,0); \draw[line width=2pt] ( 1.5, 0) -- ++(37,0);
\draw[line width=2pt] (15 , 0) -- ++(1,1) -- ++(10,0) -- ++(1,-1); \draw[line width=2pt] (15 , 0) -- ++( 1,1) -- ++(10,0) -- ++(1,-1);
\draw[line width=1pt] (11 ,-1) -- ++(2,0) -- ++(1,1); \draw[line width=1pt] (11 ,-1) -- ++( 2,0) -- ++( 1,1);
\draw[line width=1pt] ( 9 , 1) -- ++(7,0); \draw[line width=1pt] ( 9 , 1) -- ++( 7,0);
\draw[line width=1pt] (14 , 1) -- ++(1,1) -- ++(10,0); \draw[line width=1pt] (14 , 1) -- ++( 1,1) -- ++(10,0);
% track numbers % track numbers
\node[fill=white] at (11.7, 1) {12}; \node[fill=white] at (11.7, 1) {12};
\node[fill=white] at (11.7,-1) {10}; \node[fill=white] at (11.7,-1) {10};
@ -37,46 +41,46 @@
\pic at (11,-1) {bufferstop_backward}; \pic at (11,-1) {bufferstop_backward};
\pic at (25, 2) {bufferstop_forward}; \pic at (25, 2) {bufferstop_forward};
% turnouts % turnouts
\pic at (12.8,-1) {derailer_right_forward}; \pic at (12.8,-1) {derailer_right_forward};
\node at (12.7,-1.4) {\footnotesize Gs7}; \node at (12.7,-1.4) {\footnotesize Gs7};
\pic at (14,0) {turnout_left_backward}; \pic at (14,0) {turnout_left_backward};
\pic at (14,0) {fouling_point_left_backward}; \pic at (14,0) {fouling_point_left_backward};
\node at (14,0.2) {\footnotesize W1}; \node at (14,0.2) {\footnotesize W1};
\pic at (14,1) {turnout_left_forward}; \pic at (14,1) {turnout_left_forward};
\pic at (14,1) {fouling_point_left_forward}; \pic at (14,1) {fouling_point_left_forward};
\node at (14,0.8) {\footnotesize W4}; \node at (14,0.8) {\footnotesize W4};
\pic at (15,0) {turnout_left_forward}; \pic at (15,0) {turnout_left_forward};
\pic at (15,0) {fouling_point_left_forward}; \pic at (15,0) {fouling_point_left_forward};
\node at (15,-0.2) {\footnotesize W2}; \node at (15,-0.2) {\footnotesize W2};
\pic at (16,1) {turnout_left_backward}; \pic at (16,1) {turnout_left_backward};
\pic at (16,1) {fouling_point_left_backward}; \pic at (16,1) {fouling_point_left_backward};
\node at (16,1.2) {\footnotesize W3}; \node at (16,1.2) {\footnotesize W3};
\pic at (27,0) {turnout_right_backward}; \pic at (27,0) {turnout_right_backward};
\pic at (27,0) {fouling_point_right_backward}; \pic at (27,0) {fouling_point_right_backward};
\node at (27,-0.2) {\footnotesize W6}; \node at (27,-0.2) {\footnotesize W6};
% platforms % platforms
\pic at (19,0) {platform_left}; \pic at (19,0) {platform_left};
\pic at (19,1) {platform_right}; \pic at (19,1) {platform_right};
} }
{ % signals { % signals
\pic at ( 7,0) {distant_signal_forward}; \pic at ( 7, 0 ) {distant_signal_forward};
\node[left] at (7,-0.4) {Va}; \node[left] at ( 7,-0.4) {Va};
\pic at (10,0) {route_signal_forward}; \pic at (10, 0 ) {route_signal_forward};
\pic at (10,0) {distant_signal_forward}; \pic at (10, 0 ) {distant_signal_forward};
\node[left] at (10,-0.4) {A}; \node[left] at (10,-0.4) {A};
\pic at (18,1) {route_signal_backward}; \pic at (18, 1 ) {route_signal_backward};
\node[right] at (18,1.4) {P2}; \node[right] at (18, 1.4) {P2};
\pic at (18,0) {route_signal_backward}; \pic at (18, 0 ) {route_signal_backward};
\node[right] at (18,0.4) {P1}; \node[right] at (18, 0.4) {P1};
\pic at (24,1) {route_signal_forward}; \pic at (24, 1 ) {route_signal_forward};
\node[left] at (24,0.6) {N2}; \node[left] at (24, 0.6) {N2};
\pic at (24,0) {route_signal_forward}; \pic at (24, 0 ) {route_signal_forward};
\node[left] at (24,-0.4) {N1}; \node[left] at (24,-0.4) {N1};
\pic at (30,0) {route_signal_backward}; \pic at (30, 0 ) {route_signal_backward};
\pic at (30,0) {distant_signal_backward}; \pic at (30, 0 ) {distant_signal_backward};
\node[right] at (30,0.4) {F}; \node[right] at (30, 0.4) {F};
\pic at (33,0) {distant_signal_backward}; \pic at (33, 0 ) {distant_signal_backward};
\node[right] at (33,0.4) {Vf}; \node[right] at (33, 0.4) {Vf};
% routes % routes
\pic at (20,0) {route_backward}; \pic at (20,0) {route_backward};
\pic at (22,0) {route_forward}; \pic at (22,0) {route_forward};
@ -102,14 +106,14 @@
\pic at (30 , 0) {axle_counter_right}; \pic at (30 , 0) {axle_counter_right};
} }
{ % vehicles { % vehicles
\pic at ( 6,0) {train_moving_forward}; \pic at ( 6 ,0) {train_moving_forward};
\node at (4,0) {\emph{RB}}; \node at ( 4 ,0) {\emph{RB}};
\pic at (21.5,2) {train=3}; \pic at (21.5,2) {train=3};
\node at (23,2) {\emph{WG}}; \node at (23 ,2) {\emph{WG}};
\pic at (10.2,1) {train=1}; \pic at (10.2,1) {train=1};
\node at (10.7,1) {\emph{Tfz}}; \node at (10.7,1) {\emph{Tfz}};
\pic at (34,0) {train_moving_backward}; \pic at (34 ,0) {train_moving_backward};
\node at (36,0) {\emph{IC}}; \node at (36 ,0) {\emph{IC}};
} }
{ % hectometer posts { % hectometer posts
\tikzset{every node/.style={left,base00,rotate=-90},every path/.style={base00,dashed}}; \tikzset{every node/.style={left,base00,rotate=-90},every path/.style={base00,dashed}};

Binary file not shown.

View File

@ -6,11 +6,13 @@
\documentclass[tikz,border=2]{standalone} \documentclass[tikz,border=2]{standalone}
\usepackage{lmodern} \usepackage{lmodern}
\usepackage[prefix=]{xcolor-solarized}
\input{../src/solarizedColors.tex} \def\rootTrackschematic{../../tikz-trackschematic}
\input{../src/topologySymbols.tex} \def\srcTrackschematic{\rootTrackschematic/src}
% \input{../src/layoutSymbols_DE.tex} \input{\srcTrackschematic/topology.tikz}
\input{../src/vehicles.tex} \input{\srcTrackschematic/trafficControl.tikz}
\input{\srcTrackschematic/constructions.tikz}
\begin{document} \begin{document}
\begin{tikzpicture}[font=\sffamily] \begin{tikzpicture}[font=\sffamily]
@ -46,14 +48,14 @@
\node[fill=white] at (22.5, 5) { 5}; \node[fill=white] at (22.5, 5) { 5};
\node[fill=white] at (29.0, 6) {51}; \node[fill=white] at (29.0, 6) {51};
% % bufferstops % % bufferstops
\pic at ( 9, 1) {bufferstop_backward}; \pic at ( 9, 1) {bufferstop_backward};
\pic at (30, 6) {bufferstop_forward}; \pic at (30, 6) {bufferstop_forward};
% turnouts % turnouts
\pic at ( 5,0) {turnout_left_forward}; \pic at ( 5,0) {turnout_left_forward};
\node at ( 5,-0.2) {\footnotesize W1}; \node at ( 5,-0.2) {\footnotesize W1};
% \pic at ( 5,0) {fouling_point_left_forward}; % \pic at ( 5,0) {fouling_point_left_forward};
\pic at ( 6,1) {turnout_left_backward}; \pic at ( 6,1) {turnout_left_backward};
\node at (6,1.2) {\footnotesize W2}; \node at ( 6,1.2) {\footnotesize W2};
% \pic at ( 6,1) {fouling_point_left_backward}; % \pic at ( 6,1) {fouling_point_left_backward};
\pic at (11,4) {derailer_left_forward}; \pic at (11,4) {derailer_left_forward};
\node[left,align=right] at (11.1,4.2) {\footnotesize Gs41}; \node[left,align=right] at (11.1,4.2) {\footnotesize Gs41};

Binary file not shown.

View File

@ -1,6 +1,6 @@
%! TEX TS-program = pdflatexmk %!TEX TS-program = pdflatexmk
% Copyright 2018 Martin Scheidt (ISC license)
% 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. % 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.
\documentclass[a4paper,landscape]{article} \documentclass[a4paper,landscape]{article}
@ -8,193 +8,192 @@
\usepackage{fullpage} \usepackage{fullpage}
\usepackage{longtable} \usepackage{longtable}
\usepackage{tikz} \usepackage{tikz}
\usepackage[prefix=]{xcolor-solarized}
\usepackage{hyperref}
\usepackage{listings} \usepackage{listings}
\lstset{ \lstset{
language=TeX, language=TeX,
basicstyle=\ttfamily, basicstyle=\ttfamily,
columns=fullflexible, columns=fullflexible,
breaklines=true breaklines=true
} }
\def\rootTrackschematic{../tikz-trackschematic}
\def\srcTrackschematic{\rootTrackschematic/src}
\renewcommand{\symbol}[1]{ \renewcommand{\symbol}[1]{
\begin{tikzpicture}[anchor=base,baseline=-3] \begin{tikzpicture}[anchor=base,baseline=-3]
\input{examples/snippets/#1} \input{examples/snippets/#1}
\path (-3,-1.0) rectangle (3,1.0); % background rectangle to unify every cell containing a symbol \path (-3,-1.2) rectangle (3,1.2); % background rectangle to unify every cell containing a symbol
\end{tikzpicture} \end{tikzpicture}
} }
\newcommand{\code}[1]{\lstinputlisting[firstline=7]{examples/snippets/#1}} \newcommand{\code}[1]{\lstinputlisting[firstline=7]{\rootTrackschematic/examples/snippets/#1}}
\newcommand{\colorsquare}[1]{ \newcommand{\colorsquare}[1]{
\begin{tikzpicture}[anchor=base,baseline=-3] \begin{tikzpicture}[anchor=base,baseline=-3]
\filldraw [#1] (-0.3,-0.3) rectangle (0.3,0.3); \filldraw [#1] (-0.3,-0.3) rectangle (0.3,0.3);
\end{tikzpicture} \end{tikzpicture}
} }
\newcounter{symbolNo}
\def\No{\stepcounter{symbolNo}\arabic{symbolNo}}
\input{src/layoutSymbols_DE.tex} \input{\srcTrackschematic/topology.tikz}
\input{src/topologySymbols.tex} \input{\srcTrackschematic/trafficControl.tikz}
\input{src/vehicles.tex} \input{\srcTrackschematic/vehicles.tikz}
\input{src/graphSymbols.tex} \input{\srcTrackschematic/constructions.tikz}
\begin{document} \begin{document}
\centering \centering
\begin{longtable}{|l|c|l|c|} \begin{longtable}{|r|l|c|l|c|}
\hline \hline
Name & Symbol & Code & File \\ No. & Name & Symbol & Code & File \\
\endhead \endhead
\hline \hline
main track & \symbol{main_track.tikz} & \code{main_track.tikz} & \emph{none} \\ \No & main track & \symbol{main_track.tikz} & \code{main_track.tikz} & \emph{none} \\
\hline \hline
main line (double track) & \symbol{main_line.tikz} & \code{main_line.tikz} & \emph{none} \\ \No & main line (double track) & \symbol{main_line.tikz} & \code{main_line.tikz} & \emph{none} \\
\hline \hline
side track & \symbol{side_track.tikz} & \code{side_track.tikz} & \emph{none} \\ \No & side track & \symbol{side_track.tikz} & \code{side_track.tikz} & \emph{none} \\
\hline \hline
train berth sign (forward) & \symbol{train_berth_sign_forward.tikz} & \code{train_berth_sign_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & turnout left (forward) & \symbol{turnout_left_forward.tikz} & \code{turnout_left_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
train berth sign (backward) & \symbol{train_berth_sign_backward.tikz} & \code{train_berth_sign_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & turnout left (backward) & \symbol{turnout_left_backward.tikz} & \code{turnout_left_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
train berth shape & \symbol{train_berth_shape.tikz} & \code{train_berth_shape.tikz} & \verb$topologySymbols.tex$ \\ \No & turnout right (forward) & \symbol{turnout_right_forward.tikz} & \code{turnout_right_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
train berth & \symbol{train_berth.tikz} & \code{train_berth.tikz} & \verb$topologySymbols.tex$ \\ \No & turnout right (backward) & \symbol{turnout_right_backward.tikz} & \code{turnout_right_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
platform (left) & \symbol{platform_left.tikz} & \code{platform_left.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{5cm}{turnout left (forward)\\with fouling point indicator}
& \symbol{turnout_with_fouling_left_forward.tikz} & \code{turnout_with_fouling_left_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
platform (right) & \symbol{platform_right.tikz} & \code{platform_right.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{5cm}{turnout left (backward)\\with fouling point indicator}
& \symbol{turnout_with_fouling_left_backward.tikz} & \code{turnout_with_fouling_left_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
platform (middle) & \symbol{platform_middle.tikz} & \code{platform_middle.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{5cm}{turnout right (forward)\\with fouling point indicator}
& \symbol{turnout_with_fouling_right_forward.tikz} & \code{turnout_with_fouling_right_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
view point (forward) & \symbol{view_point_forward.tikz} & \code{view_point_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{5cm}{turnout right (backward)\\with fouling point indicator}
& \symbol{turnout_with_fouling_right_backward.tikz}& \code{turnout_with_fouling_right_backward.tikz}& \texttt{topology.tikz} \\
\hline \hline
view point (backward) & \symbol{view_point_backward.tikz} & \code{view_point_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & double-slip turnout left & \symbol{double-slip_turnout_left.tikz} & \code{double-slip_turnout_left.tikz} & \texttt{topology.tikz} \\
\hline \hline
distant signal (forward) & \symbol{distant_signal_forward.tikz} & \code{distant_signal_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & double-slip turnout right & \symbol{double-slip_turnout_right.tikz} & \code{double-slip_turnout_right.tikz} & \texttt{topology.tikz} \\
\hline \hline
\parbox[c]{4cm}{distant signal\\with speed} \No & diamond crossing left & \symbol{diamond_crossing_left.tikz} & \code{diamond_crossing_left.tikz} & \texttt{topology.tikz} \\
& \symbol{distant_speed_signal_forward.tikz} & \code{distant_speed_signal_forward.tikz} &\verb$topologySymbols.tex$ \\
\hline \hline
distant signal (backward) & \symbol{distant_signal_backward.tikz} & \code{distant_signal_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & diamond crossing right & \symbol{diamond_crossing_right.tikz} & \code{diamond_crossing_right.tikz} & \texttt{topology.tikz} \\
\hline \hline
\parbox[c]{4cm}{distant signal\\with speed} \No & derailer left (forward) & \symbol{derailer_left_forward.tikz} & \code{derailer_left_forward.tikz} & \texttt{topology.tikz} \\
& \symbol{distant_speed_signal_backward.tikz} & \code{distant_speed_signal_backward.tikz} &\verb$topologySymbols.tex$ \\
\hline \hline
speed signal (forward) & \symbol{speed_signal_forward.tikz} & \code{speed_signal_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & derailer left (backward) & \symbol{derailer_left_backward.tikz} & \code{derailer_left_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
speed signal (backward) & \symbol{speed_signal_backward.tikz} & \code{speed_signal_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & derailer right (forward) & \symbol{derailer_right_forward.tikz} & \code{derailer_right_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
block signal (forward) & \symbol{block_signal_forward.tikz} & \code{block_signal_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & derailer right (backward) & \symbol{derailer_right_backward.tikz} & \code{derailer_right_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
block signal (backward) & \symbol{block_signal_backward.tikz} & \code{block_signal_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & bufferstop (forward) & \symbol{bufferstop_forward.tikz} & \code{bufferstop_forward.tikz} & \texttt{topology.tikz} \\
\hline \hline
route signal (forward) & \symbol{route_signal_forward.tikz} & \code{route_signal_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & bufferstop (backward) & \symbol{bufferstop_backward.tikz} & \code{bufferstop_backward.tikz} & \texttt{topology.tikz} \\
\hline \hline
route signal (backward) & \symbol{route_signal_backward.tikz} & \code{route_signal_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & train (not moving) & \symbol{train.tikz} & \code{train.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
shunt signal (forward) & \symbol{shunt_signal_forward.tikz} & \code{shunt_signal_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & short train (not moving) & \symbol{short_train.tikz} & \code{short_train.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
shunt signal (backward) & \symbol{shunt_signal_backward.tikz} & \code{shunt_signal_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & train moving (forward) & \symbol{train_moving_forward.tikz} & \code{train_moving_forward.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
shunt limit (forward) & \symbol{shunt_limit_forward.tikz} & \code{shunt_limit_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & train moving (backward) & \symbol{train_moving_backward.tikz} & \code{train_moving_backward.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
shunt limit (backward) & \symbol{shunt_limit_backward.tikz} & \code{shunt_limit_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & ghost train moving (forward) & \symbol{ghost_train_moving_forward.tikz} & \code{ghost_train_moving_forward.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
block end marker (forward) & \symbol{block_end_marker_forward.tikz} & \code{block_end_marker_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & ghost train moving (backward) & \symbol{ghost_train_moving_backward.tikz} & \code{ghost_train_moving_backward.tikz} & \texttt{vehicles.tikz} \\
\hline \hline
block end marker (backward) & \symbol{block_end_marker_backward.tikz} & \code{block_end_marker_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & train berth sign (forward) & \symbol{train_berth_sign_forward.tikz} & \code{train_berth_sign_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
block clearing point (forward) & \symbol{block_clearing_point_forward.tikz} & \code{block_clearing_point_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & train berth sign (backward) & \symbol{train_berth_sign_backward.tikz} & \code{train_berth_sign_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
block clearing point (backward) & \symbol{block_clearing_point_backward.tikz} & \code{block_clearing_point_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & train berth shape bidirectional & \symbol{train_berth_shape_bidirectional.tikz} & \code{train_berth_shape_bidirectional.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
route clearing point (forward) & \symbol{route_clearing_point_forward.tikz} & \code{route_clearing_point_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & train berth shape & \symbol{train_berth_shape.tikz} & \code{train_berth_shape.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
route clearing point (backward) & \symbol{route_clearing_point_backward.tikz} & \code{route_clearing_point_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & train berth & \symbol{train_berth.tikz} & \code{train_berth.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
clearing point & \symbol{clearing_point.tikz} & \code{clearing_point.tikz} & \verb$topologySymbols.tex$ \\ \No & view point (forward) & \symbol{view_point_forward.tikz} & \code{view_point_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
turnout left (forward) & \symbol{turnout_left_forward.tikz} & \code{turnout_left_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & view point (backward) & \symbol{view_point_backward.tikz} & \code{view_point_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
turnout left (backward) & \symbol{turnout_left_backward.tikz} & \code{turnout_left_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & distant signal (forward) & \symbol{distant_signal_forward.tikz} & \code{distant_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
turnout right (forward) & \symbol{turnout_right_forward.tikz} & \code{turnout_right_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{4cm}{distant signal\\with speed indicator}
& \symbol{distant_speed_signal_forward.tikz} & \code{distant_speed_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
turnout right (backward) & \symbol{turnout_right_backward.tikz} & \code{turnout_right_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & distant signal (backward) & \symbol{distant_signal_backward.tikz} & \code{distant_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
\parbox[c]{5cm}{turnout left (forward)\\with fouling point indicator} \No & \parbox[c]{4cm}{distant signal\\with speed indicator}
& \symbol{turnout_with_fouling_left_forward.tikz} & \code{turnout_with_fouling_left_forward.tikz} & \verb$topologySymbols.tex$ \\ & \symbol{distant_speed_signal_backward.tikz} & \code{distant_speed_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
\parbox[c]{5cm}{turnout left (backward)\\with fouling point indicator} \No & speed signal (forward) & \symbol{speed_signal_forward.tikz} & \code{speed_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
& \symbol{turnout_with_fouling_left_backward.tikz} & \code{turnout_with_fouling_left_backward.tikz} & \verb$topologySymbols.tex$ \\
\hline \hline
\parbox[c]{5cm}{turnout right (forward)\\with fouling point indicator} \No & speed signal (backward) & \symbol{speed_signal_backward.tikz} & \code{speed_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
& \symbol{turnout_with_fouling_right_forward.tikz} & \code{turnout_with_fouling_right_forward.tikz} & \verb$topologySymbols.tex$ \\
\hline \hline
\parbox[c]{5cm}{turnout right (backward)\\with fouling point indicator} \No & block signal (forward) & \symbol{block_signal_forward.tikz} & \code{block_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
& \symbol{turnout_with_fouling_right_backward.tikz}& \code{turnout_with_fouling_right_backward.tikz}& \verb$topologySymbols.tex$ \\
\hline \hline
double-slip turnout left & \symbol{double-slip_turnout_left.tikz} & \code{double-slip_turnout_left.tikz} & \verb$topologySymbols.tex$ \\ \No & block signal (backward) & \symbol{block_signal_backward.tikz} & \code{block_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
double-slip turnout right & \symbol{double-slip_turnout_right.tikz} & \code{double-slip_turnout_right.tikz} & \verb$topologySymbols.tex$ \\ \No & route signal (forward) & \symbol{route_signal_forward.tikz} & \code{route_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
diamond crossing left & \symbol{diamond_crossing_left.tikz} & \code{diamond_crossing_left.tikz} & \verb$topologySymbols.tex$ \\ \No & route signal (backward) & \symbol{route_signal_backward.tikz} & \code{route_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
diamond crossing right & \symbol{diamond_crossing_right.tikz} & \code{diamond_crossing_right.tikz} & \verb$topologySymbols.tex$ \\ \No & shunt signal (forward) & \symbol{shunt_signal_forward.tikz} & \code{shunt_signal_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
derailer left (forward) & \symbol{derailer_left_forward.tikz} & \code{derailer_left_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & shunt signal (backward) & \symbol{shunt_signal_backward.tikz} & \code{shunt_signal_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
derailer left (backward) & \symbol{derailer_left_backward.tikz} & \code{derailer_left_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & shunt limit (forward) & \symbol{shunt_limit_forward.tikz} & \code{shunt_limit_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
derailer right (forward) & \symbol{derailer_right_forward.tikz} & \code{derailer_right_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & shunt limit (backward) & \symbol{shunt_limit_backward.tikz} & \code{shunt_limit_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
derailer right (backward) & \symbol{derailer_right_backward.tikz} & \code{derailer_right_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & transmitter (below \& above) & \symbol{transmitter.tikz} & \code{transmitter.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
bufferstop (forward) & \symbol{bufferstop_forward.tikz} & \code{bufferstop_forward.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{4.5cm}{transmitter (below)\\with signal}
& \symbol{transmitter_below_with_signal.tikz} & \code{transmitter_below_with_signal.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
bufferstop (backward) & \symbol{bufferstop_backward.tikz} & \code{bufferstop_backward.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective forward}
& \symbol{transmitter_forward.tikz} & \code{transmitter_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
level crossing (single track) & \symbol{level_crossing_single.tikz} & \code{level_crossing_single.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective backward}
& \symbol{transmitter_backward.tikz} & \code{transmitter_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
level crossing (double track) & \symbol{level_crossing_double.tikz} & \code{level_crossing_double.tikz} & \verb$topologySymbols.tex$ \\ \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective bidirectional}
& \symbol{transmitter_bidirectional.tikz} & \code{transmitter_bidirectional.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
\parbox[c]{5cm}{level crossing (double track)\\with full closure} \No & block end marker (forward) & \symbol{block_end_marker_forward.tikz} & \code{block_end_marker_forward.tikz} & \texttt{trafficControl.tikz} \\
& \symbol{level_crossing_double_full_closure.tikz} & \code{level_crossing_double_full_closure.tikz} & \verb$topologySymbols.tex$ \\
\hline \hline
bridge & \symbol{bridge.tikz} & \code{bridge.tikz} & \verb$topologySymbols.tex$ \\ \No & block end marker (backward) & \symbol{block_end_marker_backward.tikz} & \code{block_end_marker_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
\parbox[c]{5cm}{bridge\\with track beneath} \No & block clearing point (forward) & \symbol{block_clearing_point_forward.tikz} & \code{block_clearing_point_forward.tikz} & \texttt{trafficControl.tikz} \\
& \symbol{bridge_track_beneath.tikz} & \code{bridge_track_beneath.tikz} & \verb$topologySymbols.tex$ \\
\hline \hline
train (not moving) & \symbol{train.tikz} & \code{train.tikz} & \verb$vehicles.tex$ \\ \No & block clearing point (backward) & \symbol{block_clearing_point_backward.tikz} & \code{block_clearing_point_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
short train (not moving) & \symbol{short_train.tikz} & \code{short_train.tikz} & \verb$vehicles.tex$ \\ \No & route clearing point (forward) & \symbol{route_clearing_point_forward.tikz} & \code{route_clearing_point_forward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
train moving (forward) & \symbol{train_moving_forward.tikz} & \code{train_moving_forward.tikz} & \verb$vehicles.tex$ \\ \No & route clearing point (backward) & \symbol{route_clearing_point_backward.tikz} & \code{route_clearing_point_backward.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
train moving (backward) & \symbol{train_moving_backward.tikz} & \code{train_moving_backward.tikz} & \verb$vehicles.tex$ \\ \No & clearing point & \symbol{clearing_point.tikz} & \code{clearing_point.tikz} & \texttt{trafficControl.tikz} \\
\hline \hline
ghost train moving (forward) & \symbol{ghost_train_moving_forward.tikz} & \code{ghost_train_moving_forward.tikz} & \verb$vehicles.tex$ \\ \No & platform (left) & \symbol{platform_left.tikz} & \code{platform_left.tikz} & \texttt{constructions.tikz} \\
\hline \hline
ghost train moving (backward) & \symbol{ghost_train_moving_backward.tikz} & \code{ghost_train_moving_backward.tikz} & \verb$vehicles.tex$ \\ \No & platform (right) & \symbol{platform_right.tikz} & \code{platform_right.tikz} & \texttt{constructions.tikz} \\
\hline
\No & platform (middle) & \symbol{platform_middle.tikz} & \code{platform_middle.tikz} & \texttt{constructions.tikz} \\
\hline
\No & level crossing (single track) & \symbol{level_crossing_single.tikz} & \code{level_crossing_single.tikz} & \texttt{constructions.tikz} \\
\hline
\No & level crossing (double track) & \symbol{level_crossing_double.tikz} & \code{level_crossing_double.tikz} & \texttt{constructions.tikz} \\
\hline
\No & \parbox[c]{5cm}{level crossing (double track)\\with full closure}
& \symbol{level_crossing_double_full_closure.tikz} & \code{level_crossing_double_full_closure.tikz} & \texttt{constructions.tikz} \\
\hline
\No & bridge & \symbol{bridge.tikz} & \code{bridge.tikz} & \texttt{constructions.tikz} \\
\hline
\No & \parbox[c]{5cm}{bridge\\with track beneath}
& \symbol{bridge_track_beneath.tikz} & \code{bridge_track_beneath.tikz} & \texttt{constructions.tikz} \\
\hline \hline
\end{longtable} \end{longtable}
\begin{tabular}{l*{10}{c}}
name & 100\% & 90\% & 80\% & 70\% & 60\% & 50\% & 40\% & 30\% & 20\% & 10\% \\
base03 & \colorsquare{base03} & \colorsquare{base03!90} & \colorsquare{base03!80} & \colorsquare{base03!70} & \colorsquare{base03!60} & \colorsquare{base03!50} & \colorsquare{base03!40} & \colorsquare{base03!30} & \colorsquare{base03!20} & \colorsquare{base03!10} \\
base02 & \colorsquare{base02} & \colorsquare{base02!90} & \colorsquare{base02!80} & \colorsquare{base02!70} & \colorsquare{base02!60} & \colorsquare{base02!50} & \colorsquare{base02!40} & \colorsquare{base02!30} & \colorsquare{base02!20} & \colorsquare{base02!10} \\
base01 & \colorsquare{base01} & \colorsquare{base01!90} & \colorsquare{base01!80} & \colorsquare{base01!70} & \colorsquare{base01!60} & \colorsquare{base01!50} & \colorsquare{base01!40} & \colorsquare{base01!30} & \colorsquare{base01!20} & \colorsquare{base01!10} \\
base00 & \colorsquare{base00} & \colorsquare{base00!90} & \colorsquare{base00!80} & \colorsquare{base00!70} & \colorsquare{base00!60} & \colorsquare{base00!50} & \colorsquare{base00!40} & \colorsquare{base00!30} & \colorsquare{base00!20} & \colorsquare{base00!10} \\
base0 & \colorsquare{base0} & \colorsquare{base0!90} & \colorsquare{base0!80} & \colorsquare{base0!70} & \colorsquare{base0!60} & \colorsquare{base0!50} & \colorsquare{base0!40} & \colorsquare{base0!30} & \colorsquare{base0!20} & \colorsquare{base0!10} \\
base1 & \colorsquare{base1} & \colorsquare{base1!90} & \colorsquare{base1!80} & \colorsquare{base1!70} & \colorsquare{base1!60} & \colorsquare{base1!50} & \colorsquare{base1!40} & \colorsquare{base1!30} & \colorsquare{base1!20} & \colorsquare{base1!10} \\
base2 & \colorsquare{base2} & \colorsquare{base2!90} & \colorsquare{base2!80} & \colorsquare{base2!70} & \colorsquare{base2!60} & \colorsquare{base2!50} & \colorsquare{base2!40} & \colorsquare{base2!30} & \colorsquare{base2!20} & \colorsquare{base2!10} \\
base3 & \colorsquare{base3} & \colorsquare{base3!90} & \colorsquare{base3!80} & \colorsquare{base3!70} & \colorsquare{base3!60} & \colorsquare{base3!50} & \colorsquare{base3!40} & \colorsquare{base3!30} & \colorsquare{base3!20} & \colorsquare{base3!10} \\
yellow & \colorsquare{yellow} & \colorsquare{yellow!90} & \colorsquare{yellow!80} & \colorsquare{yellow!70} & \colorsquare{yellow!60} & \colorsquare{yellow!50} & \colorsquare{yellow!40} & \colorsquare{yellow!30} & \colorsquare{yellow!20} & \colorsquare{yellow!10} \\
orange & \colorsquare{orange} & \colorsquare{orange!90} & \colorsquare{orange!80} & \colorsquare{orange!70} & \colorsquare{orange!60} & \colorsquare{orange!50} & \colorsquare{orange!40} & \colorsquare{orange!30} & \colorsquare{orange!20} & \colorsquare{orange!10} \\
red & \colorsquare{red} & \colorsquare{red!90} & \colorsquare{red!80} & \colorsquare{red!70} & \colorsquare{red!60} & \colorsquare{red!50} & \colorsquare{red!40} & \colorsquare{red!30} & \colorsquare{red!20} & \colorsquare{red!10} \\
magenta & \colorsquare{magenta} & \colorsquare{magenta!90} & \colorsquare{magenta!80} & \colorsquare{magenta!70} & \colorsquare{magenta!60} & \colorsquare{magenta!50} & \colorsquare{magenta!40} & \colorsquare{magenta!30} & \colorsquare{magenta!20} & \colorsquare{magenta!10} \\
violet & \colorsquare{violet} & \colorsquare{violet!90} & \colorsquare{violet!80} & \colorsquare{violet!70} & \colorsquare{violet!60} & \colorsquare{violet!50} & \colorsquare{violet!40} & \colorsquare{violet!30} & \colorsquare{violet!20} & \colorsquare{violet!10} \\
blue & \colorsquare{blue} & \colorsquare{blue!90} & \colorsquare{blue!80} & \colorsquare{blue!70} & \colorsquare{blue!60} & \colorsquare{blue!50} & \colorsquare{blue!40} & \colorsquare{blue!30} & \colorsquare{blue!20} & \colorsquare{blue!10} \\
cyan & \colorsquare{cyan} & \colorsquare{cyan!90} & \colorsquare{cyan!80} & \colorsquare{cyan!70} & \colorsquare{cyan!60} & \colorsquare{cyan!50} & \colorsquare{cyan!40} & \colorsquare{cyan!30} & \colorsquare{cyan!20} & \colorsquare{cyan!10} \\
green & \colorsquare{green} & \colorsquare{green!90} & \colorsquare{green!80} & \colorsquare{green!70} & \colorsquare{green!60} & \colorsquare{green!50} & \colorsquare{green!40} & \colorsquare{green!30} & \colorsquare{green!20} & \colorsquare{green!10} \\
\multicolumn{11}{r}{solarized color scheme by \href{http://ethanschoonover.com/solarized}{Ethan Schoonover}}
\end{tabular}
\solarizedPalette
\end{document} \end{document}

72
src/constructions.tikz Normal file
View File

@ -0,0 +1,72 @@
%% 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{
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{
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,
}

View File

@ -13,10 +13,31 @@
pics/node/.default=white/1pt, pics/node/.default=white/1pt,
} }
\tikzset{ \tikzset{
colon/.pic={ pics/node_with_label/.style args={#1/#2/#3}{
code={
\path[draw,line width=#2,fill=#1] (0,0) circle (0.1);
\node at (0,-0.3) {#3};
}
},
pics/node_with_label/.default=white/1pt/1,
}
\tikzset{
pics/colon/.style args={#1}{
code={
\path[draw,line width=1pt,fill=white] (-0.1,0) circle (0.1); \path[draw,line width=1pt,fill=white] (-0.1,0) circle (0.1);
\path[draw,line width=1pt,fill=white] ( 0.1,0) circle (0.1); \path[draw,line width=1pt,fill=white] ( 0.1,0) circle (0.1);
}; \node at (0,-0.3) {#1};
}
},
pics/colon/.default=,
}
\tikzset{
pics/connexity/.style args={#1/#2}{
code={
\draw [#1,line width=#2,rounded corners=8pt,fill=white] (-0.5,-0.3) rectangle (0.5,0.3);
}
},
pics/connexity/.default=blue/1pt,
} }
\tikzset{ \tikzset{
approach/.pic={ approach/.pic={

0
src/layoutSymbols_DE.tex → src/layoutSymbols_DE.tikz Executable file → Normal file
View File

View File

@ -1,36 +0,0 @@
% Copyright (c) 2011 Ethan Schoonover
% Permission is hereby granted, free of charge, to any person obtaining a copy
% of this software and associated documentation files (the "Software"), to deal
% in the Software without restriction, including without limitation the rights
% to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
% copies of the Software, and to permit persons to whom the Software is
% furnished to do so, subject to the following conditions:
% The above copyright notice and this permission notice shall be included in
% all copies or substantial portions of the Software.
% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
% IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
% FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
% AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
% LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
% OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
% THE SOFTWARE.
\definecolor{solarizedBase03}{HTML}{002B36}
\definecolor{solarizedBase02}{HTML}{073642}
\definecolor{solarizedBase01}{HTML}{586e75}
\definecolor{solarizedBase00}{HTML}{657b83}
\definecolor{solarizedBase0}{HTML}{839496}
\definecolor{solarizedBase1}{HTML}{93a1a1}
\definecolor{solarizedBase2}{HTML}{EEE8D5}
\definecolor{solarizedBase3}{HTML}{FDF6E3}
\definecolor{solarizedYellow}{HTML}{B58900}
\definecolor{solarizedOrange}{HTML}{CB4B16}
\definecolor{solarizedRed}{HTML}{DC322F}
\definecolor{solarizedMagenta}{HTML}{D33682}
\definecolor{solarizedViolet}{HTML}{6C71C4}
\definecolor{solarizedBlue}{HTML}{268BD2}
\definecolor{solarizedCyan}{HTML}{2AA198}
\definecolor{solarizedGreen}{HTML}{859900}

112
src/topology.tikz Normal file
View File

@ -0,0 +1,112 @@
%% 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{
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
};
}

View File

@ -29,29 +29,27 @@
\tikzset{ \tikzset{
pics/train_berth_shape/.style n args={1}{ pics/train_berth_shape/.style n args={1}{
code={ 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,densely 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 \path[draw,line width=0.75pt,densely dotted] (0,-0.25) -- (0,-0.35) -- (#1,-0.35) -- ++(0, 0.1); % berth shape
} }
}, },
pics/train_berth_shape/.default=4, pics/train_berth_shape/.default=4,
} }
\tikzset{ \tikzset{
pics/platform_left/.style n args={1}{ pics/train_berth_shape_forward/.style n args={1}{
code={ code={
\path[draw, line width=0.75pt] (0,0.5) -- ++(0,-0.3) -- ++(#1,0) -- ++(0,0.3); \path[draw,line width=0.75pt,densely dotted] (0,-0.25) -- (0,-0.35) -- (#1,-0.35) -- ++(0, 0.1); % berth shape
\path[draw, line width=0.75pt] (0,0.3) -- ++(#1,0);
} }
}, },
pics/platform_left/.default=4, pics/train_berth_shape/.default=4,
} }
\tikzset{ \tikzset{
pics/platform_right/.style n args={1}{ pics/train_berth_shape_backward/.style n args={1}{
code={ code={
\path[draw, line width=0.75pt] (0,-0.5) -- ++(0,0.3) -- ++(#1,0) -- ++(0,-0.3); \path[draw,line width=0.75pt,densely dotted] (0, 0.25) -- (0, 0.35) -- (#1, 0.35) -- ++(0,-0.1); % berth shape
\path[draw, line width=0.75pt] (0,-0.3) -- ++(#1,0);
} }
}, },
pics/platform_right/.default=4, pics/train_berth_shape/.default=4,
} }
\tikzset{ \tikzset{
view_point_forward/.pic={ view_point_forward/.pic={
@ -82,7 +80,7 @@
\node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator \node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/distant_signal_forward/.default=,
} }
\tikzset{ \tikzset{
pics/distant_signal_backward/.style args={#1}{ pics/distant_signal_backward/.style args={#1}{
@ -92,7 +90,7 @@
\node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator \node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/distant_signal_backward/.default=,
} }
\tikzset{ \tikzset{
pics/speed_signal_forward/.style args={#1}{ pics/speed_signal_forward/.style args={#1}{
@ -102,7 +100,7 @@
\node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator \node[rotate=-90,font=\sffamily] at (0.9,-0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/speed_signal_forward/.default=,
} }
\tikzset{ \tikzset{
pics/speed_signal_backward/.style args={#1}{ pics/speed_signal_backward/.style args={#1}{
@ -112,7 +110,7 @@
\node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator \node[rotate=90,font=\sffamily] at (-0.9,0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/speed_signal_backward/.default=,
} }
\tikzset{ \tikzset{
pics/block_signal_forward/.style args={#1}{ pics/block_signal_forward/.style args={#1}{
@ -122,7 +120,7 @@
\node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator \node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/block_signal_forward/.default=,
} }
\tikzset{ \tikzset{
pics/block_signal_backward/.style args={#1}{ pics/block_signal_backward/.style args={#1}{
@ -132,7 +130,7 @@
\node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator \node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/block_signal_backward/.default=,
} }
\tikzset{ \tikzset{
pics/route_signal_forward/.style args={#1}{ pics/route_signal_forward/.style args={#1}{
@ -142,7 +140,7 @@
\node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator \node[rotate=-90,font=\sffamily] at (1.2,-0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/route_signal_forward/.default=,
} }
\tikzset{ \tikzset{
pics/route_signal_backward/.style args={#1}{ pics/route_signal_backward/.style args={#1}{
@ -152,7 +150,7 @@
\node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator \node[rotate=90,font=\sffamily] at (-1.2,0.4) {#1}; % speed indicator
} }
}, },
pics/node/.default=, pics/route_signal_backward/.default=,
} }
\tikzset{ \tikzset{
shunt_signal_forward/.pic={ shunt_signal_forward/.pic={
@ -180,26 +178,26 @@
} }
\tikzset{ \tikzset{
block_end_marker_forward/.pic={ block_end_marker_forward/.pic={
\path[draw, line width=1pt] (0,0) -- ++(0,-0.4); % marker \path[draw, line width=1pt] (0,0) -- ++(0,-0.5); % marker
\path[draw, line width=1pt] (0,-0.4) -- ++(-0.1,-0.1) -- ++(0.1,-0.1) -- ++(0.1,0.1) -- cycle; % sign \path[draw, line width=1pt] (-0.1,-0.7) rectangle ++(0.2,0.2); % sign
}; };
} }
\tikzset{ \tikzset{
block_end_marker_backward/.pic={ block_end_marker_backward/.pic={
\path[draw, line width=1pt] (0,0) -- ++(0,0.4); % marker \path[draw, line width=1pt] (0,0) -- ++(0,0.5); % marker
\path[draw, line width=1pt] (0,0.4) -- ++(0.1,0.1) -- ++(-0.1,0.1) -- ++(-0.1,-0.1) -- cycle; % sign \path[draw, line width=1pt] (0.1,0.7) rectangle ++(-0.2,-0.2); % sign
}; };
} }
\tikzset{ \tikzset{
block_clearing_point_forward/.pic={ block_clearing_point_forward/.pic={
\path[draw, line width=1pt] (0,0.1) -- ++(0,-0.2); % marker \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 \path[draw, line width=1pt] (0,-0.1) -- ++(-0.1,-0.1) -- ++(0.1,-0.1) -- ++(0.1,0.1) -- cycle; % sign
}; };
} }
\tikzset{ \tikzset{
block_clearing_point_backward/.pic={ block_clearing_point_backward/.pic={
\path[draw, line width=1pt] (0,-0.1) -- ++(0,0.2); % marker \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 \path[draw, line width=1pt] (0,0.1) -- ++(0.1,0.1) -- ++(-0.1,0.1) -- ++(-0.1,-0.1) -- cycle; % sign
}; };
} }
\tikzset{ \tikzset{
@ -221,156 +219,74 @@
}; };
} }
\tikzset{ \tikzset{
pics/turnout_left_forward/.style args={#1}{ pics/transmitter_below/.style args={#1}{
code={ code={
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(0.4,0.4) -- ++(0,-0.4); % turnout marker \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,-0.25); % turnout marker
} }
}, },
pics/turnout_left_forward/.default=black, pics/transmitter_below/.default=white,
} }
\tikzset{ \tikzset{
pics/turnout_left_backward/.style args={#1}{ pics/transmitter_below_forward/.style args={#1}{
code={ code={
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(-0.4,-0.4) -- ++(0,0.4); % turnout marker \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,-0.25); % turnout marker
\path[draw] (0.1,-0.05) -- (0.2,-0.125) -- (0.1,-0.2) -- cycle;
} }
}, },
pics/turnout_left_forward/.default=black, pics/transmitter_below_forward/.default=white,
} }
\tikzset{ \tikzset{
pics/turnout_right_forward/.style args={#1}{ pics/transmitter_below_backward/.style args={#1}{
code={ code={
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(0.4,-0.4) -- ++(0,0.4); % turnout marker \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,-0.25); % turnout marker
\path[draw] (-0.1,-0.05) -- (-0.2,-0.125) -- (-0.1,-0.2) -- cycle;
} }
}, },
pics/turnout_left_forward/.default=black, pics/transmitter_below_backward/.default=white,
} }
\tikzset{ \tikzset{
pics/turnout_right_backward/.style args={#1}{ pics/transmitter_below_bidirectional/.style args={#1}{
code={ code={
\path[draw,line width=1pt,fill=#1] (0,0) -- ++(-0.4,0.4) -- ++(0,-0.4); % turnout marker \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,-0.25); % turnout marker
\path[draw] ( 0.1,-0.05) -- ( 0.2,-0.125) -- ( 0.1,-0.2) -- cycle;
\path[draw] (-0.1,-0.05) -- (-0.2,-0.125) -- (-0.1,-0.2) -- cycle;
} }
}, },
pics/turnout_left_forward/.default=black, pics/transmitter_below_bidirectional/.default=white,
} }
\tikzset{ \tikzset{
fouling_point_right_backward/.pic={ pics/transmitter_above/.style args={#1}{
\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={ code={
\path[draw, line width=0.75pt] (-0.1,0.48) -- ++(0.08,-0.08) -- ++(#1,0) -- ++(0.08,0.08); \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,0.25); % turnout marker
} }
}, },
pics/bridge_left/.default=3, pics/transmitter_above/.default=white,
} }
\tikzset{ \tikzset{
pics/bridge_right/.style n args={1}{ pics/transmitter_above_forward/.style args={#1}{
code={ code={
\path[draw, line width=0.75pt] (-0.1,-0.48) -- ++(0.08,0.08) -- ++(#1,0) -- ++(0.08,-0.08); \path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,0.25); % turnout marker
\path[draw] (0.1,0.05) -- (0.2,0.125) -- (0.1,0.2) -- cycle;
} }
}, },
pics/bridge_right/.default=3, pics/transmitter_above_forward/.default=white,
} }
\tikzset{
pics/transmitter_above_backward/.style args={#1}{
code={
\path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,0.25); % turnout marker
\path[draw] (-0.1,0.05) -- (-0.2,0.125) -- (-0.1,0.2) -- cycle;
}
},
pics/transmitter_above_backward/.default=white,
}
\tikzset{
pics/transmitter_above_bidirectional/.style args={#1}{
code={
\path[draw,line width=1pt,fill=#1] (-0.25,0) rectangle (0.25,0.25); % turnout marker
\path[draw] ( 0.1,0.05) -- ( 0.2,0.125) -- ( 0.1,0.2) -- cycle;
\path[draw] (-0.1,0.05) -- (-0.2,0.125) -- (-0.1,0.2) -- cycle;
}
},
pics/transmitter_above_bidirectional/.default=white,
}

View File

@ -5,46 +5,46 @@
% 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. % 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{ \tikzset{
pics/train/.style n args={1}{ pics/train/.style args={#1}{
code={ code={
\path[draw, line width=1pt, fill=white] (0,-0.3) -- ++(#1,0) -- ++(0,0.6) -- ++(-#1,0) -- cycle; % train shape \path[draw, line width=1pt, fill=white] (0,-0.3) -- ++(#1,0) -- ++(0,0.6) -- ++(-#1,0) -- cycle; % train shape
% \node at (-2,0) {\emph{#1}}; %label of train % \node at (-2,0) {\emph{#2}}; %label of train
} }
}, },
pics/train/.default=4, pics/train/.default=4,
} }
\tikzset{ \tikzset{
pics/train_moving_forward/.style n args={1}{ pics/train_moving_forward/.style args={#1}{
code={ code={
\path[draw, line width=1pt, fill=white] (0,0) -- +(-0.3,0.3) -- +(-#1,0.3) -- +(-#1,-0.3) -- +(-0.3,-0.3) -- cycle; % train shape \path[draw, line width=1pt, fill=white] (0,0) -- +(-0.3,0.3) -- +(-#1,0.3) -- +(-#1,-0.3) -- +(-0.3,-0.3) -- cycle; % train shape
% \node at (-2,0) {\emph{#1}}; %label of train % \node at (-2,0) {\emph{#2}}; %label of train
} }
}, },
pics/train_moving_forward/.default=4, pics/train_moving_forward/.default=4,
} }
\tikzset{ \tikzset{
pics/train_moving_backward/.style n args={1}{ pics/train_moving_backward/.style args={#1}{
code={ code={
\path[draw, line width=1pt, fill=white] (0,0) -- +(0.3,-0.3) -- +(#1,-0.3) -- +(#1,0.3) -- +(0.3,0.3) -- cycle; % train shape \path[draw, line width=1pt, fill=white] (0,0) -- +(0.3,-0.3) -- +(#1,-0.3) -- +(#1,0.3) -- +(0.3,0.3) -- cycle; % train shape
% \node at (-2,0) {\emph{#1}}; %label of train % \node at (-2,0) {\emph{#2}}; %label of train
} }
}, },
pics/train_moving_backward/.default=4, pics/train_moving_backward/.default=4,
} }
\tikzset{ \tikzset{
pics/ghost_train_moving_forward/.style n args={1}{ pics/ghost_train_moving_forward/.style args={#1}{
code={ code={
\path[draw, line width=1pt, dashed] (0,0) -- +(-0.3,0.3) -- +(-#1,0.3) -- +(-#1,-0.3) -- +(-0.3,-0.3) -- cycle; % train shape \path[draw, line width=1pt, dashed] (0,0) -- +(-0.3,0.3) -- +(-#1,0.3) -- +(-#1,-0.3) -- +(-0.3,-0.3) -- cycle; % train shape
% \node at (-2,0) {\emph{#1}}; %label of train % \node at (-2,0) {\emph{#2}}; %label of train
} }
}, },
pics/ghost_train_moving_forward/.default=4, pics/ghost_train_moving_forward/.default=4,
} }
\tikzset{ \tikzset{
pics/ghost_train_moving_backward/.style n args={1}{ pics/ghost_train_moving_backward/.style args={#1}{
code={ code={
\path[draw, line width=1pt, dashed] (0,0) -- +(0.3,-0.3) -- +(#1,-0.3) -- +(#1,0.3) -- +(0.3,0.3) -- cycle; % train shape \path[draw, line width=1pt, dashed] (0,0) -- +(0.3,-0.3) -- +(#1,-0.3) -- +(#1,0.3) -- +(0.3,0.3) -- cycle; % train shape
% \node at (-2,0) {\emph{#1}}; %label of train % \node at (-2,0) {\emph{#2}}; %label of train
} }
}, },
pics/ghost_train_moving_backward/.default=4, pics/ghost_train_moving_backward/.default=4,