ROOT
git-r3/HEAD
Reference Guide
Loading...
Searching...
No Matches
latex5.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_graphics
3
/// \notebook
4
/// \preview This draws the Mathematical Symbols letters as a table and save the result
5
/// as GIF, PS, PDF and SVG files.
6
///
7
/// ### png output:
8
/// \macro_image
9
///
10
/// ### pdf output:
11
/// \macro_image (mathsymb.pdf)
12
///
13
/// ### svg output:
14
/// \macro_image (mathsymb.svg)
15
///
16
/// \author Rene Brun
17
18
void
latex5()
19
{
20
auto
c1
=
new
TCanvas
(
"mathsymb"
,
"Mathematical Symbols"
, 600, 600);
21
22
TLatex
l
;
23
l
.SetTextSize(0.03);
24
25
// Draw First Column
26
l
.SetTextAlign(12);
27
float
y
, step, x1, x2;
28
y
= 0.96;
29
step = 0.0465;
30
x1 = 0.02;
31
x2 = x1 + 0.04;
32
l
.DrawLatex(x1,
y
,
"#club"
);
33
l
.DrawText(x2,
y
,
"#club"
);
34
y
-= step;
35
l
.DrawLatex(x1,
y
,
"#voidn"
);
36
l
.DrawText(x2,
y
,
"#voidn"
);
37
y
-= step;
38
l
.DrawLatex(x1,
y
,
"#leq"
);
39
l
.DrawText(x2,
y
,
"#leq"
);
40
y
-= step;
41
l
.DrawLatex(x1,
y
,
"#approx"
);
42
l
.DrawText(x2,
y
,
"#approx"
);
43
y
-= step;
44
l
.DrawLatex(x1,
y
,
"#in"
);
45
l
.DrawText(x2,
y
,
"#in"
);
46
y
-= step;
47
l
.DrawLatex(x1,
y
,
"#supset"
);
48
l
.DrawText(x2,
y
,
"#supset"
);
49
y
-= step;
50
l
.DrawLatex(x1,
y
,
"#cap"
);
51
l
.DrawText(x2,
y
,
"#cap"
);
52
y
-= step;
53
l
.DrawLatex(x1,
y
,
"#ocopyright"
);
54
l
.DrawText(x2,
y
,
"#ocopyright"
);
55
y
-= step;
56
l
.DrawLatex(x1,
y
,
"#trademark"
);
57
l
.DrawText(x2,
y
,
"#trademark"
);
58
y
-= step;
59
l
.DrawLatex(x1,
y
,
"#times"
);
60
l
.DrawText(x2,
y
,
"#times"
);
61
y
-= step;
62
l
.DrawLatex(x1,
y
,
"#bullet"
);
63
l
.DrawText(x2,
y
,
"#bullet"
);
64
y
-= step;
65
l
.DrawLatex(x1,
y
,
"#voidb"
);
66
l
.DrawText(x2,
y
,
"#voidb"
);
67
y
-= step;
68
l
.DrawLatex(x1,
y
,
"#doublequote"
);
69
l
.DrawText(x2,
y
,
"#doublequote"
);
70
y
-= step;
71
l
.DrawLatex(x1,
y
,
"#lbar"
);
72
l
.DrawText(x2,
y
,
"#lbar"
);
73
y
-= step;
74
l
.DrawLatex(x1,
y
,
"#arcbottom"
);
75
l
.DrawText(x2,
y
,
"#arcbottom"
);
76
y
-= step;
77
l
.DrawLatex(x1,
y
,
"#downarrow"
);
78
l
.DrawText(x2,
y
,
"#downarrow"
);
79
y
-= step;
80
l
.DrawLatex(x1,
y
,
"#leftrightarrow"
);
81
l
.DrawText(x2,
y
,
"#leftrightarrow"
);
82
y
-= step;
83
l
.DrawLatex(x1,
y
,
"#Downarrow"
);
84
l
.DrawText(x2,
y
,
"#Downarrow"
);
85
y
-= step;
86
l
.DrawLatex(x1,
y
,
"#Leftrightarrow"
);
87
l
.DrawText(x2,
y
,
"#Leftrightarrow"
);
88
y
-= step;
89
l
.DrawLatex(x1,
y
,
"#void8"
);
90
l
.DrawText(x2,
y
,
"#void8"
);
91
y
-= step;
92
l
.DrawLatex(x1,
y
,
"#hbar"
);
93
l
.DrawText(x2,
y
,
"#hbar"
);
94
95
// Draw Second Column
96
y
= 0.96;
97
step = 0.0465;
98
x1 = 0.27;
99
x2 = x1 + 0.04;
100
l
.DrawLatex(x1,
y
,
"#diamond"
);
101
l
.DrawText(x2,
y
,
"#diamond"
);
102
y
-= step;
103
l
.DrawLatex(x1,
y
,
"#aleph"
);
104
l
.DrawText(x2,
y
,
"#aleph"
);
105
y
-= step;
106
l
.DrawLatex(x1,
y
,
"#geq"
);
107
l
.DrawText(x2,
y
,
"#geq"
);
108
y
-= step;
109
l
.DrawLatex(x1,
y
,
"#neq"
);
110
l
.DrawText(x2,
y
,
"#neq"
);
111
y
-= step;
112
l
.DrawLatex(x1,
y
,
"#notin"
);
113
l
.DrawText(x2,
y
,
"#notin"
);
114
y
-= step;
115
l
.DrawLatex(x1,
y
,
"#subseteq"
);
116
l
.DrawText(x2,
y
,
"#subseteq"
);
117
y
-= step;
118
l
.DrawLatex(x1,
y
,
"#cup"
);
119
l
.DrawText(x2,
y
,
"#cup"
);
120
y
-= step;
121
l
.DrawLatex(x1,
y
,
"#copyright"
);
122
l
.DrawText(x2,
y
,
"#copyright"
);
123
y
-= step;
124
l
.DrawLatex(x1,
y
,
"#void3"
);
125
l
.DrawText(x2,
y
,
"#void3"
);
126
y
-= step;
127
l
.DrawLatex(x1,
y
,
"#divide"
);
128
l
.DrawText(x2,
y
,
"#divide"
);
129
y
-= step;
130
l
.DrawLatex(x1,
y
,
"#circ"
);
131
l
.DrawText(x2,
y
,
"#circ"
);
132
y
-= step;
133
l
.DrawLatex(x1,
y
,
"#infty"
);
134
l
.DrawText(x2,
y
,
"#infty"
);
135
y
-= step;
136
l
.DrawLatex(x1,
y
,
"#angle"
);
137
l
.DrawText(x2,
y
,
"#angle"
);
138
y
-= step;
139
l
.DrawLatex(x1,
y
,
"#cbar"
);
140
l
.DrawText(x2,
y
,
"#cbar"
);
141
y
-= step;
142
l
.DrawLatex(x1,
y
,
"#arctop"
);
143
l
.DrawText(x2,
y
,
"#arctop"
);
144
y
-= step;
145
l
.DrawLatex(x1,
y
,
"#leftarrow"
);
146
l
.DrawText(x2,
y
,
"#leftarrow"
);
147
y
-= step;
148
l
.DrawLatex(x1,
y
,
"#otimes"
);
149
l
.DrawText(x2,
y
,
"#otimes"
);
150
y
-= step;
151
l
.DrawLatex(x1,
y
,
"#Leftarrow"
);
152
l
.DrawText(x2,
y
,
"#Leftarrow"
);
153
y
-= step;
154
l
.DrawLatex(x1,
y
,
"#prod"
);
155
l
.DrawText(x2,
y
,
"#prod"
);
156
y
-= step;
157
l
.DrawLatex(x1,
y
,
"#Box"
);
158
l
.DrawText(x2,
y
,
"#Box"
);
159
y
-= step;
160
l
.DrawLatex(x1,
y
,
"#parallel"
);
161
l
.DrawText(x2,
y
,
"#parallel"
);
162
163
// Draw Third Column
164
y
= 0.96;
165
step = 0.0465;
166
x1 = 0.52;
167
x2 = x1 + 0.04;
168
l
.DrawLatex(x1,
y
,
"#heart"
);
169
l
.DrawText(x2,
y
,
"#heart"
);
170
y
-= step;
171
l
.DrawLatex(x1,
y
,
"#Jgothic"
);
172
l
.DrawText(x2,
y
,
"#Jgothic"
);
173
y
-= step;
174
l
.DrawLatex(x1,
y
,
"#LT"
);
175
l
.DrawText(x2,
y
,
"#LT"
);
176
y
-= step;
177
l
.DrawLatex(x1,
y
,
"#equiv"
);
178
l
.DrawText(x2,
y
,
"#equiv"
);
179
y
-= step;
180
l
.DrawLatex(x1,
y
,
"#subset"
);
181
l
.DrawText(x2,
y
,
"#subset"
);
182
y
-= step;
183
l
.DrawLatex(x1,
y
,
"#supseteq"
);
184
l
.DrawText(x2,
y
,
"#supseteq"
);
185
y
-= step;
186
l
.DrawLatex(x1,
y
,
"#wedge"
);
187
l
.DrawText(x2,
y
,
"#wedge"
);
188
y
-= step;
189
l
.DrawLatex(x1,
y
,
"#oright"
);
190
l
.DrawText(x2,
y
,
"#oright"
);
191
y
-= step;
192
l
.DrawLatex(x1,
y
,
"#AA"
);
193
l
.DrawText(x2,
y
,
"#AA"
);
194
y
-= step;
195
l
.DrawLatex(x1,
y
,
"#pm"
);
196
l
.DrawText(x2,
y
,
"#pm"
);
197
y
-= step;
198
l
.DrawLatex(x1,
y
,
"#3dots"
);
199
l
.DrawText(x2,
y
,
"#3dots"
);
200
y
-= step;
201
l
.DrawLatex(x1,
y
,
"#nabla"
);
202
l
.DrawText(x2,
y
,
"#nabla"
);
203
y
-= step;
204
l
.DrawLatex(x1,
y
,
"#downleftarrow"
);
205
l
.DrawText(x2,
y
,
"#downleftarrow"
);
206
y
-= step;
207
l
.DrawLatex(x1,
y
,
"#topbar"
);
208
l
.DrawText(x2,
y
,
"#topbar"
);
209
y
-= step;
210
l
.DrawLatex(x1,
y
,
"#arcbar"
);
211
l
.DrawText(x2,
y
,
"#arcbar"
);
212
y
-= step;
213
l
.DrawLatex(x1,
y
,
"#uparrow"
);
214
l
.DrawText(x2,
y
,
"#uparrow"
);
215
y
-= step;
216
l
.DrawLatex(x1,
y
,
"#oplus"
);
217
l
.DrawText(x2,
y
,
"#oplus"
);
218
y
-= step;
219
l
.DrawLatex(x1,
y
,
"#Uparrow"
);
220
l
.DrawText(x2,
y
,
"#Uparrow"
);
221
y
-= step;
222
l
.DrawLatex(x1,
y
- 0.01,
"#sum"
);
223
l
.DrawText(x2,
y
,
"#sum"
);
224
y
-= step;
225
l
.DrawLatex(x1,
y
,
"#perp"
);
226
l
.DrawText(x2,
y
,
"#perp"
);
227
228
// Draw Fourth Column
229
y
= 0.96;
230
step = 0.0465;
231
x1 = 0.77;
232
x2 = x1 + 0.04;
233
l
.DrawLatex(x1,
y
,
"#spade"
);
234
l
.DrawText(x2,
y
,
"#spade"
);
235
y
-= step;
236
l
.DrawLatex(x1,
y
,
"#Rgothic"
);
237
l
.DrawText(x2,
y
,
"#Rgothic"
);
238
y
-= step;
239
l
.DrawLatex(x1,
y
,
"#GT"
);
240
l
.DrawText(x2,
y
,
"#GT"
);
241
y
-= step;
242
l
.DrawLatex(x1,
y
,
"#propto"
);
243
l
.DrawText(x2,
y
,
"#propto"
);
244
y
-= step;
245
l
.DrawLatex(x1,
y
,
"#notsubset"
);
246
l
.DrawText(x2,
y
,
"#notsubset"
);
247
y
-= step;
248
l
.DrawLatex(x1,
y
,
"#oslash"
);
249
l
.DrawText(x2,
y
,
"#oslash"
);
250
y
-= step;
251
l
.DrawLatex(x1,
y
,
"#vee"
);
252
l
.DrawText(x2,
y
,
"#vee"
);
253
y
-= step;
254
l
.DrawLatex(x1,
y
,
"#void1"
);
255
l
.DrawText(x2,
y
,
"#void1"
);
256
y
-= step;
257
l
.DrawLatex(x1,
y
,
"#aa"
);
258
l
.DrawText(x2,
y
,
"#aa"
);
259
y
-= step;
260
l
.DrawLatex(x1,
y
,
"#/"
);
261
l
.DrawText(x2,
y
,
"#/"
);
262
y
-= step;
263
l
.DrawLatex(x1,
y
,
"#upoint"
);
264
l
.DrawText(x2,
y
,
"#upoint"
);
265
y
-= step;
266
l
.DrawLatex(x1,
y
,
"#partial"
);
267
l
.DrawText(x2,
y
,
"#partial"
);
268
y
-= step;
269
l
.DrawLatex(x1,
y
,
"#corner"
);
270
l
.DrawText(x2,
y
,
"#corner"
);
271
y
-= step;
272
l
.DrawLatex(x1,
y
,
"#ltbar"
);
273
l
.DrawText(x2,
y
,
"#ltbar"
);
274
y
-= step;
275
l
.DrawLatex(x1,
y
,
"#bottombar"
);
276
l
.DrawText(x2,
y
,
"#bottombar"
);
277
y
-= step;
278
l
.DrawLatex(x1,
y
,
"#rightarrow"
);
279
l
.DrawText(x2,
y
,
"#rightarrow"
);
280
y
-= step;
281
l
.DrawLatex(x1,
y
,
"#surd"
);
282
l
.DrawText(x2,
y
,
"#surd"
);
283
y
-= step;
284
l
.DrawLatex(x1,
y
,
"#Rightarrow"
);
285
l
.DrawText(x2,
y
,
"#Rightarrow"
);
286
y
-= step;
287
l
.DrawLatex(x1,
y
- 0.015,
"#int"
);
288
l
.DrawText(x2,
y
,
"#int"
);
289
y
-= step;
290
l
.DrawLatex(x1,
y
,
"#odot"
);
291
l
.DrawText(x2,
y
,
"#odot"
);
292
293
// Save the picture in various formats
294
c1
->Print(
"mathsymb.ps"
);
295
c1
->Print(
"mathsymb.png"
);
296
c1
->Print(
"mathsymb.pdf"
);
297
c1
->Print(
"mathsymb.svg"
);
298
}
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TLatex
Definition
TLatex.h:20
c1
return c1
Definition
legend1.C:41
y
Double_t y[n]
Definition
legend1.C:17
l
TLine l
Definition
textangle.C:4
tutorials
visualisation
graphics
latex5.C
ROOTgit-r3/HEAD - Reference Guide Generated on
(GVA Time) using Doxygen 1.16.1