Debian Codegraph @

texmf-dist/doc/latex/tikz-trackschematic/tikz-trackschematic-examples/station_berg.tex

raw
1 %!TEX TS-program = pdflatexmk
2
3 % Copyright (c) 2018 - 2022, Martin Scheidt (ISC license)
4 % 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.
5
6 \documentclass[tikz,border=2]{standalone}
7 \usepackage{tikz-trackschematic} % loading the library
8
9 \begin{document}
10 \begin{tikzpicture}[font=\sffamily]
11 { % station names
12 \tikzset{every node/.style={foreground!50!background}};
13 \node[right,align=left] at ( 2,1.3) {to and from\\ Arnau};
14 \node at (21,3.3) {{\LARGE Bf Berg}};
15 \node[left,align=right] at (38,1.3) {to and from\\ Chamstadt};
16 }
17 % coordinates
18 \coordinate (A) at ( 1.5, 0);
19 \coordinate (B) at (38.5, 0);
20
21 \coordinate (E1) at ( 9 , 1);
22 \coordinate (E2) at (11 ,-1);
23 \coordinate (E3) at (25 , 2);
24 \coordinate (H1) at (15 , 2);
25 \coordinate (H2) at (26 , 1);
26
27 \coordinate (Y1) at (14 , 0);
28 \coordinate (Y2) at (15 , 0);
29 \coordinate (Y3) at (14 , 1);
30 \coordinate (Y4) at (16 , 1);
31 \coordinate (Y5) at (27 , 0);
32 \coordinate (Y6) at (12.8,-1);
33
34 \coordinate (S1) at ( 7 , 0);
35 \coordinate (S2) at (10 , 0);
36 \coordinate (S3) at (18 , 0);
37 \coordinate (S4) at (18 , 1);
38 \coordinate (S5) at (24 , 0);
39 \coordinate (S6) at (24 , 1);
40 \coordinate (S7) at (30 , 0);
41 \coordinate (S8) at (33 , 0);
42
43 \coordinate (T1) at ( 6 , 0);
44 \coordinate (T2) at (10.2, 1);
45 \coordinate (T3) at (23 , 2);
46 \coordinate (T4) at (34 , 0);
47
48 \coordinate (P1) at (21 , 0);
49 \coordinate (P2) at (21 , 1);
50
51 \coordinate (HM) at (0,-1.85);
52
53 { %% topology
54 % tracks
55 \maintrack (A) -- (B);
56 \maintrack (Y2) -- (Y4) -- (H2) -- (Y5);
57 \secondarytrack (E1) -- (Y4);
58 \secondarytrack (E2) -- ++( 2,0) -- (Y1);
59 \secondarytrack (Y3) -- (H1) -- (E3);
60
61 % track numbers
62 \tracklabel at (11.7, 1) label (12);
63 \tracklabel at (11.7,-1) label (10);
64 \tracklabel at (21 , 2) label (3);
65 \tracklabel at (P2) label (2);
66 \tracklabel at (P1) label (1);
67
68 % bufferstops
69 \bufferstop[backward] at (E1);
70 \bufferstop[backward] at (E2);
71 \bufferstop[forward] at (E3);
72
73 % turnouts
74 \tikzset{every node/.style={fouling point}};
75 \turnout[backward,branch=right] at (Y1) label (W1);
76 \turnout[forward ,branch=left ] at (Y2) label (W2);
77 \turnout[forward ,branch=left ] at (Y3) label (W3);
78 \turnout[backward,branch=right] at (Y4) label (W4);
79 \turnout[backward,branch=left ] at (Y5) label (W5);
80 \derailer[forward,branch=right] at (Y6) label (Gs6);
81 }
82 { %% traffic control
83 % signals
84 \distantsignal[forward] at (S1) label (Va);
85
86 \signal[distant,route,forward] at (S2) label (A);
87
88 \routesignal[backward] at (S3) label (P1);
89 \routesignal[backward] at (S4) label (P2);
90
91 \routesignal[forward] at (S5) label (N1);
92 \routesignal[forward] at (S6) label (N2);
93
94 \signal[distant,route,backward] at (S7) label (F);
95
96 \distantsignal[backward] at (S8) label (Vf);
97
98 % routes
99 \route[backward] at (20,0);
100 \route[forward] at (22,0);
101 \route[backward] at (20,1);
102 \route[forward] at (22,1);
103
104 % clearing points
105 \tikzset{every node/.style={backward}};
106 \clearingpoint[] at (10 , 0) label ();
107 \clearingpoint[] at (12.3,-1) label ();
108 \clearingpoint[] at (12.8, 0) label ();
109 \clearingpoint[] at (13.4, 1) label ();
110 \clearingpoint[] at (14.9, 1) label ();
111 \coordinate (H3) at ($(Y2)!0.5!(Y4)$); % using tikz calc library
112 \clearingpoint[rotate=45] at (H3) label ();
113 \coordinate (H4) at ($(Y3)!0.8!(H1)$); % using tikz calc library
114 \clearingpoint[rotate=45] at (H4) label ();
115 \clearingpoint[] at (16 , 0) label ();
116 \clearingpoint[] at (18 , 1) label ();
117 \clearingpoint[] at (18 , 0) label ();
118 \clearingpoint[] at (24 , 1) label ();
119 \clearingpoint[] at (24 , 0) label ();
120 \clearingpoint[] at (26 , 0) label ();
121 \clearingpoint[] at (27.5, 0) label ();
122 \coordinate (H5) at ($(Y5)!0.8!(H2)$); % using tikz calc library
123 \clearingpoint[rotate=315] at (H5) label ();
124 \clearingpoint[] at (30 , 0) label ();
125 }
126 { %% vehicles
127 \train[run=normal,forward] at (T1) label (RB);
128 \train[run=fast,backward] at (T4) label (IC);
129 \parkedvehicles[length=3cm] at (T3) label (WG);
130 \parkedvehicles[length=1cm] at (T2) label (Tfz);
131 }
132 { %% constructions
133 % platforms
134 \platform[side=right] at (P2);
135 \platform[side=left ] at (P1);
136 }
137 { %% measures
138 % hectometer posts
139 \tikzset{hectometer base={(HM)},orientation=right};
140 \hectometer[] at (S1) label ( 7.200);
141 \hectometer[] at (S2) label ( 8.200);
142 \hectometer[] at (12.8,-1) label ( 8.400);
143 \hectometer[] at (16 , 0) label ( 8.600);
144 \hectometer[] at (S3) label ( 8.700);
145 \hectometer[] at (19 , 0) label ( 8.750);
146 \hectometer[] at (23 , 0) label ( 9.000);
147 \hectometer[] at (S5) label ( 9.100);
148 \hectometer[] at (26 , 0) label ( 9.200);
149 \hectometer[] at (27.5, 0) label ( 9.300);
150 \hectometer[] at (S7) label ( 9.500);
151 \hectometer[] at (S8) label (10.500);
152 }
153 \end{tikzpicture}
154 \end{document}