diff options
author | Karl Berry <karl@freefriends.org> | 2021-01-02 22:20:07 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-01-02 22:20:07 +0000 |
commit | 8108f8772a3191c3087e5989a5b5277c27270ef0 (patch) | |
tree | d345894efa980b417d97a88142e1ef23d38eb953 /Master/texmf-dist/tex | |
parent | 942a4033ca0e15d273818446de9c7cd56a228698 (diff) |
tikz-trackschematic (2jan21)
git-svn-id: svn://tug.org/texlive/trunk@57300 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex')
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikz-trackschematic.sty | 158 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex | 57 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex | 89 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex | 611 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex (renamed from Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.messures.code.tex) | 80 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex | 168 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex | 200 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex | 57 |
8 files changed, 1339 insertions, 81 deletions
diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikz-trackschematic.sty b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikz-trackschematic.sty new file mode 100644 index 00000000000..2afa50dbfef --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikz-trackschematic.sty @@ -0,0 +1,158 @@ +%% symbol library for TikZ track schematics +% +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) +% +% Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +% +\NeedsTeXFormat{LaTeX2e}% +\ProvidesPackage{tikz-trackschematic}[2021/01/02 tikz-trackschematic]% +% +% Required Packages for tikz-trackschematic +\RequirePackage{tikz,etoolbox,lmodern}% +% +%%%%%%%%%%%%%%% +% Package options +%%%%%%%%%%%%%%% +\RequirePackage{xkeyval,etoolbox}% +\newtoggle{development}% +\DeclareOptionX{dev}[\settoggle{development}{false}]{\settoggle{development}{true}} +\ProcessOptionsX +% +\iftoggle{development}{% + \PackageInfo{tikz-trackschematic}{development mode}% + % + \IfFileExists{tikz-trackschematic-dev.sty}{% + \usetikzlibrary{trackschematic-dev.topology}% + \usetikzlibrary{trackschematic-dev.trafficcontrol}% + \usetikzlibrary{trackschematic-dev.vehicles}% + \usetikzlibrary{trackschematic-dev.constructions}% + \usetikzlibrary{trackschematic-dev.electrics}% + \usetikzlibrary{trackschematic-dev.measures}% + \usetikzlibrary{trackschematic-dev}% + }{% + \PackageError{tikz-trackschematic}{development mode not available}{execute the dev-install.sh script provided by the package repository}% + }% +}{% + \usetikzlibrary{trackschematic.topology}% + \usetikzlibrary{trackschematic.trafficcontrol}% + \usetikzlibrary{trackschematic.vehicles}% + \usetikzlibrary{trackschematic.constructions}% + \usetikzlibrary{trackschematic.electrics}% + \usetikzlibrary{trackschematic.measures}% +}% +% +%%%%%%%%%%%%%%% +% commands +%%%%%%%%%%%%%%% +\RequirePackage{adjustbox}% +\usetikzlibrary{calc}% +% +\DeclareRobustCommand{\tsSymbol}[2][1]{% + \adjustbox{valign=c}{% + \begin{tikzpicture}]% + \pic at (0,0) {symbology_#2};% + \path ($0.5*(-0.2,-#1)$) rectangle ($0.5*(12.2,#1)$);% background rectangle to unify every cell containing a symbol + \end{tikzpicture}% + }% +}% +%%%%%%%%%%%%%%% +% symbology table +%%%%%%%%%%%%%%% +% +%% TODO: replave with package glossaries +% \@ifpackageloaded{glossaries}{% +% \newglossaryentry{main_track}{name={main track},description={},symbol={\tsSymbol{main_track}}}% +% }{}% +%% +\RequirePackage{booktabs,xltabular,multicol}% +%% command +\DeclareRobustCommand\tsFullSymbology{% + \begin{xltabular}{\textwidth}{cX}% + \toprule% + \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\% + \midrule% + \endfirsthead% + % ----------- + \midrule% + \textbf{Notation} & \multicolumn{1}{c}{\textbf{Description}} \\% + \midrule% + \endhead% + % ----------- + \midrule% + \multicolumn{2}{c}{\footnotesize -- continued on next page -- } \\% + \endfoot% + % ----------- + \bottomrule% + \endlastfoot% + % ----------- + \tsSymbol{main_track} & main track \\% + \tsSymbol{secondary_track} & secondary track \\% + \tsSymbol{track_label} & track label \\% + \tsSymbol{bufferstop} & bufferstop \\% + \tsSymbol{friction_bufferstop} & friction bufferstop \\% + \tsSymbol{track_closure} & track closure \\% + \tsSymbol{turnout} & turnout \\% + \tsSymbol{turnout_fouling} & turnout with fouling point indicator \\% + \tsSymbol{turnout_manually} & turnout operated manually \\% + \tsSymbol{diamond_crossing} & diamond crossing \\% + \tsSymbol{slip_turnout} & double-slip turnout \\% + \tsSymbol{turnout_points_right} & turnout with points in right position \\% + \tsSymbol{turnout_points_left} & turnout with points in left position \\% + \tsSymbol{turnout_points_moving} & turnout with moving points \\% + \tsSymbol{derailer} & derailer \\% + \tsSymbol{parked_vehicles} & parked vehicles \\% + \tsSymbol{train_shunt_mode} & train in shunting mode \\% + \tsSymbol{train_shunting} & train shunting \\% + \tsSymbol{train} & train \\% + \tsSymbol{train_moving_slow} & train moving slow \\% + \tsSymbol{train_moving} & train moving \\% + \tsSymbol{train_moving_fast} & train moving fast \\% + \tsSymbol{train_ghost} & train ghost \\% + \tsSymbol{train_drive_automatic} & train operated automatic \\% + \tsSymbol{train_drive_human} & train operated by human \\% + \tsSymbol[1.4]{distant_signal} & distant signal \\% + \tsSymbol[1.4]{distant_speed_signal}& distant signal with speed indicator \\% + \tsSymbol[1.4]{speed_signal} & speed signal \\% + \tsSymbol[1.4]{block_signal} & block signal \\% + \tsSymbol[1.4]{route_signal} & route signal \\% + \tsSymbol[1.4]{combined_signal} & combined signal (distant, block and route signal) \\% + \tsSymbol[1.4]{shunt_signal} & shunt signal \\% + \tsSymbol[1.4]{locked_shunt_signal} & shunt signal locked \\% + \tsSymbol[1.4]{shunt_limit} & shunt limit \\% + \tsSymbol[1.4]{train_berth_sign} & train berth sign \\% + \tsSymbol[1.4]{view_point} & view point \\% + \tsSymbol[1.4]{braking_point} & braking point \\% + \tsSymbol[1.4]{end_of_authority} & end of movement authority \\% + \tsSymbol[1.4]{danger_point} & danger point \\% + \tsSymbol{clearing_point} & clearing point \\% + \tsSymbol{block_clearing_point} & block clearing point \\% + \tsSymbol{route_clearing_point} & route clearing point \\% + \tsSymbol{transmitter} & transmitter \\% + \tsSymbol{transmitter_forward} & transmitter effective forward \\% + \tsSymbol{transmitter_bidirectional}& transmitter bidirectional \\% + \tsSymbol{loop_transmitter} & loop transmitter \\% + \tsSymbol{route} & route \\% + \tsSymbol{direction_control} & direction control \\% + \tsSymbol{platform} & platform \\% + \tsSymbol{level_crossing} & level crossing \\% + \tsSymbol[2.0]{bridge} & bridge \\% + \tsSymbol[1.4]{hump} & hump \\% + \tsSymbol{pylon} & pylons \\% + \tsSymbol{interlocking} & interlocking \\% + \tsSymbol[1.4]{distant_power_off} & distant power off \\% + \tsSymbol[1.4]{power_off} & power off \\% + \tsSymbol[1.4]{power_on} & power on \\% + \tsSymbol[1.4]{distant_pantograph_down}& distant pantograph down \\% + \tsSymbol[1.4]{pantograph_down} & pantograph down \\% + \tsSymbol[1.4]{pantograph_up} & pantograph up \\% + \tsSymbol[1.4]{wire_limit} & wire limit \\% + \tsSymbol[2.0]{track_distance} & track distance \\% + \tsSymbol{train_berth} & train berth \\% + \tsSymbol{measure_line} & measure line \\% + \tsSymbol{hectometer} & hectometer \\% + \tsSymbol{track_marking} & track marking \\% + \end{xltabular}% +}% +%%%%%%%%%%%%%%% +\endinput% +%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex index 41e831304bb..b26089fc759 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.code.tex @@ -1,6 +1,6 @@ %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % @@ -9,15 +9,54 @@ \RequirePackage{tikz,etoolbox,lmodern}% % %%%%%%%%%%%%%%% -% symbol definitions +% loading sublibraries %%%%%%%%%%%%%%% -\usetikzlibrary{trackschematic.topology}% -\usetikzlibrary{trackschematic.trafficcontrol}% -\usetikzlibrary{trackschematic.vehicles}% -\usetikzlibrary{trackschematic.constructions}% -\usetikzlibrary{trackschematic.messures}% -% \usetikzlibrary{trackschematic.i18n}% -% +% \usetikzlibrary{trackschematic.topology}% +% \usetikzlibrary{trackschematic.trafficcontrol}% +% \usetikzlibrary{trackschematic.vehicles}% +% \usetikzlibrary{trackschematic.constructions}% +% \usetikzlibrary{trackschematic.electrics}% +% \usetikzlibrary{trackschematic.measures}% +%%%%%%%%%%%%%%% +%% template for new symbol definitions +%%%%%%%%%%%%%%% +% % +% \newcommand\XXXX{}% just for safety +% \def\XXXX[#1]#2(#3)#4(#5){% \XXXX[options] at (coord) label (name); +% \pic[#1] at (#3) {XXXX={#2/#4/#5}}% symbol +% }% +% % tikz keys +% \pgfkeys{% +% /tikz/trackschematic/.is family,% +% /tikz/trackschematic//.cd,% +% }% +% % symbol definition +% \tikzset{% +% pics/XXXX/.default=,% +% pics/XXXX/.style args={#1/#2/#3}{code={% +% %% settings +% \def\coordcommand{#1}% beware of leading and tailing spaces! +% \def\labelcommand{#2}% beware of leading and tailing spaces! +% \def\labelcontent{#3}% +% %% symbol marker +% % +% %% label +% \ifdefstring{\labelcontent}{}{}{% label NOT empty +% \coordinate (label-coord) at (coord);% +% \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default +% \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% +% \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% +% }% +% \node at (label-coord) {\footnotesize \labelcontent};% +% }% +% }},% END of pics/XXXX/.style args={#1/#2/#3} +% % symbology entry +% symbology_XXXX/.pic = {% +% \maintrack (0,0) -- (6,0);% +% \XXXX at (3,0);% +% },% +% }% +% % %%%%%%%%%%%%%%% \endinput% %
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex index a8713de5119..d36e3bece1c 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.constructions.code.tex @@ -1,6 +1,9 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % @@ -48,6 +51,7 @@ %% side side/.value required,% left, right OR both side/.store in=\side,% left, right OR both + side=right,% DEFAULT /tikz/side/.forward to=/tikz/trackschematic/constructions/side,% %% width width/.store in=\objectwidth,% default width 0.5cm @@ -105,7 +109,12 @@ \path ($-0.5*(\objectlength,0) + \sidefactor*(0,0.3)$) --% ($ 0.5*(\objectlength,0) + \sidefactor*(0,0.3)$);% part 2 }% - }},% + }},% END pics/platform/.style args={#1} + % symbology entry + symbology_platform/.pic = {% + \maintrack (0,0) -- (6,0);% + \platform[side=left] at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -244,7 +253,12 @@ }% }% END \ifdefstring{\barrier}{semi} }% END \ifdefstring{\barrier}{full} - }},% + }},% END pics/level_crossing/.style args={#1} + % symbology entry + symbology_level_crossing/.pic = {% + \maintrack (0,0) -- (6,0);% + \levelcrossing[barrier=semi] at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -312,7 +326,12 @@ }% END \ifdefstring{\side}{right} }% END \ifdefstring{\side}{left} }% END \ifdefstring{\side}{both} - }},% + }},% END pics/bridge/.style args={#1} + % symbology entry + symbology_bridge/.pic = {% + \bridge[] at (3,0);% first + \maintrack (0,0) -- (6,0);%% secound + },% }% % %%%%%%%%%%%%%%% @@ -340,7 +359,11 @@ \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 , 0.15) circle (0.15); % human dot - }},% + }},% END pics/interlocking/.style args={#1} + % symbology entry + symbology_interlocking/.pic = { + \interlocking at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -381,7 +404,61 @@ \path ( 0.1,-0.1) -- ++(0,-0.25); \path ( 0.2,-0.1) -- ++(0,-0.15); \path ( 0.3,-0.1) -- ++(0,-0.05); - }},% + }},% END pics/hump/.style args={#1} + % symbology entry + symbology_hump/.pic = {% + \secondarytrack (0,0) -- (6,0);% + \hump at (3,0);% + },% +}% +% +% +%%%%%%%%%%%%%%% +% symbol pylon +%%%%%%%%%%%%%%% +% +%% command +\newcommand\pylon{}% just for safety +\def\pylon[#1]#2(#3){% \pylon[options] at (coord); + \pic[#1] at (#3) {pylon={#2}}% symbol +}% +%% symbol definition +\tikzset{% + pics/pylon/.default=,% + pics/pylon/.style args={#1}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + % + \ifdefstring{\side}{left}{% side + \pgfmathsetmacro{\sidefactor}{1}% + }{% + \ifdefstring{\side}{right}{% side + \pgfmathsetmacro{\sidefactor}{-1}% + }{% + \ifdefstring{\side}{both}{% side + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/constructions/side}{“left“, “right“ OR “both“ as key required}}% + }% + }% + }% end \ifdefstring{\side} + %% pylon shape + \tikzset{every path/.style={draw=\foreground,line width=0.5pt}};% + \ifdefstring{\side}{both}{% double side + \path (0,-0.5) circle [radius=0.075];% part 1 + \path (0, 0.5) circle [radius=0.075];% part 2 + \path (0,-0.425) -- (0, 0.425);% part 3 + }{% single side + \path ($\sidefactor*(0,0.5)$) circle [radius=0.075];% part 1 + \path ($\sidefactor*(0,0.425)$) -- ++($\sidefactor*(0,-0.7)$);% part 2 + }% + }},% END pics/pylon/.style args={#1} + % symbology entry + symbology_pylon/.pic = {% + \maintrack (0,0) -- (6,0);% + \pylon[side=left] at (1,0);% + \pylon[side=left] at (3,0);% + \pylon[side=left] at (5,0);% + },% }% % %%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex new file mode 100644 index 00000000000..70956611e63 --- /dev/null +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.electrics.code.tex @@ -0,0 +1,611 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% +%% symbol library for TikZ track schematics +% +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) +% +% Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. +% +\ProvidesFileRCS{tikzlibrarytrackschematic.electrics.code.tex}% +% +%%%%%%%%%%%%%%% +% global settings +%%%%%%%%%%%%%%% +\RequirePackage{tikz,etoolbox,lmodern}% +\usetikzlibrary{calc,intersections,arrows.meta}% +% +% https://tex.stackexchange.com/questions/56353/extract-x-y-coordinate-of-an-arbitrary-point-on-curve-in-tikz +\providecommand{\gettikzxy}[3]{% + \tikz@scan@one@point\pgfutil@firstofone#1\relax% + \edef#2{\the\pgf@x}% + \edef#3{\the\pgf@y}% +}% +% +%%%%%%%%%%%%%%% +% tikz keys for multiple use +%%%%%%%%%%%%%%% +% +\pgfkeys{% + /tikz/trackschematic/.is family,% + /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/.value required,% forward, backward OR bidirectional + face/.store in=\face,% forward, backward OR bidirectional + /tikz/face/.forward to=/tikz/trackschematic/face,% + /tikz/forward/.code={\pgfkeys{/tikz/trackschematic/face=forward}},% + /tikz/backward/.code={\pgfkeys{/tikz/trackschematic/face=backward}},% + /tikz/bidirectional/.code={\pgfkeys{/tikz/trackschematic/face=bidirectional}},% + %% traffic practice + traffic practice/.value required,% left OR right + traffic practice/.store in=\trafficpractice,% + /tikz/traffic practice/.forward to=/tikz/trackschematic/traffic practice,% + /tikz/position/.forward to=/tikz/trackschematic/traffic practice,% + %% label + shift label/.store in=\labelcoord,% (coord) + shift label=(none),% DEFAULT + /tikz/shift label/.forward to=/tikz/trackschematic/shift label,% +}% +\tikzset{traffic practice=right}% +% +\definecolor{ts-signal-blue}{HTML}{013ADF}% +% tikz keys +\pgfkeys{% + /tikz/trackschematic/electrics/.is family,% + /tikz/trackschematic/electrics/.cd,% + %% color hectometer + signal color/.store in=\signalcolor,% + signal color=ts-signal-blue,% DEFAULT + /tikz/electrics signal color/.forward to=/tikz/trackschematic/electrics/signal color,% +}% +%%%%%%%%%%%%%%%% +% symbol distant power off +%%%%%%%%%%%%%%% +%% command +\newcommand\distantpoweroff{}% just for safety +\def\distantpoweroff[#1]#2(#3)#4(#5){% \distantpoweroff[options] at (coord) label (name); + \pic[#1] at (#3) {distant_power_off={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/distant_power_off/.default=,% + pics/distant_power_off/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.45,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)% + ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.45,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.1,0)$);% symbol + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/distant_power_off/.style args={#1/#2/#3} + % symbology entry + symbology_distant_power_off/.pic = {% + \maintrack (0,0) -- (6,0);% + \distantpoweroff[forward] at (3,0) label ();% + },% +}% +% +%%%%%%%%%%%%%%%% +% symbol power off +%%%%%%%%%%%%%%% +%% command +\newcommand\poweroff{}% just for safety +\def\poweroff[#1]#2(#3)#4(#5){% \poweroff[options] at (coord) label (name); + \pic[#1] at (#3) {power_off={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/power_off/.default=,% + pics/power_off/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.5,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.1,0)$)% + ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.5,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.1,0)$)% + ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.3,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/power_off/.style args={#1/#2/#3} + % symbology entry + symbology_power_off/.pic = {% + \maintrack (0,0) -- (6,0);% + \poweroff[forward] at (3,0) label ();% + },% +}% +% +%%%%%%%%%%%%%%%% +% symbol power on +%%%%%%%%%%%%%%% +%% command +\newcommand\poweron{}% just for safety +\def\poweron[#1]#2(#3)#4(#5){% \poweron[options] at (coord) label (name); + \pic[#1] at (#3) {power_on={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/power_on/.default=,% + pics/power_on/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.475,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0,-0.05) + \facefactor*(-0.11,0)$)% + ($\trafficfactor*\facefactor*(0,-0.5) + \facefactor*( 0.475,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0, 0.05) + \facefactor*(-0.11,0)$);% symbol part1 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.3) + \facefactor*( 0.325,0)$) rectangle% + ++($\trafficfactor*\facefactor*(0,-0.2) + \facefactor*( 0.05,0)$);% symbol part2 + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/power_on/.style args={#1/#2/#3} + % symbology entry + symbology_power_on/.pic = {% + \maintrack (0,0) -- (6,0);% + \poweron[forward] at (3,0) label ();% + },% +}% +% +%%%%%%%%%%%%%%%% +% symbol distant pantograph down +%%%%%%%%%%%%%%% +%% command +\newcommand\distantpantographdown{}% just for safety +\def\distantpantographdown[#1]#2(#3)#4(#5){% \distantpantographdown[options] at (coord) label (name); + \pic[#1] at (#3) {distant_pantograph_down={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/distant_pantograph_down/.default=,% + pics/distant_pantograph_down/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.23) + \facefactor*( 0.35,0)$) --% + ++($\trafficfactor*\facefactor*(0,-0.2)$) -- ++($\facefactor*(-0.05,0)$) --% + ++($\trafficfactor*\facefactor*(0, 0.15)$) -- cycle% + ($\trafficfactor*\facefactor*(0,-0.57) + \facefactor*( 0.45,0)$) --% + ++($\trafficfactor*\facefactor*(0, 0.2)$) -- ++($\facefactor*(0.05,0)$) --% + ++($\trafficfactor*\facefactor*(0,-0.15)$) -- cycle;% symbol + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/distant_pantograph_down/.style args={#1/#2/#3} + % symbology entry + symbology_distant_pantograph_down/.pic = {% + \maintrack (0,0) -- (6,0);% + \distantpantographdown[forward] at (3,0) label ();% + },% +}% +% +% +%%%%%%%%%%%%%%%% +% symbol pantograph down +%%%%%%%%%%%%%%% +%% command +\newcommand\pantographdown{}% just for safety +\def\pantographdown[#1]#2(#3)#4(#5){% \pantographdown[options] at (coord) label (name); + \pic[#1] at (#3) {pantograph_down={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/pantograph_down/.default=,% + pics/pantograph_down/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.18) + \facefactor*( 0.4 ,0)$) --% + ++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*( 0.03,0)$) --% + ++($\trafficfactor*\facefactor*(0,-0.38)$) --% + ++($\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 + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/pantograph_down/.style args={#1/#2/#3} + % symbology entry + symbology_pantograph_down/.pic = {% + \maintrack (0,0) -- (6,0);% + \pantographdown[forward] at (3,0) label ();% + },% +}% +% +% +%%%%%%%%%%%%%%%% +% symbol pantograph up +%%%%%%%%%%%%%%% +%% command +\newcommand\pantographup{}% just for safety +\def\pantographup[#1]#2(#3)#4(#5){% \pantographup[options] at (coord) label (name); + \pic[#1] at (#3) {pantograph_up={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/pantograph_up/.default=,% + pics/pantograph_up/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\trafficfactor*\facefactor*(0,-0.4 ) + \facefactor*( 0.62,0)$) --% + ++($\trafficfactor*\facefactor*(0,-0.03) + \facefactor*(-0.03,0)$) --% + ++($\facefactor*(-0.38,0)$) --% + ++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*(-0.03,0)$) --% + ++($\trafficfactor*\facefactor*(0, 0.03) + \facefactor*( 0.03,0)$) --% + ++($\facefactor*( 0.38,0)$) -- cycle;% symbol + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/pantograph_up/.style args={#1/#2/#3} + % symbology entry + symbology_pantograph_up/.pic = {% + \maintrack (0,0) -- (6,0);% + \pantographup[forward] at (3,0) label ();% + },% +}% +% +% +%%%%%%%%%%%%%%%% +% symbol wire limit +%%%%%%%%%%%%%%% +%% command +\newcommand\wirelimit{}% just for safety +\def\wirelimit[#1]#2(#3)#4(#5){% \wirelimit[options] at (coord) label (name); + \pic[#1] at (#3) {wire_limit={#2/#4/#5}}% symbol +}% +%% +%% symbol definition +\tikzset{% + pics/wire_limit/.default=,% + pics/wire_limit/.style args={#1/#2/#3}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + \def\labelcommand{#2}% beware of leading and tailing spaces! + \def\labelcontent{#3}% + %% symbol marker + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + %% face setup + \ifdefstring{\face}{forward}{% face + \pgfmathsetmacro{\facefactor}{1}% + \def\align{left}% + }{% + \ifdefstring{\face}{backward}{% face + \pgfmathsetmacro{\facefactor}{-1}% + \def\align{right}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“ OR “backward“ as key required}}% + }% + }% end \ifdefstring{\face} + % + %% signal pole + \path[draw=\foreground,line width=1pt] (0,0) -- ++($\trafficfactor*\facefactor*(0,-0.4)$) -- ++($\facefactor*(0.4,0)$);% signal pole + %% signal marker + \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.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 + \path[fill=\background]% + ($\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)$) -- cycle;% symbol + \path[fill=\signalcolor]% + ($\trafficfactor*\facefactor*(0,-0.3 ) + \facefactor*( 0.4 ,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 + \path[fill=\background]% + ($\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)$) -- cycle;% symbol + %% label + \tikzset{every node/.style={text=\foreground,inner sep=1pt}};% + \ifdefstring{\labelcontent}{}{}{% label NOT empty + \coordinate (label-coord) at ($\trafficfactor*\facefactor*(0,-0.4)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (label-coord) at ($(label-coord)+(\labelcoordX,\labelcoordY)$);% + }% + \node[\align] at (label-coord) {\footnotesize \labelcontent};% + }% + }},% END of pics/wire_limit/.style args={#1/#2/#3} + % symbology entry + symbology_wire_limit/.pic = {% + \maintrack (0,0) -- (6,0);% + \wirelimit[forward] at (3,0) label ();% + },% +}% +% +% +%%%%%%%%%%%%%%% +% TODO: +% * documentation +% +%%%%%%%%%%%%%%% +\endinput% +%
\ No newline at end of file diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.messures.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex index 290701b919f..ac636773919 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.messures.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.measures.code.tex @@ -1,10 +1,13 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % -\ProvidesFileRCS{tikzlibrarytrackschematic.messures.code.tex}% +\ProvidesFileRCS{tikzlibrarytrackschematic.measures.code.tex}% % %%%%%%%%%%%%%%% % global settings @@ -62,12 +65,12 @@ % % tikz keys \pgfkeys{% - /tikz/trackschematic/messures/.is family,% - /tikz/trackschematic/messures/.cd,% + /tikz/trackschematic/measures/.is family,% + /tikz/trackschematic/measures/.cd,% %% color hectometer color/.store in=\hectometercolor,% color=\foreground!50!\background,% DEFAULT - /tikz/hectometer color/.forward to=/tikz/trackschematic/messures/color,% + /tikz/hectometer color/.forward to=/tikz/trackschematic/measures/color,% }% %%%%%%%%%%%%%%%% % symbol train berth @@ -149,7 +152,12 @@ \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} + % symbology entry + symbology_train_berth/.pic = {% + \maintrack (0,0) -- (6,0);% + \berth[forward] at (3,0) length (length);% + },% }% % %%%%%%%%%%%%%%% @@ -158,10 +166,18 @@ % %% command \newcommand\trackdistance{}% just for safety -\def\trackdistance#1(#2)#3(#4)#5(#6){% \trackdistance between (coord1) and (coord2) label (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 node[hectometer base=(current bounding box.center),text=\foreground,midway,sloped,rotate=90] {#6};% label }% +% symbology entry +\tikzset{% + symbology_track_distance/.pic = {% + \maintrack (0,-0.5) -- (6,-0.5);% + \maintrack (0, 0.5) -- (6, 0.5);% + \trackdistance between (3, 0.5) and (3,-0.5) distance (distance);% + },% +}% % %%%%%%%%%%%%%%% % symbol hectometer posts @@ -174,16 +190,16 @@ }% % tikz keys \pgfkeys{% - /tikz/trackschematic/messures/hectometer/.is family,% - /tikz/trackschematic/messures/hectometer/.cd,% + /tikz/trackschematic/measures/hectometer/.is family,% + /tikz/trackschematic/measures/hectometer/.cd,% %% hectometer base base/.value required,% base/.store in=\basecoord,% - /tikz/hectometer base/.forward to=/tikz/trackschematic/messures/hectometer/base,% + /tikz/hectometer base/.forward to=/tikz/trackschematic/measures/hectometer/base,% %% hectometer base orientation/.value required,% orientation/.store in=\orientation,% - /tikz/orientation/.forward to=/tikz/trackschematic/messures/hectometer/orientation,% + /tikz/orientation/.forward to=/tikz/trackschematic/measures/hectometer/orientation,% }% %% symbol definition \tikzset{% @@ -205,7 +221,7 @@ \ifdefstring{\orientation}{right}{% orientation \def\align{left}% }{% error message - \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/messures/hectometer/orientation}{“left“ OR “right“ as key required}}% + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/measures/hectometer/orientation}{“left“ OR “right“ as key required}}% }% }% end \ifdefstring{\orientation} %% calculation of coordinates @@ -230,18 +246,48 @@ \ifdefstring{\labelcontent}{}{}{% label NOT empty \node[font=\sffamily,text=\hectometercolor,rotate=-90,\orientation,align=\align,fill=\background] at (ts-hm-l) {\labelcontent};% }% - }},% + }},% END + % symbology entry + symbology_hectometer/.pic = {% + \tikzset{hectometer base={(0,-2)},orientation=right};% + \hectometer[] at (0,0) mileage (hectometer 1);% + \hectometer[] at (3,0) mileage (hectometer 2);% + \hectometer[shift label={(0.3,0)}] at (3.5,0) mileage (hectometer 3);% + \hectometer[] at (6,0) mileage (hectometer 4);% + },% }% % %%%%%%%%%%%%%%% -% symbol messureline +% symbol measureline +%%%%%%%%%%%%%%% +% +% command +\newcommand\measureline{}% just for safety +\def\measureline{\path[MeasureLine]}% \measureline (coord1) -- (coord2); +% +\tikzset{% + MeasureLine/.style={draw=\hectometercolor,dashed,shorten <=0.75cm,shorten >=0.75cm}, + % symbology entry + symbology_measure_line/.pic = {% + \measureline (0,0) -- (6,0);% + },% +}% +%%%%%%%%%%%%%%% +% symbol track marking %%%%%%%%%%%%%%% % % command -\newcommand\messureline{}% just for safety -\def\messureline{\path[MessureLine]}% \maintrack (coord1) -- (coord2); +\newcommand\trackmarking{}% just for safety +\def\trackmarking[#1]{\path[draw,TrackMark,#1]}% \trackmarking[color] (coord1) -- (coord2); % -\tikzset{MessureLine/.style={draw=\hectometercolor,dashed,shorten <=0.75cm,shorten >=0.75cm}}% +\tikzset{% + TrackMark/.style={line width=8pt, opacity=0.4, arrows = {Bar[line cap=round,line width=1pt,width=12pt]-Bar[line cap=round,line width=1pt,width=12pt]},shorten >=1pt,shorten <=1pt}, + % symbology entry + symbology_track_marking/.pic = {% + \maintrack (0,0) -- (6,0);% + \trackmarking[] (1,0) -- (5,0);% + },% +}% % %%%%%%%%%%%%%%% % TODO: diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex index 8ca7a669828..368986cce45 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.topology.code.tex @@ -1,6 +1,9 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % @@ -49,7 +52,6 @@ shift label=(none),% DEFAULT /tikz/shift label/.forward to=/tikz/trackschematic/shift label,% }% -% \pgfkeys{% /tikz/trackschematic/topology/.is family,% /tikz/trackschematic/topology/.cd,% @@ -66,23 +68,32 @@ points=none,% DEFAULT /tikz/points/.forward to=/tikz/trackschematic/topology/points,% }% -% options +% options for turnout and slip turnout \newtoggle{fouling_point}\settoggle{fouling_point}{false}% % %%%%%%%%%%%%%%% % symbol track %%%%%%%%%%%%%%% % -% tracks +% commands \newcommand\maintrack{}% just for safety -\def\maintrack{\path[draw,MainTrack]}% \maintrack (coord1) -- (coord2); +\def\maintrack{\path[draw=\foreground,MainTrack]}% \maintrack (coord1) -- (coord2); \newcommand\secondarytrack{}% just for safety -\def\secondarytrack{\path[draw,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2); +\def\secondarytrack{\path[draw=\foreground,SecondaryTrack]}% \secondarytrack (coord1) -- (coord2); \newcommand\sidetrack{}% just for safety \def\sidetrack{\path[draw,SecondaryTrack]}% alias for \secondarytrack % -\tikzset{MainTrack/.style={line width=2pt,\foreground}}% -\tikzset{SecondaryTrack/.style={line width=0.7pt,\foreground}}% +%% symbol definition +\tikzset{% + MainTrack/.style={line width=2pt},% + % symbology entry + symbology_main_track/.pic = {\maintrack (0,0) -- (6,0);}% +}% +\tikzset{% + SecondaryTrack/.style={line width=0.7pt},% + % symbology entry + symbology_secondary_track/.pic = {\secondarytrack (0,0) -- (6,0);}% +}% % %%%%%%%%%%%%%%% % symbol track number @@ -117,7 +128,13 @@ }% \node at (ts-tl-l) {\labelcontent};% }% - }},% + }},% END pics/track_label/.style args={#1/#2/#3} + % + % symbology entry + symbology_track_label/.pic = {% + \maintrack (0,0) -- (6,0);% + \tracklabel at (3,0) label (label);% + },% }% % %%%%%%%%%%%%%%% @@ -156,13 +173,26 @@ }% }% end \ifdefstring{\face} %% symbol - \ifdefstring{\friction}{none}{% friction - \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 - }{ - \path[draw=\foreground, line width=1pt] ($\facefactor*(-\friction,0) + \facefactor*( 0.1,0) + (0,0.2)$) -- ++($\facefactor*(-0.1,0)$) -- ++(0,-0.4) -- ++ ($\facefactor*( 0.1,0)$); % bufferstop marker + \ifdefstring{\friction}{none}{% none friction + \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 + }{% friction + \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 \fill[\foreground] (0,0) circle (0.06);% track closure indicator - } - }},% + }% + }},% END pics/bufferstop/.style args={#1} + % + % symbology entry + symbology_bufferstop/.pic = {% + \secondarytrack (0,0) -- (3,0);% + \bufferstop[forward] at (3,0);% + },% + % symbology entry + symbology_friction_bufferstop/.pic = {% + \maintrack (0,0) -- (3,0);% + \bufferstop[forward,friction=.5] at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -174,6 +204,7 @@ \def\trackclosure#1(#2){% \trackclosure at (coord); \pic at (#2) {track_closure={#1}}% symbol }% +% symbol definition \tikzset{% pics/track_closure/.default=,% pics/track_closure/.style args={#1}{code={% @@ -182,7 +213,13 @@ %% \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 - }},% end pics/track_closure/.style args={#1} + }},% END pics/track_closure/.style args={#1} + % + % symbology entry + symbology_track_closure/.pic = {% + \maintrack (0,0) -- (3,0);% + \trackclosure at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -304,7 +341,38 @@ }% }% end \ifdefstring{\points} % - }},% end pics/turnout/.style args={#1/#2/#3} + }},% END pics/turnout/.style args={#1/#2/#3} + % symbology entry + symbology_turnout/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left] at (3,0) label ();% + },% + symbology_turnout_fouling/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left,fouling point] at (3,0) label ();% + },% + symbology_turnout_manually/.pic = {% + \secondarytrack (0,0) -- (6,0);% + \secondarytrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left,operation=manual] at (3,0) label ();% + },% + symbology_turnout_points_right/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left,points=right] at (3,0) label ();% + },% + symbology_turnout_points_left/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left,points=left] at (3,0) label ();% + },% + symbology_turnout_points_moving/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \turnout[forward,branch=left,points=moving] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -369,26 +437,6 @@ }% }% }% - % - %% label - \tikzset{every node/.style={text=\foreground}};% - \ifdefstring{\labelcontentleft}{}{}{% label NOT empty - \coordinate (ts-sy-l1) at ($(2pt,0) + \branchfactor*(0, 10pt)$);% - \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default - \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% - \coordinate (ts-sy-l1) at ($(ts-sy-l1)+(\labelcoordX,\labelcoordY)$);% - }% - \node[left] at (ts-sy-l1) {\footnotesize \labelcontentleft};% - }% - \ifdefstring{\labelcontentright}{}{}{% label NOT empty - \coordinate (ts-sy-l2) at ($(2pt,0) + \branchfactor*(0,-10pt)$);% - \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default - \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% - \coordinate (ts-sy-l2) at ($(ts-sy-l2)-(\labelcoordX,\labelcoordY)$);% - }% - \node[right] at (ts-sy-l2) {\footnotesize \labelcontentright};% - }% - % %% fouling point indicator \iftoggle{fouling_point}{% \path[draw=\foreground] ( 0.7,0) -- ++($\branchfactor*(0, 0.7)$);% fouling point indicator @@ -471,13 +519,39 @@ }% }% % - }},% end of pics/slipturnout/.style args={#1/#2/#3/#4}{ + %% label + \tikzset{every node/.style={text=\foreground}};% + \ifdefstring{\labelcontentleft}{}{}{% label NOT empty + \coordinate (ts-sy-l1) at ($(2pt,0) + \branchfactor*(0, 10pt)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (ts-sy-l1) at ($(ts-sy-l1)+(\labelcoordX,\labelcoordY)$);% + }% + \node[left] at (ts-sy-l1) {\footnotesize \labelcontentleft};% + }% + \ifdefstring{\labelcontentright}{}{}{% label NOT empty + \coordinate (ts-sy-l2) at ($(2pt,0) + \branchfactor*(0,-10pt)$);% + \ifdefstring{\labelcoord}{(none)}{}{% initialize if NOT default + \gettikzxy{\labelcoord}{\labelcoordX}{\labelcoordY}% + \coordinate (ts-sy-l2) at ($(ts-sy-l2)-(\labelcoordX,\labelcoordY)$);% + }% + \node[right] at (ts-sy-l2) {\footnotesize \labelcontentright};% + }% + % + }},% END of pics/slipturnout/.style args={#1/#2/#3/#4} + % symbology entry + symbology_slip_turnout/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \maintrack (3,0) -- ++(-0.8,-0.8);% + \slipturnout[branch=left] at (3,0) label ()();% + },% }% % %%%%%%%%%%%%%%% % symbol crossing - using parts of turnout %%%%%%%%%%%%%%% -% +% command \newcommand\crossing{}% just for safety \def\crossing[#1]#2(#3)#4(#5){% \crossing[options] at (coord) label (name); \pic[#1] at (#3) {crossing={#2/#4/#5}}% symbol @@ -523,7 +597,14 @@ \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} + % symbology entry + symbology_diamond_crossing/.pic = {% + \maintrack (0,0) -- (6,0);% + \maintrack (3,0) -- ++(0.8,0.8);% + \maintrack (3,0) -- ++(-0.8,-0.8);% + \crossing[branch=left] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -587,7 +668,12 @@ \node[right] at (ts-dr-l) {\footnotesize \labelcontent};% }% % - }},% + }},% END pics/derailer/.style args={#1/#2/#3} + % symbology entry + symbology_derailer/.pic = {% + \secondarytrack (0,0) -- (6,0);% + \derailer[forward,branch=left] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex index d4a71850c63..07b2c09065c 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.trafficcontrol.code.tex @@ -1,6 +1,9 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % @@ -287,6 +290,56 @@ }{}% }{}% }},% end pics/signal/.style args={#1/#2/#3} + % symbology entry + symbology_distant_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \distantsignal[forward] at (3,0) label ();% + },% + % symbology entry + symbology_distant_speed_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \distantsignal[forward,distant speed={s}] at (3,0) label ();% + },% + % symbology entry + symbology_speed_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \speedsignal[forward,speed={s}] at (3,0) label ();% + },% + % symbology entry + symbology_block_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \blocksignal[forward] at (3,0) label ();% + },% + % symbology entry + symbology_route_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \routesignal[forward] at (3,0) label ();% + },% + % symbology entry + symbology_combined_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \signal[distant,block,route,forward,distant speed={ds},speed={s}] at (3,0) label ();% + },% + % symbology entry + symbology_shunt_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \shuntsignal[forward] at (3,0) label ();% + },% + % symbology entry + symbology_locked_shunt_signal/.pic = {% + \maintrack (0,0) -- (6,0);% + \shuntsignal[forward,locked] at (3,0) label ();% + },% + % symbology entry + symbology_shunt_limit/.pic = {% + \maintrack (0,0) -- (6,0);% + \shuntlimit[forward] at (3,0) label ();% + },% + % symbology entry + symbology_train_berth_sign/.pic = {% + \maintrack (0,0) -- (6,0);% + \berthsignal[forward] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -367,6 +420,21 @@ \node at (ts-cp-l) {\footnotesize \labelcontent};% }% }},% end pics/clearing_point/.style args={#1/#2/#3} + % symbology entry + symbology_clearing_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \clearingpoint[forward] at (3,0) label ();% + },% + % symbology entry + symbology_block_clearing_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \blockclearing[forward] at (3,0) label ();% + },% + % symbology entry + symbology_route_clearing_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \routeclearing[forward] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -442,6 +510,26 @@ \node at (ts-tm-l) {\footnotesize \labelcontent};% }% }},% end pics/transmitter/.style args={#1/#2/#3} + % symbology entry + symbology_transmitter/.pic = {% + \maintrack (0,0) -- (6,0);% + \balise[] at (3,0) label ();% + },% + % symbology entry + symbology_transmitter_forward/.pic = {% + \maintrack (0,0) -- (6,0);% + \balise[forward] at (3,0) label ();% + },% + % symbology entry + symbology_transmitter_bidirectional/.pic = {% + \maintrack (0,0) -- (6,0);% + \balise[bidirectional] at (3,0) label ();% + },% + % symbology entry + symbology_loop_transmitter/.pic = {% + \maintrack (0,0) -- (6,0);% + \transmitter[type=loop] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -489,7 +577,12 @@ ($\facefactor*(0.55,0) + \facefactor*\trafficfactor*(0,-0.55)$) and% ($\facefactor*(0.55,0) + \facefactor*\trafficfactor*(0,-0.25)$) ..% ($\facefactor*(0.4, 0) + \facefactor*\trafficfactor*(0,-0.15)$) --cycle;% eye contour - }},% + }},% END pics/view_point/.style args={#1} + % symbology entry + symbology_view_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \viewpoint[forward] at (3,0);% + },% }% % %%%%%%%%%%%%%%% @@ -548,7 +641,12 @@ }% \node[\align] at (ts-ma-l) {\footnotesize \labelcontent};% }% - }},% end pics/movement_authority_marker/.style args={#1/#2/#3} + }},% END pics/movement_authority_marker/.style args={#1/#2/#3} + % symbology entry + symbology_end_of_authority/.pic = {% + \maintrack (0,0) -- (6,0);% + \movementauthority[forward] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -608,7 +706,12 @@ }% \node[\align] at (ts-bp-l) {\footnotesize \labelcontent};% }% - }},% end pics/braking_point_marker/.style args={#1/#2/#3} + }},% END pics/braking_point_marker/.style args={#1/#2/#3} + % symbology entry + symbology_braking_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \brakingpoint[forward] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -669,7 +772,12 @@ }% \node at (ts-dp-l) {\footnotesize \labelcontent};% }% - }},% end pics/danger_point_marker/.style args={#1/#2/#3} + }},% END pics/danger_point_marker/.style args={#1/#2/#3} + % symbology entry + symbology_danger_point/.pic = {% + \maintrack (0,0) -- (6,0);% + \dangerpoint[forward] at (3,0) label ();% + },% }% % %%%%%%%%%%%%%%% @@ -700,7 +808,87 @@ \fill[\foreground] ($\facefactor*(-0.175,0)+(0,-0.15)$) --% ($\facefactor*(-0.175,0)+(0, 0.15)$) --% ($\facefactor*( 0.175,0)+(0, 0 )$) -- cycle;% - }},% + }},% END pics/route/.style args={#1} + % symbology entry + symbology_route/.pic = {% + \maintrack (0,0) -- (6,0);% + \route[forward] at (3,0);% + },% +}% +% +%%%%%%%%%%%%%%% +% symbol direction control +%%%%%%%%%%%%%%% +% command +\newcommand\directioncontrol{}% just for safety +\def\directioncontrol[#1]#2(#3){% \directioncontrol[options] at (coord); + \pic[#1] at (#3) {direction_control={#2}}% symbol +}% +% symbol definition +\tikzset{% + pics/direction_control/.default=,% + pics/direction_control/.style args={#1}{code={% + %% settings + \def\coordcommand{#1}% beware of leading and tailing spaces! + % + %% traffic practice setup + \ifdefstring{\trafficpractice}{left}{% branch + \pgfmathsetmacro{\trafficfactor}{-1}% + }{% + \ifdefstring{\trafficpractice}{right}{% branch + \pgfmathsetmacro{\trafficfactor}{1}% + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/trafficcontrol/traffic practice}{“left“ OR “right“ as key required}}% + }% + }% end \ifdefstring{\trafficpractice} + % + %% face setup + \ifdefstring{\face}{forward}{% face + \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.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 + \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.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 + }{% + \ifdefstring{\face}{backward}{% face + \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.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 + \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.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 + }{ + \ifdefstring{\face}{bidirectional}{% face + \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.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 + \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.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 + }{% error message + \pgfkeys{/errors/unknown choice value={/tikz/trackschematic/face}{“forward“, “backward“ OR “bidirectional“ as key required}}% + }% + }% + }% end \ifdefstring{\face} + %% frame + % \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); + }},% END pics/direction_control/.style args={#1} + % symbology entry + symbology_direction_control/.pic = {% + \maintrack (0,0) -- (2.9,0);% + \maintrack (3.1,0) -- (6,0);% + \directioncontrol[bidirectional] at (2,0);% + \directioncontrol[forward] at (4,0);% + },% }% % %%%%%%%%%%%%%%% diff --git a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex index 8ba0aeaa1b0..cf8aad3898d 100644 --- a/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex +++ b/Master/texmf-dist/tex/latex/tikz-trackschematic/tikzlibrarytrackschematic.vehicles.code.tex @@ -1,6 +1,9 @@ +%!TEX TS-program = pdflatexmk +%!TEX root = ../test/test.tex +% %% symbol library for TikZ track schematics % -% Copyright (c) 2018 - 2020, Martin Scheidt (ISC license) +% Copyright (c) 2018 - 2021, Martin Scheidt (ISC license) % % Permission to use, copy, modify, and/or distribute this file for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. % @@ -449,7 +452,57 @@ }% \ifdefstring{\labelalign}{center} \node[text=\foreground,anchor=\labelanchor,align=\labelalign] at (ts-v-l) {\footnotesize\emph{\labelcontent}};% label }% - }},% + }},% END pics/vehicles/.style args={#1/#2/#3} + % symbology entry + symbology_parked_vehicles/.pic = {% + \secondarytrack (0,0) -- (6,0);% + \parkedvehicles[] at (3,0) label ();% + },% + % symbology entry + symbology_train_shunt_mode/.pic = {% + \maintrack (0,0) -- (6,0);% + \shunting[forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_shunting/.pic = {% + \maintrack (0,0) -- (6,0);% + \shunting[movement,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_moving_slow/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[run=slow,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_moving/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[run=normal,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_moving_fast/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[run=fast,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_ghost/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[ghost,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_drive_automatic/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[operation=automatic,forward] at (5,0) label ();% + },% + % symbology entry + symbology_train_drive_human/.pic = {% + \maintrack (0,0) -- (6,0);% + \train[operation=manual,forward] at (5,0) label ();% + },% }% % %%%%%%%%%%%%%%% |