%!TEX TS-program = pdflatexmk % Copyright 2019 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. \documentclass[a4paper,landscape]{article} \usepackage[margin=0pt]{geometry} \pagestyle{empty} \usepackage{longtable,siunitx,tikz,adjustbox} \usepackage{listings} \lstset{ language=TeX, basicstyle=\ttfamily, columns=fullflexible, breaklines=true } \def\rootTrackschematic{../tikz-trackschematic} \renewcommand{\symbol}[1]{ \adjustbox{valign=c}{\begin{tikzpicture}[scale=1.0,transform shape] \input{\rootTrackschematic/snippets/#1} \path (-3,-1.1) rectangle (3,1.1); % background rectangle to unify every cell containing a symbol \end{tikzpicture}} } \newcommand{\code}[1]{\lstinputlisting[firstline=7]{\rootTrackschematic/snippets/#1}} \newcounter{symbolNo} \def\No{\stepcounter{symbolNo}\arabic{symbolNo}} \def\srcTrackschematic{\rootTrackschematic/src/tikzlibrarytrackschematic} \input{\srcTrackschematic.topology.code.tex} \input{\srcTrackschematic.trafficcontrol.code.tex} \input{\srcTrackschematic.vehicles.code.tex} \input{\srcTrackschematic.constructions.code.tex} \title{Snippets}\author{}\date{} \begin{document} \maketitle \centering \begin{longtable}{|r|l|c|l|c|} \hline No. & Name & Symbol & Code & Sub library \\ \endhead \hline \No & main track & \symbol{main_track.tikz} & \code{main_track.tikz} & \texttt{topology} \\ \hline \No & main line (double track) & \symbol{main_line.tikz} & \code{main_line.tikz} & \texttt{topology} \\ \hline \No & track distance (in \si{\metre}) & \symbol{track_distance.tikz} & \code{track_distance.tikz} & \texttt{topology} \\ \hline \No & secondary track & \symbol{secondary_track.tikz} & \code{secondary_track.tikz} & \texttt{topology} \\ \hline \No & track number & \symbol{track_number.tikz} & \code{track_number.tikz} & \texttt{topology} \\ \hline \No & turnout left (forward) & \symbol{turnout_left_forward.tikz} & \code{turnout_left_forward.tikz} & \texttt{topology} \\ \hline \No & turnout left (backward) & \symbol{turnout_left_backward.tikz} & \code{turnout_left_backward.tikz} & \texttt{topology} \\ \hline \No & turnout right (forward) & \symbol{turnout_right_forward.tikz} & \code{turnout_right_forward.tikz} & \texttt{topology} \\ \hline \No & turnout right (backward) & \symbol{turnout_right_backward.tikz} & \code{turnout_right_backward.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (forward)\\with fouling point indicator} & \symbol{turnout_with_fouling_left_forward.tikz} & \code{turnout_with_fouling_left_forward.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (backward)\\with fouling point indicator} & \symbol{turnout_with_fouling_left_backward.tikz} & \code{turnout_with_fouling_left_backward.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (forward)\\with fouling point indicator} & \symbol{turnout_with_fouling_right_forward.tikz} & \code{turnout_with_fouling_right_forward.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (backward)\\with fouling point indicator} & \symbol{turnout_with_fouling_right_backward.tikz} & \code{turnout_with_fouling_right_backward.tikz} & \texttt{topology} \\ \hline \No & double-slip turnout left & \symbol{double-slip_turnout_left.tikz} & \code{double-slip_turnout_left.tikz} & \texttt{topology} \\ \hline \No & double-slip turnout right & \symbol{double-slip_turnout_right.tikz} & \code{double-slip_turnout_right.tikz} & \texttt{topology} \\ \hline \No & diamond crossing left & \symbol{diamond_crossing_left.tikz} & \code{diamond_crossing_left.tikz} & \texttt{topology} \\ \hline \No & diamond crossing right & \symbol{diamond_crossing_right.tikz} & \code{diamond_crossing_right.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (forward)\\with points in right position} & \symbol{turnout_left_forward_right_position.tikz} & \code{turnout_left_forward_right_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (forward)\\with points in left position} & \symbol{turnout_left_forward_left_position.tikz} & \code{turnout_left_forward_left_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (forward)\\with moving points} & \symbol{turnout_left_forward_moving_points.tikz} & \code{turnout_left_forward_moving_points.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (backward)\\with points in right position} & \symbol{turnout_left_backward_right_position.tikz} & \code{turnout_left_backward_right_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (backward)\\with points in left position} & \symbol{turnout_left_backward_left_position.tikz} & \code{turnout_left_backward_left_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout left (backward)\\with moving points} & \symbol{turnout_left_backward_moving_points.tikz} & \code{turnout_left_backward_moving_points.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (forward)\\with points in right position} & \symbol{turnout_right_forward_right_position.tikz} & \code{turnout_right_forward_right_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (forward)\\with points in left position} & \symbol{turnout_right_forward_left_position.tikz} & \code{turnout_right_forward_left_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (forward)\\with moving points} & \symbol{turnout_right_forward_moving_points.tikz} & \code{turnout_right_forward_moving_points.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (backward)\\with points in right position} & \symbol{turnout_right_backward_right_position.tikz} & \code{turnout_right_backward_right_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (backward)\\with points in left position} & \symbol{turnout_right_backward_left_position.tikz} & \code{turnout_right_backward_left_position.tikz} & \texttt{topology} \\ \hline \No & \parbox[c]{5cm}{turnout right (backward)\\with moving points} & \symbol{turnout_right_backward_moving_points.tikz} & \code{turnout_right_backward_moving_points.tikz} & \texttt{topology} \\ \hline \No & derailer left (forward) & \symbol{derailer_left_forward.tikz} & \code{derailer_left_forward.tikz} & \texttt{topology} \\ \hline \No & derailer left (backward) & \symbol{derailer_left_backward.tikz} & \code{derailer_left_backward.tikz} & \texttt{topology} \\ \hline \No & derailer right (forward) & \symbol{derailer_right_forward.tikz} & \code{derailer_right_forward.tikz} & \texttt{topology} \\ \hline \No & derailer right (backward) & \symbol{derailer_right_backward.tikz} & \code{derailer_right_backward.tikz} & \texttt{topology} \\ \hline \No & bufferstop (forward) & \symbol{bufferstop_forward.tikz} & \code{bufferstop_forward.tikz} & \texttt{topology} \\ \hline \No & bufferstop (backward) & \symbol{bufferstop_backward.tikz} & \code{bufferstop_backward.tikz} & \texttt{topology} \\ \hline \No & vehicles (parked) & \symbol{vehicles.tikz} & \code{vehicles.tikz} & \texttt{vehicles} \\ \hline \No & vehicles with label (parked) & \symbol{vehicles_with_label.tikz} & \code{vehicles_with_label.tikz} & \texttt{vehicles} \\ \hline \No & vehicle (parked) & \symbol{vehicle.tikz} & \code{vehicle.tikz} & \texttt{vehicles} \\ \hline \No & train (direction forward) & \symbol{train_direction_forward.tikz} & \code{train_direction_forward.tikz} & \texttt{vehicles} \\ \hline \No & train (direction backward) & \symbol{train_direction_backward.tikz} & \code{train_direction_backward.tikz} & \texttt{vehicles} \\ \hline \No & ghost train (direction forward) & \symbol{ghost_train_direction_forward.tikz} & \code{ghost_train_direction_forward.tikz} & \texttt{vehicles} \\ \hline \No & ghost train (direction backward)& \symbol{ghost_train_direction_backward.tikz} & \code{ghost_train_direction_backward.tikz} & \texttt{vehicles} \\ \hline \No & train moving (forward) & \symbol{train_moving_forward.tikz} & \code{train_moving_forward.tikz} & \texttt{vehicles} \\ \hline \No & train moving (backward) & \symbol{train_moving_backward.tikz} & \code{train_moving_backward.tikz} & \texttt{vehicles} \\ \hline \No & train moving slow (forward) & \symbol{train_moving_slow_forward.tikz} & \code{train_moving_slow_forward.tikz} & \texttt{vehicles} \\ \hline \No & train moving slow (backward) & \symbol{train_moving_slow_backward.tikz} & \code{train_moving_slow_backward.tikz} & \texttt{vehicles} \\ \hline \No & train moving fast (forward) & \symbol{train_moving_fast_forward.tikz} & \code{train_moving_fast_forward.tikz} & \texttt{vehicles} \\ \hline \No & train moving fast (backward) & \symbol{train_moving_fast_backward.tikz} & \code{train_moving_fast_backward.tikz} & \texttt{vehicles} \\ \hline \No & \parbox[c]{4cm}{train in shunting mode\\(direction forward)} & \symbol{train_shunt_mode_forward.tikz} & \code{train_shunt_mode_forward.tikz} & \texttt{vehicles} \\ \hline \No & \parbox[c]{4cm}{train in shunting mode\\(direction backward)} & \symbol{train_shunt_mode_backward.tikz} & \code{train_shunt_mode_backward.tikz} & \texttt{vehicles} \\ \hline \No & train shunting (forward) & \symbol{train_shunting_forward.tikz} & \code{train_shunting_forward.tikz} & \texttt{vehicles} \\ \hline \No & train shunting (backward) & \symbol{train_shunting_backward.tikz} & \code{train_shunting_backward.tikz} & \texttt{vehicles} \\ \hline \No & \parbox[c]{4cm}{train operated automatic\\(direction forward)} & \symbol{train_drive_automatic.tikz} & \code{train_drive_automatic.tikz} & \texttt{vehicles} \\ \hline \No & \parbox[c]{4cm}{train operated by human\\(direction forward)} & \symbol{train_drive_human.tikz} & \code{train_drive_human.tikz} & \texttt{vehicles} \\ \hline \No & view point (forward) & \symbol{view_point_forward.tikz} & \code{view_point_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & view point (backward) & \symbol{view_point_backward.tikz} & \code{view_point_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & distant signal (forward) & \symbol{distant_signal_forward.tikz} & \code{distant_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4cm}{distant signal\\with speed indicator} & \symbol{distant_speed_signal_forward.tikz} & \code{distant_speed_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & distant signal (backward) & \symbol{distant_signal_backward.tikz} & \code{distant_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4cm}{distant signal\\with speed indicator} & \symbol{distant_speed_signal_backward.tikz} & \code{distant_speed_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & speed signal (forward) & \symbol{speed_signal_forward.tikz} & \code{speed_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & speed signal (backward) & \symbol{speed_signal_backward.tikz} & \code{speed_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & block signal (forward) & \symbol{block_signal_forward.tikz} & \code{block_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & block signal (backward) & \symbol{block_signal_backward.tikz} & \code{block_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & route signal (forward) & \symbol{route_signal_forward.tikz} & \code{route_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & route signal (backward) & \symbol{route_signal_backward.tikz} & \code{route_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4cm}{combined signal\\(distant and block signal)} & \symbol{combined_signal_forward.tikz} & \code{combined_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt signal (forward) & \symbol{shunt_signal_forward.tikz} & \code{shunt_signal_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt signal (backward) & \symbol{shunt_signal_backward.tikz} & \code{shunt_signal_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt signal locked (forward) & \symbol{shunt_signal_forward_locked.tikz} & \code{shunt_signal_forward_locked.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt signal locked (backward) & \symbol{shunt_signal_backward_locked.tikz} & \code{shunt_signal_backward_locked.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt limit (forward) & \symbol{shunt_limit_forward.tikz} & \code{shunt_limit_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & shunt limit (backward) & \symbol{shunt_limit_backward.tikz} & \code{shunt_limit_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & transmitter (below \& above) & \symbol{transmitter.tikz} & \code{transmitter.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4.5cm}{transmitter (below)\\with signal} & \symbol{transmitter_below_with_signal.tikz} & \code{transmitter_below_with_signal.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective forward} & \symbol{transmitter_forward.tikz} & \code{transmitter_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective backward} & \symbol{transmitter_backward.tikz} & \code{transmitter_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & \parbox[c]{4.5cm}{transmitter (below \& above)\\ effective bidirectional} & \symbol{transmitter_bidirectional.tikz} & \code{transmitter_bidirectional.tikz} & \texttt{trafficcontrol} \\ \hline \No & block end marker (forward) & \symbol{block_end_marker_forward.tikz} & \code{block_end_marker_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & block end marker (backward) & \symbol{block_end_marker_backward.tikz} & \code{block_end_marker_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & block clearing point (forward) & \symbol{block_clearing_point_forward.tikz} & \code{block_clearing_point_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & block clearing point (backward) & \symbol{block_clearing_point_backward.tikz} & \code{block_clearing_point_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & route clearing point (forward) & \symbol{route_clearing_point_forward.tikz} & \code{route_clearing_point_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & route clearing point (backward) & \symbol{route_clearing_point_backward.tikz} & \code{route_clearing_point_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & clearing point & \symbol{clearing_point.tikz} & \code{clearing_point.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth sign (forward) & \symbol{train_berth_sign_forward.tikz} & \code{train_berth_sign_forward.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth sign (backward) & \symbol{train_berth_sign_backward.tikz} & \code{train_berth_sign_backward.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth shape & \symbol{train_berth_shape.tikz} & \code{train_berth_shape.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth shape bidirectional & \symbol{train_berth_shape_bidirectional.tikz} & \code{train_berth_shape_bidirectional.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth with different shape& \symbol{train_berth_shape_different.tikz} & \code{train_berth_shape_different.tikz} & \texttt{trafficcontrol} \\ \hline \No & train berth & \symbol{train_berth.tikz} & \code{train_berth.tikz} & \texttt{trafficcontrol} \\ \hline \No & platform (left) & \symbol{platform_left.tikz} & \code{platform_left.tikz} & \texttt{constructions} \\ \hline \No & platform (right) & \symbol{platform_right.tikz} & \code{platform_right.tikz} & \texttt{constructions} \\ \hline \No & platform (middle) & \symbol{platform_middle.tikz} & \code{platform_middle.tikz} & \texttt{constructions} \\ \hline \No & level crossing (single track) & \symbol{level_crossing_single.tikz} & \code{level_crossing_single.tikz} & \texttt{constructions} \\ \hline \No & level crossing (double track) & \symbol{level_crossing_double.tikz} & \code{level_crossing_double.tikz} & \texttt{constructions} \\ \hline \No & \parbox[c]{5cm}{level crossing (double track)\\with full closure} & \symbol{level_crossing_double_full_closure.tikz} & \code{level_crossing_double_full_closure.tikz} & \texttt{constructions} \\ \hline \No & bridge & \symbol{bridge.tikz} & \code{bridge.tikz} & \texttt{constructions} \\ \hline \No & \parbox[c]{5cm}{bridge\\with track beneath} & \symbol{bridge_track_beneath.tikz} & \code{bridge_track_beneath.tikz} & \texttt{constructions} \\ \hline \No & hump & \symbol{hump.tikz} & \code{hump.tikz} & \texttt{constructions} \\ \hline \No & interlocking & \symbol{interlocking.tikz} & \code{interlocking.tikz} & \texttt{constructions} \\ \hline \end{longtable} \end{document}