edugame-railway-operation/papercut_material/route_signals.tex

60 lines
2.2 KiB
TeX
Raw Normal View History

%!TEX TS-program = pdflatexmk
2020-06-19 10:25:04 +02:00
% Copyright 2020 Martin Scheidt (Attribution 4.0 International, CC-BY 4.0)
% You are free to copy and redistribute the material in any medium or format. You are free to remix, transform, and build upon the material for any purpose, even commercially. You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may not apply legal terms or technological measures that legally restrict others from doing anything the license permits. No warranties are given.
\documentclass{beamer}
\usepackage[
size=a4,
]{beamerposter}
\beamertemplatenavigationsymbolsempty
\def\ROOT{./..}
\usepackage{material}
\tikzset{
pics/route_signal_stop/.style args={#1}{
code={
\iftoggle{LeftHandTraffic}{
\draw[loosely dashdotted] (0,-1) -- ( 0,0) -- ++(8,0) -- ++(0,-1);
\draw[line width=4pt] (0,0) -- ++(0,1.5) -- ++(4, 0); % signal pole
\draw[line width=4pt,fill=base1!50] (5,1.5) circle (1); % signal screen
\draw[fill=#1] (5,1.5) circle (0.5); % signal aspect
\draw[double] (5,1) -- ++(0,1); % signal aspect
\node[right] at (0.2,1) {
\IfLanguage{english}{\Large route signal}
\IfLanguage{ngerman}{\Large Fahrstraßensignal}
}; % label
}{
\draw[loosely dashdotted] (0,1) -- ( 0,0) -- ++(8,0) -- ++(0,1);
\draw[line width=4pt] (0,0) -- ++(0,-1.5) -- ++(4, 0); % signal pole
\draw[line width=4pt,fill=base1!50] (5,-1.5) circle (1); % signal screen
\draw[fill=#1] (5,-1.5) circle (0.5); % signal aspect
\draw[double] (5,-1) -- ++(0,-1); % signal aspect
\node[right] at (0.2,-1) {
\IfLanguage{english}{\Large route signal}
\IfLanguage{ngerman}{\Large Fahrstraßensignal}
}; % label
}
}
},
pics/route_signal_stop/.default=signalred,
}
\begin{document}
\selectlanguage{english} % currently supported: english, ngerman
\settoggle{LeftHandTraffic}{true}
\tikzset{every path/.style={ultra thick}}
\begin{frame}
\vfill
\begin{tikzpicture}[font=\sffamily]
\foreach \x in {0,9.5,19}
\foreach \y in {0,5,10,15}
\pic at (\x,\y) {route_signal_stop};
\end{tikzpicture}
\vfil
\end{frame}
\end{document}