handeling color background and foreground with native xcolor alias "\colorlet{}{}" instead of pgf macro

master
Martin Scheidt 2022-06-01 14:32:52 +02:00
parent 4e9f5ea052
commit 1c41e85629
18 changed files with 212 additions and 238 deletions

View File

@ -1,4 +1,5 @@
# Changelog # Changelog
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
@ -8,10 +9,18 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
## [Unreleased] ## [Unreleased]
### Added ### Todo
* i18n option * i18n option
## Version [0.7.1] - 2022-06-02
### Changed
* handeling color background and foreground with native xcolor alias "\colorlet{}{}" instead of pgf macro
## Version [0.7.0] - 2022-04-02 ## Version [0.7.0] - 2022-04-02
### Added ### Added
@ -31,6 +40,7 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
* foreground of sidetrack (alias) * foreground of sidetrack (alias)
* PackageWarning Error in development mode * PackageWarning Error in development mode
## Version [0.6.3] - 2022-02-15 ## Version [0.6.3] - 2022-02-15
### Added ### Added
@ -149,7 +159,8 @@ Categories: Added, Changed, Deprecated, Removed, Fixed, and Security.
Basic concept of a library with railway topology symbols and some examples. Basic concept of a library with railway topology symbols and some examples.
[Unreleased]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.0...master [Unreleased]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.1...master
[0.7.1]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.7.0...v0.7.1
[0.7.0]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.3...v0.7.0 [0.7.0]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.3...v0.7.0
[0.6.3]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.2...v0.6.3 [0.6.3]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.2...v0.6.3
[0.6.2]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.1...v0.6.2 [0.6.2]: https://github.com/railtoolkit/tikz-trackschematic/compare/v0.6.1...v0.6.2

View File

@ -9,7 +9,7 @@
\begin{document} \begin{document}
\begin{tikzpicture}[font=\sffamily] \begin{tikzpicture}[font=\sffamily]
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau}; \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}}; \node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt}; \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -9,7 +9,7 @@
\begin{document} \begin{document}
\begin{tikzpicture}[font=\sffamily] \begin{tikzpicture}[font=\sffamily]
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 5,1.3) {to and from\\ Berg}; \node[right,align=left] at ( 5,1.3) {to and from\\ Berg};
\node at (21,3.9) {{\LARGE Bf Chamstadt}}; \node at (21,3.9) {{\LARGE Bf Chamstadt}};
\node[left,align=right] at (37.5,1.3) {to and from\\ Dornroda}; \node[left,align=right] at (37.5,1.3) {to and from\\ Dornroda};

Binary file not shown.

View File

@ -262,8 +262,8 @@
\subsection{Colors: background and foreground}\label{sec:colors} \subsection{Colors: background and foreground}\label{sec:colors}
The two main colors \texttt{white} and \texttt{black} are set for the \texttt{background} and \texttt{foreground} keys by default. The two main colors \texttt{background} and \texttt{foreground} are set as an alias to \texttt{white} and \texttt{black} by default.
If you want to change them, provide a new value for the keys. If you want to change them, override them by defining a new alias.
For example like this:\\ For example like this:\\
\begin{minipage}[c]{0.65\textwidth} \begin{minipage}[c]{0.65\textwidth}
\begin{lstlisting}[gobble=8] \begin{lstlisting}[gobble=8]
@ -271,12 +271,13 @@
% load the library % load the library
\usepackage{tikz-trackschematic} \usepackage{tikz-trackschematic}
% set the colors
\colorlet{background}{lightgray}
\colorlet{foreground}{violet}
\begin{document} \begin{document}
\begin{tikzpicture} \begin{tikzpicture}
% set the colors
\tikzset{background=lightgray,foreground=violet}
\maintrack (0,0) -- (6,0); \maintrack (0,0) -- (6,0);
\train[forward] at (5,0) label (grey train); \train[forward] at (5,0) label (grey train);
\end{tikzpicture} \end{tikzpicture}
@ -286,7 +287,8 @@
\hfil \hfil
\begin{minipage}[c]{0.34\textwidth} \begin{minipage}[c]{0.34\textwidth}
\begin{tikzpicture} \begin{tikzpicture}
\tikzset{background=lightgray,foreground=violet} \colorlet{background}{lightgray}
\colorlet{foreground}{violet}
\path (-0.2,-1.6) rectangle (5.2,1.6); \path (-0.2,-1.6) rectangle (5.2,1.6);
\coordinate (A) at (0 ,0); \coordinate (A) at (0 ,0);
\coordinate (T) at (4.5,0); \coordinate (T) at (4.5,0);

View File

@ -39,4 +39,7 @@
\vhEntry{0.7.0}{2022-04-02}{MS|GW}{ \vhEntry{0.7.0}{2022-04-02}{MS|GW}{
revised symbol and syntax for balises; replaced "\textbackslash gettikzxy" with "\textbackslash path let" syntax; fixed PackageWarning Error in development mode; fixed foreground of sidetrack (alias) revised symbol and syntax for balises; replaced "\textbackslash gettikzxy" with "\textbackslash path let" syntax; fixed PackageWarning Error in development mode; fixed foreground of sidetrack (alias)
} }
\vhEntry{0.7.1}{2022-06-02}{MS}{
handeling color background and foreground with native xcolor alias "\textbackslash colorlet{}{}" instead of pgf macro
}
\end{versionhistory} \end{versionhistory}

View File

@ -15,6 +15,9 @@
\DeclareOptionX{dev}[\settoggle{development}{false}]{\settoggle{development}{true}} \DeclareOptionX{dev}[\settoggle{development}{false}]{\settoggle{development}{true}}
\ProcessOptionsX \ProcessOptionsX
% %
% colors
\colorlet{background}{white}
\colorlet{foreground}{black}
\iftoggle{development}{% \iftoggle{development}{%
\PackageInfo{tikz-trackschematic}{development mode}% \PackageInfo{tikz-trackschematic}{development mode}%

View File

@ -7,6 +7,9 @@
\ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}% \ProvidesFileRCS{tikzlibrarytrackschematic.code.tex}%
% %
\RequirePackage{tikz,etoolbox}% \RequirePackage{tikz,etoolbox}%
% colors
\colorlet{background}{white}
\colorlet{foreground}{black}
% %
%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%
% loading sublibraries % loading sublibraries

View File

@ -23,14 +23,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% length %% length
length/.store in=\objectlength,% default length 4cm length/.store in=\objectlength,% default length 4cm
/tikz/length/.forward to=/tikz/trackschematic/length,% /tikz/length/.forward to=/tikz/trackschematic/length,%
@ -84,7 +76,7 @@
}% }%
}% end \ifdefstring{\side} }% end \ifdefstring{\side}
%% platform shape %% platform shape
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};% \tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
\ifdefstring{\side}{both}{% double side \ifdefstring{\side}{both}{% double side
\path ($-0.5*(\objectlength,0) + (0, \objectwidth)$) --% \path ($-0.5*(\objectlength,0) + (0, \objectwidth)$) --%
($-0.5*(\objectlength,0) + (0, 0.2)$) --% ($-0.5*(\objectlength,0) + (0, 0.2)$) --%
@ -159,7 +151,7 @@
}% }%
}% end \ifdefstring{\trafficpractice} }% end \ifdefstring{\trafficpractice}
%% symbol %% symbol
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
\iftoggle{show_road}{% true \iftoggle{show_road}{% true
\path ($0.5*(-\roadwidth,0) + (0,-0.1)$) --% \path ($0.5*(-\roadwidth,0) + (0,-0.1)$) --%
++($(0,-\objectwidth)$);% road part 1 ++($(0,-\objectwidth)$);% road part 1
@ -172,18 +164,18 @@
}{}% END \iftoggle{show_road} }{}% END \iftoggle{show_road}
\ifdefstring{\barrier}{full}{% full barrier \ifdefstring{\barrier}{full}{% full barrier
\ifdefstring{\side}{both}{% \ifdefstring{\side}{both}{%
\filldraw[\foreground]% left barrier part 1 \filldraw[foreground]% left barrier part 1
($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);% ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);%
\filldraw[\foreground]% left barrier part 2 \filldraw[foreground]% left barrier part 2
($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);% ($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);%
\path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --% \path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --%
++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3 ++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) --% \path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4 ++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4
% %
\filldraw[\foreground]% right barrier part 1 \filldraw[foreground]% right barrier part 1
($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);% ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);%
\filldraw[\foreground]% right barrier part 2 \filldraw[foreground]% right barrier part 2
($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);% ($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --% \path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3 ++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3
@ -191,9 +183,9 @@
++($( 0.45\roadwidth,0)+( 0.2,0)$);% right barrier part 4 ++($( 0.45\roadwidth,0)+( 0.2,0)$);% right barrier part 4
}{% }{%
\ifdefstring{\side}{left}{% \ifdefstring{\side}{left}{%
\filldraw[\foreground]% left barrier part 1 \filldraw[foreground]% left barrier part 1
($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);% ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) circle (0.05);%
\filldraw[\foreground]% left barrier part 2 \filldraw[foreground]% left barrier part 2
($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);% ($( 0.5\roadwidth,0)+( 0.2,0)+(0,0.35)$) circle (0.05);%
\path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --% \path ($(-0.5\roadwidth,0)+(-0.2,0)+(0,0.35)$) --%
++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3 ++($( 0.45\roadwidth,0)+( 0.2,0)$);% left barrier part 3
@ -201,9 +193,9 @@
++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4 ++($(-0.45\roadwidth,0)+(-0.2,0)$);% left barrier part 4
}{% }{%
\ifdefstring{\side}{right}{% \ifdefstring{\side}{right}{%
\filldraw[\foreground]% right barrier part 1 \filldraw[foreground]% right barrier part 1
($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);% ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) circle (0.05);%
\filldraw[\foreground]% right barrier part 2 \filldraw[foreground]% right barrier part 2
($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);% ($(-0.5\roadwidth,0)+(-0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --% \path ($( 0.5\roadwidth,0)+( 0.2,0)+(0,-0.35)$) --%
++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3 ++($(-0.45\roadwidth,0)+(-0.2,0)$);% right barrier part 3
@ -217,24 +209,24 @@
}{% }{%
\ifdefstring{\barrier}{semi}{% semi barrier \ifdefstring{\barrier}{semi}{% semi barrier
\ifdefstring{\side}{both}{% \ifdefstring{\side}{both}{%
\filldraw[\foreground]% left barrier part 1 \filldraw[foreground]% left barrier part 1
($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);% ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);%
\path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --% \path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --%
++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2 ++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2
% %
\filldraw[\foreground]% right barrier part 1 \filldraw[foreground]% right barrier part 1
($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);% ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --% \path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --%
++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2 ++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2
}{% }{%
\ifdefstring{\side}{left}{% \ifdefstring{\side}{left}{%
\filldraw[\foreground]% left barrier part 1 \filldraw[foreground]% left barrier part 1
($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);% ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) circle (0.05);%
\path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --% \path ($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)+(0,0.35)$) --%
++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2 ++($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)$);% left barrier part 2
}{% }{%
\ifdefstring{\side}{right}{% \ifdefstring{\side}{right}{%
\filldraw[\foreground]% right barrier part 1 \filldraw[foreground]% right barrier part 1
($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);% ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) circle (0.05);%
\path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --% \path ($\trafficfactor*(0.5\roadwidth,0)+\trafficfactor*(0.2,0)+(0,-0.35)$) --%
++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2 ++($\trafficfactor*(-0.5\roadwidth,0)+\trafficfactor*(-0.2,0)$);% right barrier part 2
@ -292,11 +284,11 @@
\def\coordcommand{#1} % beware of leading and tailing spaces! \def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol %% symbol
\iftoggle{show_background}{% true \iftoggle{show_background}{% true
\fill[\background]% \fill[background]%
($(-0.5\objectlength,\objectwidth)+(0,-0.1)$) rectangle% ($(-0.5\objectlength,\objectwidth)+(0,-0.1)$) rectangle%
($(0.5\objectlength,-\objectwidth)+(0,0.1)$);% ($(0.5\objectlength,-\objectwidth)+(0,0.1)$);%
}{}% }{}%
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};% \tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
\ifdefstring{\side}{both}{% \ifdefstring{\side}{both}{%
\path ($-0.5*(\objectlength,0)+(-0.1,0)+(\shiftleft,\objectwidth)$) --% \path ($-0.5*(\objectlength,0)+(-0.1,0)+(\shiftleft,\objectwidth)$) --%
++($(0.1,-0.1)$) --% ++($(0.1,-0.1)$) --%
@ -352,10 +344,10 @@
%% settings %% settings
\def\coordcommand{#1} % beware of leading and tailing spaces! \def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol %% symbol
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
\path (-0.6,-0.4 ) rectangle ++(1.2,0.8); % building \path (-0.6,-0.4 ) rectangle ++(1.2,0.8); % building
\path[fill=\foreground] (-0.5,-0.3 ) rectangle ++(1.0,0.2); % table \path[fill=foreground] (-0.5,-0.3 ) rectangle ++(1.0,0.2); % table
\path[fill=\foreground] ( 0 , 0.15) circle (0.15); % human dot \path[fill=foreground] ( 0 , 0.15) circle (0.15); % human dot
}},% END pics/interlocking/.style args={#1} }},% END pics/interlocking/.style args={#1}
% symbology entry % symbology entry
symbology_interlocking/.pic = { symbology_interlocking/.pic = {
@ -384,7 +376,7 @@
%% settings %% settings
\def\coordcommand{#1} % beware of leading and tailing spaces! \def\coordcommand{#1} % beware of leading and tailing spaces!
%% symbol %% symbol
\tikzset{every path/.style={draw=\foreground,line width=0.75pt}};% \tikzset{every path/.style={draw=foreground,line width=0.75pt}};%
% left side % left side
\path (-0.3, 0.1) -- ++(0,0.05); \path (-0.3, 0.1) -- ++(0,0.05);
\path (-0.2, 0.1) -- ++(0,0.15); \path (-0.2, 0.1) -- ++(0,0.15);
@ -439,7 +431,7 @@
}% }%
}% end \ifdefstring{\side} }% end \ifdefstring{\side}
%% pylon shape %% pylon shape
\tikzset{every path/.style={draw=\foreground,line width=0.5pt}};% \tikzset{every path/.style={draw=foreground,line width=0.5pt}};%
\ifdefstring{\side}{both}{% double side \ifdefstring{\side}{both}{% double side
\path (0,-0.5) circle [radius=0.075];% part 1 \path (0,-0.5) circle [radius=0.075];% part 1
\path (0, 0.5) circle [radius=0.075];% part 2 \path (0, 0.5) circle [radius=0.075];% part 2

View File

@ -19,14 +19,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face %% face
face/.value required,% forward, backward OR bidirectional face/.value required,% forward, backward OR bidirectional
face/.store in=\face,% forward, backward OR bidirectional face/.store in=\face,% forward, backward OR bidirectional
@ -99,20 +91,20 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.45,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.45,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)% ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.45,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.45,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.1,0)$);% symbol ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.1,0)$);% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -171,14 +163,14 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.5,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.5,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)% ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.5,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.5,0)$) rectangle%
@ -186,7 +178,7 @@
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.3,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.3,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol ++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -245,23 +237,23 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.475,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.475,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.11,0)$)% ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.11,0)$)%
($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.475,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.475,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.11,0)$);% symbol part1 ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.11,0)$);% symbol part1
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.325,0)$) rectangle% ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.325,0)$) rectangle%
++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol part2 ++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol part2
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -320,14 +312,14 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.23) + \facefactor*( 0.35,0)$) --% ($\trafficfactor*\facefactor*(0,-0.23) + \facefactor*( 0.35,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.2)$) -- ++($\facefactor*(-0.05,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.2)$) -- ++($\facefactor*(-0.05,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.15)$) -- cycle% ++($\trafficfactor*\facefactor*(0, 0.15)$) -- cycle%
@ -335,7 +327,7 @@
++($\trafficfactor*\facefactor*(0, 0.2)$) -- ++($\facefactor*(0.05,0)$) --% ++($\trafficfactor*\facefactor*(0, 0.2)$) -- ++($\facefactor*(0.05,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15)$) -- cycle;% symbol ++($\trafficfactor*\facefactor*(0,-0.15)$) -- cycle;% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -395,14 +387,14 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.18) + \facefactor*( 0.4 ,0)$) --% ($\trafficfactor*\facefactor*(0,-0.18) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*( 0.03,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*( 0.03,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.38)$) --% ++($\trafficfactor*\facefactor*(0,-0.38)$) --%
@ -410,7 +402,7 @@
++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*(-0.03,0)$) --% ++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*(-0.03,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.38)$) -- cycle;% symbol ++($\trafficfactor*\facefactor*(0, 0.38)$) -- cycle;% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -470,14 +462,14 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.4 ) + \facefactor*( 0.62,0)$) --% ($\trafficfactor*\facefactor*(0,-0.4 ) + \facefactor*( 0.62,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*(-0.03,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*(-0.03,0)$) --%
++($\facefactor*(-0.38,0)$) --% ++($\facefactor*(-0.38,0)$) --%
@ -485,7 +477,7 @@
++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*( 0.03,0)$) --% ++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*( 0.03,0)$) --%
++($\facefactor*( 0.38,0)$) -- cycle;% symbol ++($\facefactor*( 0.38,0)$) -- cycle;% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -545,14 +537,14 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
% %
%% signal pole %% signal pole
\path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole \path[draw=foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole
%% signal marker %% signal marker
\path[draw=\foreground,line width=0.1pt,double=\background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]% \path[draw=foreground,line width=0.1pt,double=background,double distance=0.5pt,fill=\signalcolor,rounded corners=0.1pt]%
($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --% ($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.4,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*(-0.25,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.25) + \facefactor*( 0.25,0)$) -- cycle;% sign
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.4 ,0)$) --% ($\trafficfactor*\facefactor*(0,-0.25) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(-0.15,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(-0.15,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.15,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*( 0.15,0)$) --%
@ -562,13 +554,13 @@
++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*(-0.1 ,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*(-0.1 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*( 0.1 ,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.1 ) + \facefactor*( 0.1 ,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.1 ) + \facefactor*( 0.1 ,0)$) -- cycle;% symbol ++($\trafficfactor*\facefactor*(0, 0.1 ) + \facefactor*( 0.1 ,0)$) -- cycle;% symbol
\path[fill=\background]% \path[fill=background]%
($\trafficfactor*\facefactor*(0,-0.35) + \facefactor*( 0.4 ,0)$) --% ($\trafficfactor*\facefactor*(0,-0.35) + \facefactor*( 0.4 ,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.05,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.05,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*( 0.05,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*( 0.05,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*( 0.05,0)$) -- cycle;% symbol ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*( 0.05,0)$) -- cycle;% symbol
%% label %% label
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default

View File

@ -23,14 +23,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face %% face
face/.value required,% forward, backward OR bidirectional face/.value required,% forward, backward OR bidirectional
face/.store in=\face,% forward, backward OR bidirectional face/.store in=\face,% forward, backward OR bidirectional
@ -59,7 +51,7 @@
/tikz/trackschematic/measures/.cd,% /tikz/trackschematic/measures/.cd,%
%% color hectometer %% color hectometer
color/.store in=\hectometercolor,% color/.store in=\hectometercolor,%
color=\foreground!50!\background,% DEFAULT color=foreground!50!background,% DEFAULT
/tikz/hectometer color/.forward to=/tikz/trackschematic/measures/color,% /tikz/hectometer color/.forward to=/tikz/trackschematic/measures/color,%
}% }%
%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%
@ -104,7 +96,7 @@
}% }%
}% end \ifdefstring{\trafficpractice} }% end \ifdefstring{\trafficpractice}
% %
\tikzset{every path/.style={draw=\foreground,line width=0.75pt,line cap=round,dash pattern=on 0pt off 2.4\pgflinewidth}};% \tikzset{every path/.style={draw=foreground,line width=0.75pt,line cap=round,dash pattern=on 0pt off 2.4\pgflinewidth}};%
\path% berth shape forward \path% berth shape forward
($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --% ($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)% ($-0.5*(\objectlength,0) + (-0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
@ -112,10 +104,10 @@
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)% ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --% ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward
\path[draw=none,fill=\foreground]% arrow front \path[draw=none,fill=foreground]% arrow front
($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --% ($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow ++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\path[draw=none,fill=\foreground]% arrow back \path[draw=none,fill=foreground]% arrow back
($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --% ($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow ++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\ifdefstring{\face}{bidirectional}{% bidirectional \ifdefstring{\face}{bidirectional}{% bidirectional
@ -127,19 +119,19 @@
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)% ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$)%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --% ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.25)$) --%
($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward ($ 0.5*(\objectlength,0) + ( 0.05,0) + \trafficfactor*\facefactor*(0,-0.35)$);% berth shape forward
\path[draw=none,fill=\foreground]% arrow front \path[draw=none,fill=foreground]% arrow front
($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --% ($\facefactor*0.5*(\objectlength,0) + \facefactor*(-0.1,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow ++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
\path[draw=none,fill=\foreground]% arrow back \path[draw=none,fill=foreground]% arrow back
($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --% ($\facefactor*-0.5*(\objectlength,0) + \facefactor*(0.2,0) + \trafficfactor*\facefactor*(0,-0.35)$) --%
++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow ++($(0,-0.04) + \facefactor*(-0.1,0)$) -- ++(0,0.08) -- cycle;% arrow
}{}% }{}%
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\node[fill=\background,text=\foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};% \node[fill=background,text=foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
\ifdefstring{\face}{bidirectional}{% bidirectional \ifdefstring{\face}{bidirectional}{% bidirectional
\pgfmathsetmacro{\facefactor}{1}% \pgfmathsetmacro{\facefactor}{1}%
\node[fill=\background,text=\foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};% \node[fill=background,text=foreground,inner sep=1pt] at ($\facefactor*(0,-0.35)$) {\tiny \labelcontent};%
}{}% }{}%
}% }%
}},% END pics/train_berth/.style args={#1/#2/#3} }},% END pics/train_berth/.style args={#1/#2/#3}
@ -157,8 +149,8 @@
%% command %% command
\newcommand\trackdistance{}% just for safety \newcommand\trackdistance{}% just for safety
\def\trackdistance#1(#2)#3(#4)#5(#6){% \trackdistance between (coord1) and (coord2) distance (distance); \def\trackdistance#1(#2)#3(#4)#5(#6){% \trackdistance between (coord1) and (coord2) distance (distance);
\path[draw=\background,<->,>={Stealth[\foreground,inset=0pt,angle=50:0.2cm]},shorten <=1pt,shorten >=1pt] (#2) -- (#4)% arrow tips \path[draw=background,<->,>={Stealth[foreground,inset=0pt,angle=50:0.2cm]},shorten <=1pt,shorten >=1pt] (#2) -- (#4)% arrow tips
node[hectometer base=(current bounding box.center),text=\foreground,midway,sloped,rotate=90] {#6};% label node[hectometer base=(current bounding box.center),text=foreground,midway,sloped,rotate=90] {#6};% label
}% }%
% symbology entry % symbology entry
\tikzset{% \tikzset{%
@ -230,7 +222,7 @@
(0,0) -- (ts-hm-b1) -- (ts-hm-b2) -- (ts-hm-l);% (0,0) -- (ts-hm-b1) -- (ts-hm-b2) -- (ts-hm-l);%
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\node[font=\sffamily,text=\hectometercolor,rotate=-90,\orientation,align=\align,fill=\background] at (ts-hm-l) {\labelcontent};% \node[font=\sffamily,text=\hectometercolor,rotate=-90,\orientation,align=\align,fill=background] at (ts-hm-l) {\labelcontent};%
}% }%
}},% END }},% END
% symbology entry % symbology entry

View File

@ -18,14 +18,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face %% face
face/.value required,% forward OR backward face/.value required,% forward OR backward
face/.store in=\face,% face/.store in=\face,%
@ -67,11 +59,11 @@
% %
% commands % commands
\newcommand\maintrack{}% just for safety \newcommand\maintrack{}% just for safety
\def\maintrack{\path[draw=\foreground,MainTrack]}% \maintrack (coord1) -- (coord2); \def\maintrack{\path[draw=foreground,MainTrack]}% \maintrack (coord1) -- (coord2);
\newcommand\secondarytrack{}% just for safety \newcommand\secondarytrack{}% just for safety
\def\secondarytrack{\path[draw=\foreground,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2); \def\secondarytrack{\path[draw=foreground,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2);
\newcommand\sidetrack{}% just for safety \newcommand\sidetrack{}% just for safety
\def\sidetrack{\path[draw=\foreground,SecondaryTrack]}% alias for \secondarytrack \def\sidetrack{\path[draw=foreground,SecondaryTrack]}% alias for \secondarytrack
% %
%% symbol definition %% symbol definition
\tikzset{% \tikzset{%
@ -109,7 +101,7 @@
\def\labelcontent{#3} \def\labelcontent{#3}
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={fill=\background,text=\foreground}};% \tikzset{every node/.style={fill=background,text=foreground}};%
\coordinate (ts-tl-l) at (0,0);% \coordinate (ts-tl-l) at (0,0);%
\ifdefstring{\labelcoord}{(none)}{% default coord \ifdefstring{\labelcoord}{(none)}{% default coord
}{% initialize if NOT default }{% initialize if NOT default
@ -163,12 +155,12 @@
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
%% symbol %% symbol
\ifdefstring{\friction}{none}{% none friction \ifdefstring{\friction}{none}{% none friction
\path[draw=\foreground, line width=1pt]% \path[draw=foreground, line width=1pt]%
($\facefactor*(-0.1,0) + (0,0.2)$) -- ++($\facefactor*( 0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker ($\facefactor*(-0.1,0) + (0,0.2)$) -- ++($\facefactor*( 0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker
}{% friction }{% friction
\path[draw=\foreground, line width=1pt]% \path[draw=foreground, line width=1pt]%
($\facefactor*(-\friction,0) + \facefactor*(-0.05,0) + (0,0.2)$) -- ++($\facefactor*(0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker ($\facefactor*(-\friction,0) + \facefactor*(-0.05,0) + (0,0.2)$) -- ++($\facefactor*(0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*(-0.1,0)$);% bufferstop marker
\fill[\foreground] (0,0) circle (0.06);% track closure indicator \fill[foreground] (0,0) circle (0.06);% track closure indicator
}% }%
}},% END pics/bufferstop/.style args={#1} }},% END pics/bufferstop/.style args={#1}
% %
@ -200,8 +192,8 @@
%% settings %% settings
\def\coordcommand{#1} % beware of leading and tailing spaces! \def\coordcommand{#1} % beware of leading and tailing spaces!
%% %%
\fill[\foreground] (0,0) circle (0.06);% track closure indicator \fill[foreground] (0,0) circle (0.06);% track closure indicator
% \path[fill=\foreground] (0.04,0.02) -- (0.04,-0.02) -- (0.02,-0.04) -- (-0.02,-0.04) -- (-0.04,-0.02) -- (-0.04,0.02) -- (-0.02,0.04) -- (0.02,0.04) -- cycle;% label % \path[fill=foreground] (0.04,0.02) -- (0.04,-0.02) -- (0.02,-0.04) -- (-0.02,-0.04) -- (-0.04,-0.02) -- (-0.04,0.02) -- (-0.02,0.04) -- (0.02,0.04) -- cycle;% label
}},% END pics/track_closure/.style args={#1} }},% END pics/track_closure/.style args={#1}
% %
% symbology entry % symbology entry
@ -272,13 +264,13 @@
\def\patterntype{north east lines}% \def\patterntype{north east lines}%
}% }%
}% }%
\path[draw=\foreground,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker \path[draw=foreground,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{% }{%
\ifdefstring{\operationmode}{remote}{% operation=remote \ifdefstring{\operationmode}{remote}{% operation=remote
\path[fill=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker \path[fill=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{% }{%
\ifdefstring{\operationmode}{none}{ \ifdefstring{\operationmode}{none}{
\path[draw=\foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker \path[draw=foreground] (0,0) -- ++($\facefactor*(0.4,0)$) -- ++($\branchfactor*(0,0.4)$) -- cycle;% turnout marker
}{% }{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}%
}% }%
@ -287,7 +279,7 @@
% %
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};% \tikzset{every node/.style={text=foreground}};%
\coordinate (ts-y-l) at ($\branchfactor*(0,-8pt)$);% \coordinate (ts-y-l) at ($\branchfactor*(0,-8pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-y-l) at ($(ts-y-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-y-l) at ($(ts-y-l)+(\x1,\y1)$);%
@ -297,29 +289,29 @@
% %
%% fouling point indicator %% fouling point indicator
\iftoggle{fouling_point}{% \iftoggle{fouling_point}{%
\path[draw=\foreground] ($\facefactor*(0.7,0)$) -- ++($\branchfactor*(0,0.7)$);% fouling point indicator \path[draw=foreground] ($\facefactor*(0.7,0)$) -- ++($\branchfactor*(0,0.7)$);% fouling point indicator
}{}% }{}%
% %
%% points %% points
\ifdefstring{\points}{left}{% points left \ifdefstring{\points}{left}{% points left
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,0.1)$) -- ++($\facefactor*(0.2,0)+(0,0.2)$);% \path[draw=foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,0.1)$) -- ++($\facefactor*(0.2,0)+(0,0.2)$);%
}{% }{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,0.1)$) -- ++($\facefactor*( 0.265,0 )$);% \path[draw=foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
}% }%
}{% }{%
\ifdefstring{\points}{right}{% points right \ifdefstring{\points}{right}{% points right
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,-0.1)$) -- ++($\facefactor*( 0.265,0 )$);% \path[draw=foreground,line width=1.5pt] ($\facefactor*( 0.035,0)+(0,-0.1)$) -- ++($\facefactor*( 0.265,0 )$);%
}{% }{%
\path[draw=\foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,-0.1)$) -- ++($\facefactor*(0.2,0)+(0,-0.2)$);% \path[draw=foreground,line width=1.5pt] ($\facefactor*(-0.035,0)+(0,-0.1)$) -- ++($\facefactor*(0.2,0)+(0,-0.2)$);%
}% }%
}{% }{%
\ifdefstring{\points}{moving}{% moving points \ifdefstring{\points}{moving}{% moving points
\fill[\foreground] ($\facefactor*(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($\facefactor*(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($\facefactor*(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($\facefactor*(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($\facefactor*(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right \fill[foreground] ($\facefactor*(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($\facefactor*(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right \fill[foreground] ($\facefactor*(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
}{% error message }{% error message
\ifdefstring{\points}{none}{% \ifdefstring{\points}{none}{%
}{% }{%
@ -413,12 +405,12 @@
}{% }{%
\def\patterntype{north east lines}% \def\patterntype{north east lines}%
}% }%
\path[draw,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker \path[draw,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw,pattern=\patterntype, pattern color=\foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker \path[draw,pattern=\patterntype, pattern color=foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
}{% operated automaticly }{% operated automaticly
\ifdefstring{\operationmode}{remote}{% operation=remote \ifdefstring{\operationmode}{remote}{% operation=remote
\path[fill=\foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker \path[fill=foreground] (0,0) -- ++($( 0.4,0)$) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[fill=\foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker \path[fill=foreground] (0,0) -- ++($(-0.4,0)$) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
}{% }{%
\ifdefstring{\operationmode}{none}{}{% \ifdefstring{\operationmode}{none}{}{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “remote“ OR “none“ as key required}}%
@ -427,30 +419,30 @@
}% }%
%% fouling point indicator %% fouling point indicator
\iftoggle{fouling_point}{% \iftoggle{fouling_point}{%
\path[draw=\foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator \path[draw=foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=\foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator \path[draw=foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
}{}% }{}%
% %
%% points %% points
\ifdefstring{\forwardpoints}{left}{% points left \ifdefstring{\forwardpoints}{left}{% points left
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,0.1) -- ++(0.2,0.2);% \path[draw=foreground,line width=1.5pt] (-0.035,0.1) -- ++(0.2,0.2);%
}{% }{%
\path[draw=\foreground,line width=1.5pt] ( 0.035,0.1) -- ++(0.265,0);% \path[draw=foreground,line width=1.5pt] ( 0.035,0.1) -- ++(0.265,0);%
}% }%
}{% }{%
\ifdefstring{\forwardpoints}{right}{% points right \ifdefstring{\forwardpoints}{right}{% points right
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] ( 0.035,-0.1) -- ++(0.265,0); \path[draw=foreground,line width=1.5pt] ( 0.035,-0.1) -- ++(0.265,0);
}{% }{%
\path[draw=\foreground,line width=1.5pt] (-0.035,-0.1) -- ++(0.2,-0.2);% \path[draw=foreground,line width=1.5pt] (-0.035,-0.1) -- ++(0.2,-0.2);%
}% }%
}{% }{%
\ifdefstring{\forwardpoints}{moving}{% moving points \ifdefstring{\forwardpoints}{moving}{% moving points
\fill[\foreground] ($(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($(0.075,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($(0.225,0) + \branchfactor*(0,-0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right \fill[foreground] ($(0.015,0) + \branchfactor*(0, 0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right \fill[foreground] ($(0.115,0) + \branchfactor*(0, 0.25)$) circle (0.05);% points indicator right
}{% error message }{% error message
\ifdefstring{\forwardpoints}{none}{% \ifdefstring{\forwardpoints}{none}{%
}{% }{%
@ -461,23 +453,23 @@
}% end of \ifdefstring{\forwardpoints} }% end of \ifdefstring{\forwardpoints}
\ifdefstring{\backwardpoints}{left}{% points left \ifdefstring{\backwardpoints}{left}{% points left
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (0.035,-0.1) -- ++(-0.2,-0.2);% \path[draw=foreground,line width=1.5pt] (0.035,-0.1) -- ++(-0.2,-0.2);%
}{% }{%
\path[draw=\foreground,line width=1.5pt] (-0.035,-0.1) -- ++(-0.265,0);% \path[draw=foreground,line width=1.5pt] (-0.035,-0.1) -- ++(-0.265,0);%
}% }%
}{% }{%
\ifdefstring{\backwardpoints}{right}{% points right \ifdefstring{\backwardpoints}{right}{% points right
\ifdefstring{\branch}{left}{% \ifdefstring{\branch}{left}{%
\path[draw=\foreground,line width=1.5pt] (-0.035,0.1) -- ++(-0.265,0); \path[draw=foreground,line width=1.5pt] (-0.035,0.1) -- ++(-0.265,0);
}{% }{%
\path[draw=\foreground,line width=1.5pt] (0.035,0.1) -- ++(-0.2,0.2);% \path[draw=foreground,line width=1.5pt] (0.035,0.1) -- ++(-0.2,0.2);%
}% }%
}{% }{%
\ifdefstring{\backwardpoints}{moving}{% moving points \ifdefstring{\backwardpoints}{moving}{% moving points
\fill[\foreground] ($(-0.075,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($(-0.075,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(-0.225,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left \fill[foreground] ($(-0.225,0) + \branchfactor*(0, 0.1 )$) circle (0.05);% points indicator left
\fill[\foreground] ($(-0.015,0) + \branchfactor*(0,-0.15)$) circle (0.05);% points indicator right \fill[foreground] ($(-0.015,0) + \branchfactor*(0,-0.15)$) circle (0.05);% points indicator right
\fill[\foreground] ($(-0.115,0) + \branchfactor*(0,-0.25)$) circle (0.05);% points indicator right \fill[foreground] ($(-0.115,0) + \branchfactor*(0,-0.25)$) circle (0.05);% points indicator right
}{% error message }{% error message
\ifdefstring{\backwardpoints}{none}{% \ifdefstring{\backwardpoints}{none}{%
}{% }{%
@ -489,14 +481,14 @@
% %
%% slips %% slips
\ifdefstring{\slip}{double}{% slip \ifdefstring{\slip}{double}{% slip
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0, 0.1)$) -- ($\branchfactor*( 0.3,0) + (0, 0.4)$);% slip \path[draw=foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0, 0.1)$) -- ($\branchfactor*( 0.3,0) + (0, 0.4)$);% slip
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*( 0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip \path[draw=foreground,line width=0.75pt] ($\branchfactor*( 0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
}{% }{%
\ifdefstring{\slip}{left}{% \ifdefstring{\slip}{left}{%
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0,0.1)$) -- ($\branchfactor*(0.3,0) + (0,0.4)$);% slip \path[draw=foreground,line width=0.75pt] ($\branchfactor*(-0.4,0) + (0,0.1)$) -- ($\branchfactor*(0.3,0) + (0,0.4)$);% slip
}{% }{%
\ifdefstring{\slip}{right}{% \ifdefstring{\slip}{right}{%
\path[draw=\foreground,line width=0.75pt] ($\branchfactor*(0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip \path[draw=foreground,line width=0.75pt] ($\branchfactor*(0.4,0) + (0,-0.1)$) -- ($\branchfactor*(-0.3,0) + (0,-0.4)$);% slip
}{% }{%
\ifdefstring{\slip}{none}{% \ifdefstring{\slip}{none}{%
% %
@ -508,7 +500,7 @@
}% }%
% %
%% label %% label
\tikzset{every node/.style={text=\foreground}};% \tikzset{every node/.style={text=foreground}};%
\ifdefstring{\labelcontentleft}{}{}{% label NOT empty \ifdefstring{\labelcontentleft}{}{}{% label NOT empty
\coordinate (ts-sy-l1) at ($(2pt,0) + \branchfactor*(0, 10pt)$);% \coordinate (ts-sy-l1) at ($(2pt,0) + \branchfactor*(0, 10pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
@ -563,12 +555,12 @@
}% }%
% %
%% crossing marker %% crossing marker
\path[draw=\foreground] (0,0) -- ++( 0.4,0) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker \path[draw=foreground] (0,0) -- ++( 0.4,0) -- ++($\branchfactor*(0, 0.4)$) -- cycle;% turnout marker
\path[draw=\foreground] (0,0) -- ++(-0.4,0) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker \path[draw=foreground] (0,0) -- ++(-0.4,0) -- ++($\branchfactor*(0,-0.4)$) -- cycle;% turnout marker
% %
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};% \tikzset{every node/.style={text=foreground}};%
\coordinate (ts-x-l) at ($(2pt,0) + \branchfactor*(0,-9pt)$);% \coordinate (ts-x-l) at ($(2pt,0) + \branchfactor*(0,-9pt)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-x-l) at ($(ts-x-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-x-l) at ($(ts-x-l)+(\x1,\y1)$);%
@ -578,8 +570,8 @@
% %
%% fouling point indicator %% fouling point indicator
\iftoggle{fouling_point}{% \iftoggle{fouling_point}{%
\path[draw=\foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator \path[draw=foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator
\path[draw=\foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator \path[draw=foreground] (-0.7,0) -- ++($\branchfactor*(0,-0.7)$);% fouling point indicator
}{}% }{}%
% %
}},% end of pics/crossing/.style args={#1/#2/#3} }},% end of pics/crossing/.style args={#1/#2/#3}
@ -639,12 +631,12 @@
}% end \ifdefstring{\branch} }% end \ifdefstring{\branch}
% %
%% symbol %% symbol
\path[draw=\foreground, line width=1pt] (0,0.1) -- ++(0,-0.2);% derailer marker \path[draw=foreground, line width=1pt] (0,0.1) -- ++(0,-0.2);% derailer marker
\path[draw=\foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++($\facefactor*(0.4,0) + \branchfactor*(0,0.4)$);% derailer arrow \path[draw=foreground,->,>=latex,line width=1pt,dashed] (0,0) -- ++($\facefactor*(0.4,0) + \branchfactor*(0,0.4)$);% derailer arrow
% %
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={text=\foreground}};% \tikzset{every node/.style={text=foreground}};%
\coordinate (ts-dr-l) at ($\branchfactor*(0,-0.3)$);% \coordinate (ts-dr-l) at ($\branchfactor*(0,-0.3)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-dr-l) at ($(ts-dr-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-dr-l) at ($(ts-dr-l)+(\x1,\y1)$);%

View File

@ -18,14 +18,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color \foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color \background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face %% face
face/.value required,% forward OR backward face/.value required,% forward OR backward
face/.store in=\face,% forward OR backward face/.store in=\face,% forward OR backward
@ -189,8 +181,8 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
\tikzset{every node/.style={text=\foreground,inner sep=1pt}};% \tikzset{every node/.style={text=foreground,inner sep=1pt}};%
%% signal pole %% signal pole
\path (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.7,0)$);% signal pole \path (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.7,0)$);% signal pole
% %
@ -202,7 +194,7 @@
}% }%
\node[\align] at (ts-s-l) {\footnotesize \labelcontent};% \node[\align] at (ts-s-l) {\footnotesize \labelcontent};%
}% }%
\tikzset{every path/.style={draw=\foreground,line width=1pt,fill=\background},rounded corners=0.1pt};% \tikzset{every path/.style={draw=foreground,line width=1pt,fill=background},rounded corners=0.1pt};%
%% signal marker %% signal marker
\iftoggle{is_distant_type}{% marker for distant signal \iftoggle{is_distant_type}{% marker for distant signal
\path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.35,0)$) --% \path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.35,0)$) --%
@ -250,7 +242,7 @@
}{}% }{}%
%% speed indicator %% speed indicator
\ifdefstring{\speed}{}{}{% speed NOT empty \ifdefstring{\speed}{}{}{% speed NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\iftoggle{is_speed_type}{% marker for speed signal \iftoggle{is_speed_type}{% marker for speed signal
\node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.85,0)$) {\speed};% \node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.85,0)$) {\speed};%
}{% }{%
@ -260,7 +252,7 @@
}% }%
}% }%
\ifdefstring{\distantspeed}{}{}{% distant speed NOT empty \ifdefstring{\distantspeed}{}{}{% distant speed NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground,fill=\background,inner sep=0.5pt}};% \tikzset{every node/.style={font=\sffamily,text=foreground,fill=background,inner sep=0.5pt}};%
\node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.2,0)$) {\distantspeed};% \node[rotate=\rotate] at ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.2,0)$) {\distantspeed};%
}% }%
%% locked %% locked
@ -382,7 +374,7 @@
}{% default case }{% default case
\pgfmathsetmacro{\facefactor}{1}% \pgfmathsetmacro{\facefactor}{1}%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker %% marker
\path ($\trafficfactor*\facefactor*(0,-0.1)$) -- ++($\trafficfactor*\facefactor*(0,0.2)$);% marker \path ($\trafficfactor*\facefactor*(0,-0.1)$) -- ++($\trafficfactor*\facefactor*(0,0.2)$);% marker
%% sign %% sign
@ -400,7 +392,7 @@
}{}% }{}%
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-cp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);% \coordinate (ts-cp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-cp-l) at ($(ts-cp-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-cp-l) at ($(ts-cp-l)+(\x1,\y1)$);%
@ -452,11 +444,11 @@
}% }%
}% end \ifdefstring{\trafficpractice} }% end \ifdefstring{\trafficpractice}
%% marker %% marker
\tikzset{every path/.style={draw=\foreground}};% \tikzset{every path/.style={draw=foreground}};%
\path[line width=1pt] ($\trafficfactor*(0,-0.175)$) -- ++(-0.0625,-0.0625) -- ++(-0.2,0) -- ++(-0.125,0.125) -- ++(-0.1,0) -- ++(0,-0.125) -- ++(0.1,0) -- ++(0.125,0.125) -- ++(0.2,0) -- ++(0.125,-0.125) -- ++(0.2,0) -- ++(0.125,0.125) -- ++(0.1,0) -- ++(0,-0.125) -- ++(-0.1,0) -- ++(-0.125,0.125) -- ++(-0.2,0) -- cycle;% loop marker \path[line width=1pt] ($\trafficfactor*(0,-0.175)$) -- ++(-0.0625,-0.0625) -- ++(-0.2,0) -- ++(-0.125,0.125) -- ++(-0.1,0) -- ++(0,-0.125) -- ++(0.1,0) -- ++(0.125,0.125) -- ++(0.2,0) -- ++(0.125,-0.125) -- ++(0.2,0) -- ++(0.125,0.125) -- ++(0.1,0) -- ++(0,-0.125) -- ++(-0.1,0) -- ++(-0.125,0.125) -- ++(-0.2,0) -- cycle;% loop marker
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-tm-l) at ($\trafficfactor*(0,0.25)$);% \coordinate (ts-tm-l) at ($\trafficfactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-tm-l) at ($(ts-tm-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-tm-l) at ($(ts-tm-l)+(\x1,\y1)$);%
@ -567,54 +559,54 @@
%% %%
%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%
%% 1. marker %% 1. marker
\tikzset{every path/.style={draw=\foreground,line width=0.75pt,rounded corners=0.2pt}};% \tikzset{every path/.style={draw=foreground,line width=0.75pt,rounded corners=0.2pt}};%
%% %%
\iftoggle{unnumberd}{% no number has been set \iftoggle{unnumberd}{% no number has been set
%% marker for undefined balises %% marker for undefined balises
\path[fill=\background] ($(-0.3,0)$) rectangle ($\trafficfactor*\facefactor*(0,-0.25) + (0.3,0)$);% balise marker \path[fill=background] ($(-0.3,0)$) rectangle ($\trafficfactor*\facefactor*(0,-0.25) + (0.3,0)$);% balise marker
\iftoggle{switched}{% balises can be switched \iftoggle{switched}{% balises can be switched
\path[fill=\foreground] ($\trafficfactor*\facefactor*(0,-0.075) + (-0.225,0)$) rectangle% \path[fill=foreground] ($\trafficfactor*\facefactor*(0,-0.075) + (-0.225,0)$) rectangle%
($\trafficfactor*\facefactor*(0,-0.175) + ( 0.225,0)$);% switch marker ($\trafficfactor*\facefactor*(0,-0.175) + ( 0.225,0)$);% switch marker
}{}% }{}%
}{% a number has been set }{% a number has been set
%% marker for numbered balises %% marker for numbered balises
\ifdefstring{\along}{none}{}{ \ifdefstring{\along}{none}{}{
\foreach \n in \along{% \foreach \n in \along{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle% \path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker ($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker
\iftoggle{index_number}{% \iftoggle{index_number}{%
\node[text=\foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};% \node[text=foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
}{}% }{}%
}% }%
}% }%
\ifdefstring{\oppose}{none}{}{ \ifdefstring{\oppose}{none}{}{
\foreach \n in \oppose{% \foreach \n in \oppose{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle% \path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker ($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker
\iftoggle{index_number}{% \iftoggle{index_number}{%
\node[text=\foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};% \node[text=foreground] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
}{}% }{}%
}% }%
}% }%
\ifdefstring{\alongswitched}{none}{}{ \ifdefstring{\alongswitched}{none}{}{
\foreach \n in \alongswitched{% \foreach \n in \alongswitched{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle% \path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker ($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,-0.25)$);% balise marker
\path[fill=\foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,-0.05)$) rectangle% \path[fill=foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,-0.05)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,-0.2)$);% switch marker ($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,-0.2)$);% switch marker
\iftoggle{index_number}{% \iftoggle{index_number}{%
\node[text=\background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};% \node[text=background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,-0.125)$) {\tiny\n};%
}{}% }{}%
}% }%
}% }%
\ifdefstring{\opposeswitched}{none}{}{ \ifdefstring{\opposeswitched}{none}{}{
\foreach \n in \opposeswitched{% \foreach \n in \opposeswitched{%
\path[fill=\background] ($\n*\facefactor*(0.2,0)$) rectangle% \path[fill=background] ($\n*\facefactor*(0.2,0)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker ($\n*\facefactor*(0.2,0) + (0.2 ,0) + \trafficfactor*\facefactor*(0,0.25)$);% balise marker
\path[fill=\foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,0.05)$) rectangle% \path[fill=foreground] ($\n*\facefactor*(0.2,0) + (0.05,0) + \trafficfactor*\facefactor*(0,0.05)$) rectangle%
($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,0.2)$);% switch marker ($\n*\facefactor*(0.2,0) + (0.15,0) + \trafficfactor*\facefactor*(0,0.2)$);% switch marker
\iftoggle{index_number}{% \iftoggle{index_number}{%
\node[text=\background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};% \node[text=background] at ($\n*\facefactor*(0.2,0) + (0.1,0) + \trafficfactor*\facefactor*(0,0.125)$) {\tiny\n};%
}{}% }{}%
}% }%
}% }%
@ -633,7 +625,7 @@
\path let \p1=\labelcoord in coordinate (label-coord) at ($(label-coord)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (label-coord) at ($(label-coord)+(\x1,\y1)$);%
}% }%
%% label style %% label style
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
% %
\ifdefstring{\trafficpractice}{left}{% \ifdefstring{\trafficpractice}{left}{%
\tikzset{every node/.append style={left,align=right}};% \tikzset{every node/.append style={left,align=right}};%
@ -695,11 +687,11 @@
}% }%
}% end \ifdefstring{\trafficpractice} }% end \ifdefstring{\trafficpractice}
%% arrow %% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]% \path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow ($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% eye %% eye
\filldraw[\foreground] ($\facefactor*(0.4,0) + \facefactor*\trafficfactor*(0,-0.4)$) circle (0.1);% pupil \filldraw[foreground] ($\facefactor*(0.4,0) + \facefactor*\trafficfactor*(0,-0.4)$) circle (0.1);% pupil
\path[draw=\foreground, line width=1pt]% eye contour \path[draw=foreground, line width=1pt]% eye contour
($\facefactor*(0.4, 0) + \facefactor*\trafficfactor*(0,-0.15)$) .. controls% ($\facefactor*(0.4, 0) + \facefactor*\trafficfactor*(0,-0.15)$) .. controls%
($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.25)$) and% ($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.25)$) and%
($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.55)$) ..% ($\facefactor*(0.25,0) + \facefactor*\trafficfactor*(0,-0.55)$) ..%
@ -754,16 +746,16 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker %% marker
\path ($\trafficfactor*\facefactor*(0,-0.55) + \facefactor*(0.3,0)$) rectangle% \path ($\trafficfactor*\facefactor*(0,-0.55) + \facefactor*(0.3,0)$) rectangle%
++($\trafficfactor*\facefactor*(0, 0.3) + \facefactor*(0.3,0)$);% ++($\trafficfactor*\facefactor*(0, 0.3) + \facefactor*(0.3,0)$);%
%% arrow %% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]% \path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow ($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-ma-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);% \coordinate (ts-ma-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-ma-l) at ($(ts-ma-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-ma-l) at ($(ts-ma-l)+(\x1,\y1)$);%
@ -817,17 +809,17 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker %% marker
\path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.3,0)$) --% \path ($\trafficfactor*\facefactor*(0,-0.4) + \facefactor*(0.3,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(0.25,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.15) + \facefactor*(0.25,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.3)$) -- cycle;% signal marker ++($\trafficfactor*\facefactor*(0, 0.3)$) -- cycle;% signal marker
%% arrow %% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]% \path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow ($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.3)$) -- ++($\facefactor*(0.2,0)$);% arrow
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-bp-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);% \coordinate (ts-bp-l) at ($\trafficfactor*\facefactor*(0,-0.6) + \facefactor*(0.3,0)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-bp-l) at ($(ts-bp-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-bp-l) at ($(ts-bp-l)+(\x1,\y1)$);%
@ -881,18 +873,18 @@
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}%
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
\tikzset{every path/.style={draw=\foreground,line width=1pt}};% \tikzset{every path/.style={draw=foreground,line width=1pt}};%
%% marker %% marker
\path ($\trafficfactor*\facefactor*(0,-0.4)$) --% \path ($\trafficfactor*\facefactor*(0,-0.4)$) --%
++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*(-0.1,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*(-0.1,0)$) --%
++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*( 0.1,0)$) --% ++($\trafficfactor*\facefactor*(0,-0.1) + \facefactor*( 0.1,0)$) --%
++($\trafficfactor*\facefactor*(0, 0.1) + \facefactor*( 0.1,0)$) -- cycle;% sign ++($\trafficfactor*\facefactor*(0, 0.1) + \facefactor*( 0.1,0)$) -- cycle;% sign
%% arrow %% arrow
\path[draw=\foreground,<-,>=latex,line width=1pt]% \path[draw=foreground,<-,>=latex,line width=1pt]%
($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.25)$);% arrow ($\facefactor*\trafficfactor*(0,-0.1)$) -- ++($\facefactor*\trafficfactor*(0,-0.25)$);% arrow
%% label %% label
\ifdefstring{\labelcontent}{}{}{% label NOT empty \ifdefstring{\labelcontent}{}{}{% label NOT empty
\tikzset{every node/.style={font=\sffamily,text=\foreground}};% \tikzset{every node/.style={font=\sffamily,text=foreground}};%
\coordinate (ts-dp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);% \coordinate (ts-dp-l) at ($\trafficfactor*\facefactor*(0,0.25)$);%
\ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default
\path let \p1=\labelcoord in coordinate (ts-dp-l) at ($(ts-dp-l)+(\x1,\y1)$);% \path let \p1=\labelcoord in coordinate (ts-dp-l) at ($(ts-dp-l)+(\x1,\y1)$);%
@ -932,7 +924,7 @@
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
%% symbol %% symbol
\fill[\foreground] ($\facefactor*(-0.175,0)+(0,-0.15)$) --% \fill[foreground] ($\facefactor*(-0.175,0)+(0,-0.15)$) --%
($\facefactor*(-0.175,0)+(0, 0.15)$) --% ($\facefactor*(-0.175,0)+(0, 0.15)$) --%
($\facefactor*( 0.175,0)+(0, 0 )$) -- cycle;% ($\facefactor*( 0.175,0)+(0, 0 )$) -- cycle;%
}},% END pics/route/.style args={#1} }},% END pics/route/.style args={#1}
@ -971,31 +963,31 @@
% %
%% face setup %% face setup
\ifdefstring{\face}{forward}{% face \ifdefstring{\face}{forward}{% face
\path[draw=\foreground,line width=0.5pt,densely dotted]% \path[draw=foreground,line width=0.5pt,densely dotted]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --% ($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --% ($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward ($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\fill[\foreground]% \fill[foreground]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --% ($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --% ($\trafficfactor*(0,-0.325) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward ($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
}{% }{%
\ifdefstring{\face}{backward}{% face \ifdefstring{\face}{backward}{% face
\fill[\foreground]% \fill[foreground]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --% ($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --% ($\trafficfactor*(0,0.325) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.325) + (0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward ($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\path[draw=\foreground,line width=0.5pt,densely dotted]% \path[draw=foreground,line width=0.5pt,densely dotted]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --% ($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --% ($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175) + (-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward ($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
}{ }{
\ifdefstring{\face}{bidirectional}{% face \ifdefstring{\face}{bidirectional}{% face
\path[draw=\foreground,line width=0.5pt]% \path[draw=foreground,line width=0.5pt]%
($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --% ($\trafficfactor*(0,0.1) + (-0.0125,0)$) -- ($\trafficfactor*(0,0.25) + (-0.2125,0)$) -- ($\trafficfactor*(0,0.4) + (-0.0125,0)$) --%
($\trafficfactor*(0,0.325) +(-0.0125,0)$) -- ($\trafficfactor*(0,0.325) +(0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --% ($\trafficfactor*(0,0.325) +(-0.0125,0)$) -- ($\trafficfactor*(0,0.325) +(0.1875,0)$) -- ($\trafficfactor*(0,0.175) + (0.1875,0)$) --%
($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward ($\trafficfactor*(0,0.175) + (-0.0125,0)$) -- cycle;% arrow backward
\path[draw=\foreground,line width=0.5pt]% \path[draw=foreground,line width=0.5pt]%
($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --% ($\trafficfactor*(0,-0.1) + (0.0125,0)$) -- ($\trafficfactor*(0,-0.25) + (0.2125,0)$) -- ($\trafficfactor*(0,-0.4) + (0.0125,0)$) --%
($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175)+(-0.1875,0)$) --% ($\trafficfactor*(0,-0.325)+(0.0125,0)$) -- ($\trafficfactor*(0,-0.325)+(-0.1875,0)$) -- ($\trafficfactor*(0,-0.175)+(-0.1875,0)$) --%
($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward ($\trafficfactor*(0,-0.175) + (0.0125,0)$) -- cycle;% arrow forward
@ -1005,7 +997,7 @@
}% }%
}% end \ifdefstring{\face} }% end \ifdefstring{\face}
%% frame %% frame
% \path[draw=\foreground,line width=0.5pt]% % \path[draw=foreground,line width=0.5pt]%
% (-0.3, 0.1) -- (-0.3, 0.5) -- (0.3, 0.5) -- (0.3, 0.1) % (-0.3, 0.1) -- (-0.3, 0.5) -- (0.3, 0.5) -- (0.3, 0.1)
% (-0.3,-0.1) -- (-0.3,-0.5) -- (0.3,-0.5) -- (0.3,-0.1); % (-0.3,-0.1) -- (-0.3,-0.5) -- (0.3,-0.5) -- (0.3,-0.1);
}},% END pics/direction_control/.style args={#1} }},% END pics/direction_control/.style args={#1}

View File

@ -23,14 +23,6 @@
\pgfkeys{% \pgfkeys{%
/tikz/trackschematic/.is family,% /tikz/trackschematic/.is family,%
/tikz/trackschematic/.cd,% /tikz/trackschematic/.cd,%
%% color foreground
foreground/.store in=\foreground,%
foreground=black,% DEFAULT
/tikz/foreground/.forward to=/tikz/trackschematic/foreground,%
%% color background
background/.store in=\background,%
background=white,% DEFAULT
/tikz/background/.forward to=/tikz/trackschematic/background,%
%% face %% face
face/.value required,% forward OR backward face/.value required,% forward OR backward
face/.store in=\face,% face/.store in=\face,%
@ -274,12 +266,12 @@
%% 2. vehicle style %% 2. vehicle style
\iftoggle{in_train_mode}{% train mode \iftoggle{in_train_mode}{% train mode
\iftoggle{train_is_a_ghost}{% ghost train \iftoggle{train_is_a_ghost}{% ghost train
\tikzset{every path/.style={draw=\foreground, line width=0.8pt, dashed}};% \tikzset{every path/.style={draw=foreground, line width=0.8pt, dashed}};%
}{% normal train }{% normal train
\tikzset{every path/.style={draw=\foreground, line width=1pt, fill=\background}};% \tikzset{every path/.style={draw=foreground, line width=1pt, fill=background}};%
}% }%
}{% shunting mode }{% shunting mode
\tikzset{every path/.style={draw=\foreground, double, double distance=0.5mm, line width=0.3pt, fill=\background}};% \tikzset{every path/.style={draw=foreground, double, double distance=0.5mm, line width=0.3pt, fill=background}};%
}% }%
%% %%
%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%
@ -287,11 +279,11 @@
%% (order before vehicle shape due to background fill!) %% (order before vehicle shape due to background fill!)
\iftoggle{is_shunting}{% arrow for shunting \iftoggle{is_shunting}{% arrow for shunting
\iftoggle{in_shunting_mode}{% shunting mode \iftoggle{in_shunting_mode}{% shunting mode
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --% \fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*(-0.1, 0.3)$) --% ($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --% ($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$) --% ($\facefactor*(-0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill ($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[line cap=rect,fill=none] ($\facefactor*(-0.1, 0.3)$) --% \path[line cap=rect,fill=none] ($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --% ($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$);% arrow shape ($\facefactor*(-0.1,-0.3)$);% arrow shape
@ -302,11 +294,11 @@
\ifdefstring{\trainrun}{none}{}{% DEFAULT no arrow for train \ifdefstring{\trainrun}{none}{}{% DEFAULT no arrow for train
\iftoggle{in_train_mode}{% train mode \iftoggle{in_train_mode}{% train mode
\ifdefstring{\trainrun}{slow}{% \ifdefstring{\trainrun}{slow}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --% \fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*(-0.1, 0.3)$) --% ($\facefactor*(-0.1, 0.3)$) --%
($\facefactor*( 0.2, 0 )$) --% ($\facefactor*( 0.2, 0 )$) --%
($\facefactor*(-0.1,-0.3)$) --% ($\facefactor*(-0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill ($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --% \path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --% ($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --% ($\facefactor*( 0.2 , 0 )$) --%
@ -314,11 +306,11 @@
($\facefactor*(-0.15,-0.3)$);% arrow shape ($\facefactor*(-0.15,-0.3)$);% arrow shape
}{% }{%
\ifdefstring{\trainrun}{normal}{% \ifdefstring{\trainrun}{normal}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --% \fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*( 0.1, 0.3)$) --% ($\facefactor*( 0.1, 0.3)$) --%
($\facefactor*( 0.4, 0 )$) --% ($\facefactor*( 0.4, 0 )$) --%
($\facefactor*( 0.1,-0.3)$) --% ($\facefactor*( 0.1,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill ($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --% \path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --% ($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --% ($\facefactor*( 0.2 , 0 )$) --%
@ -332,11 +324,11 @@
% %
}{% }{%
\ifdefstring{\trainrun}{fast}{% \ifdefstring{\trainrun}{fast}{%
\fill[draw=none,fill=\background] ($\facefactor*(-0.3, 0.3)$) --% \fill[draw=none,fill=background] ($\facefactor*(-0.3, 0.3)$) --%
($\facefactor*( 0.3, 0.3)$) --% ($\facefactor*( 0.3, 0.3)$) --%
($\facefactor*( 0.6, 0 )$) --% ($\facefactor*( 0.6, 0 )$) --%
($\facefactor*( 0.3,-0.3)$) --% ($\facefactor*( 0.3,-0.3)$) --%
($\facefactor*(-0.3,-0.3)$) -- cycle;% \background fill ($\facefactor*(-0.3,-0.3)$) -- cycle;% background fill
\path[fill=none] ($\facefactor*(-0.15, 0.3)$) --% \path[fill=none] ($\facefactor*(-0.15, 0.3)$) --%
($\facefactor*(-0.1 , 0.3)$) --% ($\facefactor*(-0.1 , 0.3)$) --%
($\facefactor*( 0.2 , 0 )$) --% ($\facefactor*( 0.2 , 0 )$) --%
@ -374,10 +366,10 @@
%% 5. operation mode %% 5. operation mode
\iftoggle{is_parked}{}{% vehicle NOT parked \iftoggle{is_parked}{}{% vehicle NOT parked
\ifdefstring{\operationmode}{manual}{% \ifdefstring{\operationmode}{manual}{%
\path[draw=none, fill=\foreground] ($\facefactor*(-0.4,0)$) circle (0.15);% dot \path[draw=none, fill=foreground] ($\facefactor*(-0.4,0)$) circle (0.15);% dot
}{ }{
\ifdefstring{\operationmode}{automatic}{% \ifdefstring{\operationmode}{automatic}{%
\path[draw=none, fill=\foreground] ($\facefactor*(-0.15,0)$) -- ++($\facefactor*(-0.15,0) +(0,0.15)$) -- ++(0,-0.3) -- cycle;% triangle \path[draw=none, fill=foreground] ($\facefactor*(-0.15,0)$) -- ++($\facefactor*(-0.15,0) +(0,0.15)$) -- ++(0,-0.3) -- cycle;% triangle
}{% }{%
\ifdefstring{\operationmode}{undefined}{}{% \ifdefstring{\operationmode}{undefined}{}{%
\pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “automatic“ OR “undefined“ as key required}}% \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/operation}{“manual“, “automatic“ OR “undefined“ as key required}}%
@ -419,7 +411,7 @@
}% \ifdefstring{\labelalign}{right} }% \ifdefstring{\labelalign}{right}
}% \ifdefstring{\labelalign}{left} }% \ifdefstring{\labelalign}{left}
}% \ifdefstring{\labelalign}{center} }% \ifdefstring{\labelalign}{center}
\node[text=\foreground,anchor=\labelanchor,align=\labelalign] at (ts-v-l) {\footnotesize \labelcontent};% label \node[text=foreground,anchor=\labelanchor,align=\labelalign] at (ts-v-l) {\footnotesize \labelcontent};% label
}% }%
}},% END pics/vehicles/.style args={#1/#2/#3} }},% END pics/vehicles/.style args={#1/#2/#3}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

View File

@ -16,7 +16,7 @@
\begin{adjustbox}{width=\textwidth} \begin{adjustbox}{width=\textwidth}
\begin{tikzpicture} \begin{tikzpicture}
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau}; \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}}; \node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt}; \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -29,7 +29,7 @@
\begin{scaletikzpicturetowidth}{\textwidth} \begin{scaletikzpicturetowidth}{\textwidth}
\begin{tikzpicture}[scale=\tikzscale,transform shape] \begin{tikzpicture}[scale=\tikzscale,transform shape]
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau}; \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}}; \node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt}; \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -16,7 +16,7 @@
\begin{adjustbox}{width=\textwidth} \begin{adjustbox}{width=\textwidth}
\begin{tikzpicture} \begin{tikzpicture}
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau}; \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}}; \node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt}; \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};

View File

@ -29,7 +29,7 @@
\begin{scaletikzpicturetowidth}{\textwidth} \begin{scaletikzpicturetowidth}{\textwidth}
\begin{tikzpicture}[scale=\tikzscale,transform shape] \begin{tikzpicture}[scale=\tikzscale,transform shape]
{ % station names { % station names
\tikzset{every node/.style={\foreground!50!\background}}; \tikzset{every node/.style={foreground!50!background}};
\node[right,align=left] at ( 2,1.3) {to and from\\ Arnau}; \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
\node at (21,3.3) {{\LARGE Bf Berg}}; \node at (21,3.3) {{\LARGE Bf Berg}};
\node[left,align=right] at (38,1.3) {to and from\\ Chamstadt}; \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};