summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/tikz-palattice/example4_labels.tex
blob: bfd312ba2470aeee13689f5f3594a6f19a5cd211 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
%% example4_labels.tex
%% Copyright 2015 J. Schmidt
%% tikz-palattice LaTeX package
% 
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
% 
% This work has the LPPL maintenance status `maintained'.
% 
% The Current Maintainer of this work is J. Schmidt.
% 
% This work consists of the files tikz-palattice.sty and tikz-palattice_documentation.tex
% and the 5 example files example1_linear.tex, example2_circular.tex,
% example3_coordinates.tex, example4_labels.tex and elsa.tex

\documentclass[]{standalone}
\usepackage[ngerman]{babel}
\usepackage[utf8]{inputenc}
\usepackage{tikz-palattice}


\begin{document}
\begin{lattice}[0.5]
\drawrule{(-9,-11)}[5][3][0.2]

\northlabels % labels "inside" ring
\setlabeldistance{0.5}
\rotate{-35}
\marker{start}[0.5]

\drift{0.03415}
\quadrupole{QD1}{0.4997}
\drift{0.19515}
\kicker{KV01}{0.1}
\drift{1.79875}
\quadrupole{SQ1}{0.45}[0.2]
\drift{1.01375}
\quadrupole{LQ1}{0.45}[0.2]
\drift{0.2065}
\sextupole{SX1}{0.287}
\drift{0.13665}
\quadrupole{QF2}{0.4997}
\drift{1.05365}
\kicker{KV02}{0.1}
\drift{0.3077}
\dipole{M2}{2.875}{15}
\drift{0.30145}
\quadrupole{QD3}{0.4997}
\drift{0.13665}
\sextupole{SD3}{0.287}
\drift{0.4305}
\kicker{KV03}{0.1}
\drift{1.84183}
\drift{1.84183}

% labels rotated (with manually set anchor)
\rotatelabels{65}[west]
\quadrupole{QF4}{0.4997}
\drift{0.13665}
\sextupole{SF4}{0.287}
\drift{0.214}
\kicker{KV04}{0.1}
\drift{0.7237}
\rotatelabels{0}

\dipole{M4}{2.875}{15}
\drift{0.30145}
\quadrupole{QD5}{0.4997}
\drift{0.09715}

% labels with changed fontsize
\setlabelfont{\tiny}
\kicker{KV05}{0.1}
\setlabelfont{\normalsize}

\drift{1.2642}
\dipole{M5}{2.875}{15}
\drift{0.30145}
\quadrupole{QF6}{0.4997}
\drift{0.94465}
\kicker{KV06}{0.1}
\drift{0.4167}
\dipole{M6}{2.875}{15}
\drift{0.30145}

%labels rotated (with manually set anchor) within scope (forget changes after scope)
\begin{scope}
\rotatelabels{-65}[east]
\quadrupole{QD7}{0.4997}
\drift{0.19415}
\kicker{KV07}{0.1}
\end{scope}


\drift{1.1672}
\dipole{M7}{2.875}{15}
\drift{0.30145}
\quadrupole{QF8}{0.4997}
\drift{1.02365}
\kicker{KV08}{0.1}
\drift{0.3377}
\dipole{M8}{2.875}{15}
\drift{0.30145}
\quadrupole{QD9}{0.4997}
\drift{0.30135}
\dipole{M9}{2.875}{15}
\drift{0.3208}
\kicker{KV09}{0.1}
\drift{1.04065}
\quadrupole{QF10}{0.4997}
\drift{0.30135}
\dipole{M10}{2.875}{15}
\drift{0.7203}
\kicker{KV10}{0.1}
\drift{0.2175}
\sextupole{SD10}{0.287}
\drift{0.13665}
\quadrupole{QD11}{0.4997}
\drift{0.30135}
\dipole{M11}{2.875}{15}
\drift{0.7208}
\kicker{KV11}{0.1}
\drift{0.217}
\sextupole{SF11}{0.287}
\drift{0.13665}
\quadrupole{QF12}{0.4997}
\drift{0.30135}
\dipole{M12}{2.875}{15}
\drift{1.1743}
\kicker{KV12}{0.1}
\drift{0.18715}
\quadrupole{QD13}{0.4997}
\drift{0.30135}
\dipole{M13}{2.875}{15}
\drift{0.7398}
\kicker{KV13}{0.1}
\drift{0.62165}
\quadrupole{QF14}{0.4997}
\savecoordinate{rechts}
\drift{1.86133}
\drift{1.86133}
\kicker{KV14}{0.1}
\drift{0.81515}
\quadrupole{QD15}{0.4997}
\drift{0.30135}
\dipole{M15}{2.875}{15}
\drift{0.9368}
\kicker{KV15}{0.1}
\drift{0.42465}
\quadrupole{QF16}{0.4997}
\drift{0.13665}
\sextupole{SX16}{0.287}
\drift{0.2065}
\quadrupole{LQ16}{0.45}[0.2]
\drift{0.3075}
\cavity{PETRA1}{1.6}
\drift{0.93725}
\quadrupole{TJQD16}{0.5515}[0.2]
\drift{0.1614}

% turn labels to other side and back
\turnlabels
\quadrupole{QD17}{0.4997}
\turnlabels

\drift{0.10615}
\kicker{KV17}{0.1}
\drift{0.244}
\cavity{PETRA2}{1.6}
\drift{1.43175}
\drift{0.07575}
\quadrupole{LQ17}{0.45}[0.2]
\drift{0.2065}
\sextupole{SX17}{0.287}
\drift{0.13665}
\quadrupole{QF18}{0.4997}
\drift{0.41665}
\kicker{KV18}{0.1}
\drift{0.9447}
\dipole{M18}{2.875}{15}
\drift{0.30145}

%labels rotated (with manually set anchor) within scope (forget changes after scope)
\begin{scope}
\rotatelabels{65}[east]
\quadrupole{QD19}{0.4997}
\drift{0.13665}
\sextupole{SD19}{0.287}
\drift{0.1965}
\kicker{KV19}{0.1}
\end{scope}

\drift{1.747}
\drift{1.747}
\sextupole{SF19}{0.287}
\drift{0.13665}

% turn labels to other side within scope (no second \turnlabels needed)
\begin{scope}
\turnlabels
\quadrupole{QF20}{0.4997}
\end{scope}

\drift{0.22565}
\kicker{KV20}{0.1}

\drift{1.1357}
\dipole{M20}{2.875}{15}
\drift{0.30145}

%labels in other distance to elements
\begin{labeldistance}{0.8}
  \quadrupole{QD21}{0.4997}
\end{labeldistance} %back to previous label distance (same as \setlabeldistance within scope)

\drift{0.21015}
\kicker{KV21}{0.1}
\drift{1.151}
\dipole{M21}{2.875}{15}
\drift{0.30165}
\quadrupole{QF22}{0.4997}
\drift{0.99865}
\kicker{KV22}{0.1}
\drift{0.363}
\dipole{M22}{2.875}{15}
\drift{0.30115}
\quadrupole{QD23}{0.4997}
\drift{1.46115}
\dipole{M23}{2.875}{15}
\drift{0.30165}
\quadrupole{QF24}{0.4997}
\drift{0.99265}
\kicker{KV24}{0.1}
\drift{0.369}
\dipole{M24}{2.875}{15}
\drift{0.30115}
\quadrupole{QD25}{0.4997}
\drift{0.30115}
\dipole{M25}{2.875}{15}
\drift{0.716}
\kicker{KV25}{0.1}
\drift{0.64565}
\quadrupole{QF26}{0.4997}
\drift{0.30165}
\dipole{M26}{2.875}{15}
\drift{0.723}
\kicker{KV26}{0.1}
\drift{0.214}
\sextupole{SD26}{0.287}
\drift{0.13715}
\quadrupole{QD27}{0.4997}
\drift{0.30115}
\dipole{M27}{2.875}{15}
\drift{0.728}
\kicker{KV27}{0.1}
\drift{0.21}
\sextupole{SF27}{0.287}
\drift{0.13665}
\quadrupole{QF28}{0.4997}
\drift{0.30165}
\dipole{M28}{2.875}{15}
\drift{1.168}
\kicker{KV28}{0.1}
\drift{0.19315}
\quadrupole{QD29}{0.4997}
\drift{0.30115}
\dipole{M29}{2.875}{15}
\savecoordinate{links}
\drift{0.318}
\kicker{KV29}{0.1}
\drift{1.04365}
\quadrupole{QF30}{0.4997}
\drift{1.56882}
\drift{1.56882}
\kicker{KV30}{0.1}
\drift{1.40015}
\quadrupole{QD31}{0.4997}
\drift{0.30115}
\dipole{M31}{2.875}{15}
\drift{0.307}
\kicker{KV31}{0.1}
\drift{1.05465}
\quadrupole{QF32}{0.4997}
\drift{0.13665}
\sextupole{SX32}{0.287}
\drift{0.2069}
\quadrupole{LQ32}{0.45}[0.2]
\drift{0.5031}
\kicker{KV32}{0.1}
\drift{0.41025}
\quadrupole{SQ32}{0.45}
\drift{1.382}
\quadrupole{TJQ32}{0.5515}[0.2]
\drift{0.12625}

% legend shows all element types occuring before this commmand
\legend{(35,38)}[2]

%title - aligned between M29 and QF14 via \savecoordinate
\draw[draw=none] (links) -- (rechts) node[midway, font=\bfseries\Huge,scale=2, align=center]
{ELSA Stretcherring\\{\SIrange[range-units=single,detect-weight=true]{0.5}{3.2}{\GeV}}};
\end{lattice}
\end{document}