ROOT  6.06/09
Reference Guide
mathsymbols.C
Go to the documentation of this file.
2 {
3  TCanvas *Ms = new TCanvas("mathsymb","Mathematical Symbols",800,500);
4 
5  TLatex Tl;
6  Tl.SetTextSize(0.033);
7 
8  // Draw First Column
9  Tl.SetTextAlign(12);
10  float y, x1, x2;
11  float step = 0.054;
12  y = 0.96; x1 = 0.02; x2 = x1+0.04;
13  Tl.DrawLatex(x1, y, "#club") ; Tl.DrawText(x2, y, "#club");
14  y -= step ; Tl.DrawLatex(x1, y, "#voidn") ; Tl.DrawText(x2, y, "#voidn");
15  y -= step ; Tl.DrawLatex(x1, y, "#leq") ; Tl.DrawText(x2, y, "#leq");
16  y -= step ; Tl.DrawLatex(x1, y, "#approx") ; Tl.DrawText(x2, y, "#approx");
17  y -= step ; Tl.DrawLatex(x1, y, "#in") ; Tl.DrawText(x2, y, "#in");
18  y -= step ; Tl.DrawLatex(x1, y, "#supset") ; Tl.DrawText(x2, y, "#supset");
19  y -= step ; Tl.DrawLatex(x1, y, "#cap") ; Tl.DrawText(x2, y, "#cap");
20  y -= step ; Tl.DrawLatex(x1, y, "#ocopyright") ; Tl.DrawText(x2, y, "#ocopyright");
21  y -= step ; Tl.DrawLatex(x1, y, "#trademark") ; Tl.DrawText(x2, y, "#trademark");
22  y -= step ; Tl.DrawLatex(x1, y, "#times") ; Tl.DrawText(x2, y, "#times");
23  y -= step ; Tl.DrawLatex(x1, y, "#bullet") ; Tl.DrawText(x2, y, "#bullet");
24  y -= step ; Tl.DrawLatex(x1, y, "#voidb") ; Tl.DrawText(x2, y, "#voidb");
25  y -= step ; Tl.DrawLatex(x1, y, "#doublequote") ; Tl.DrawText(x2, y, "#doublequote");
26  y -= step ; Tl.DrawLatex(x1, y, "#lbar") ; Tl.DrawText(x2, y, "#lbar");
27  y -= step ; Tl.DrawLatex(x1, y, "#arcbottom") ; Tl.DrawText(x2, y, "#arcbottom");
28  y -= step ; Tl.DrawLatex(x1, y, "#downarrow") ; Tl.DrawText(x2, y, "#downarrow");
29  y -= step ; Tl.DrawLatex(x1, y, "#leftrightarrow") ; Tl.DrawText(x2, y, "#leftrightarrow");
30  y -= step ; Tl.DrawLatex(x1, y, "#Downarrow") ; Tl.DrawText(x2, y, "#Downarrow");
31 
32  // Draw Second Column
33  y = 0.96; x1 = 0.22; x2 = x1+0.04;
34  Tl.DrawLatex(x1, y, "#Leftrightarrow") ; Tl.DrawText(x2, y, "#Leftrightarrow");
35  y -= step ; Tl.DrawLatex(x1, y, "#void8") ; Tl.DrawText(x2, y, "#void8");
36  y -= step ; Tl.DrawLatex(x1, y, "#hbar") ; Tl.DrawText(x2, y, "#hbar");
37  y -= step ; Tl.DrawLatex(x1, y, "#diamond") ; Tl.DrawText(x2, y, "#diamond");
38  y -= step ; Tl.DrawLatex(x1, y, "#aleph") ; Tl.DrawText(x2, y, "#aleph");
39  y -= step ; Tl.DrawLatex(x1, y, "#geq") ; Tl.DrawText(x2, y, "#geq");
40  y -= step ; Tl.DrawLatex(x1, y, "#neq") ; Tl.DrawText(x2, y, "#neq");
41  y -= step ; Tl.DrawLatex(x1, y, "#notin") ; Tl.DrawText(x2, y, "#notin");
42  y -= step ; Tl.DrawLatex(x1, y, "#subseteq") ; Tl.DrawText(x2, y, "#subseteq");
43  y -= step ; Tl.DrawLatex(x1, y, "#cup") ; Tl.DrawText(x2, y, "#cup");
44  y -= step ; Tl.DrawLatex(x1, y, "#copyright") ; Tl.DrawText(x2, y, "#copyright");
45  y -= step ; Tl.DrawLatex(x1, y, "#void3") ; Tl.DrawText(x2, y, "#void3");
46  y -= step ; Tl.DrawLatex(x1, y, "#divide") ; Tl.DrawText(x2, y, "#divide");
47  y -= step ; Tl.DrawLatex(x1, y, "#circ") ; Tl.DrawText(x2, y, "#circ");
48  y -= step ; Tl.DrawLatex(x1, y, "#infty") ; Tl.DrawText(x2, y, "#infty");
49  y -= step ; Tl.DrawLatex(x1, y, "#angle") ; Tl.DrawText(x2, y, "#angle");
50  y -= step ; Tl.DrawLatex(x1, y, "#cbar") ; Tl.DrawText(x2, y, "#cbar");
51  y -= step ; Tl.DrawLatex(x1, y, "#arctop") ; Tl.DrawText(x2, y, "#arctop");
52 
53  // Draw Third Column
54  y = 0.96; x1 = 0.42; x2 = x1+0.04;
55  Tl.DrawLatex(x1, y, "#leftarrow") ; Tl.DrawText(x2, y, "#leftarrow");
56  y -= step ; Tl.DrawLatex(x1, y, "#otimes") ; Tl.DrawText(x2, y, "#otimes");
57  y -= step ; Tl.DrawLatex(x1, y, "#Leftarrow") ; Tl.DrawText(x2, y, "#Leftarrow");
58  y -= step ; Tl.DrawLatex(x1, y, "#prod") ; Tl.DrawText(x2, y, "#prod");
59  y -= step ; Tl.DrawLatex(x1, y, "#Box") ; Tl.DrawText(x2, y, "#Box");
60  y -= step ; Tl.DrawLatex(x1, y, "#parallel") ; Tl.DrawText(x2, y, "#parallel");
61  y -= step ; Tl.DrawLatex(x1, y, "#heart") ; Tl.DrawText(x2, y, "#heart");
62  y -= step ; Tl.DrawLatex(x1, y, "#Jgothic") ; Tl.DrawText(x2, y, "#Jgothic");
63  y -= step ; Tl.DrawLatex(x1, y, "#LT") ; Tl.DrawText(x2, y, "#LT");
64  y -= step ; Tl.DrawLatex(x1, y, "#equiv") ; Tl.DrawText(x2, y, "#equiv");
65  y -= step ; Tl.DrawLatex(x1, y, "#subset") ; Tl.DrawText(x2, y, "#subset");
66  y -= step ; Tl.DrawLatex(x1, y, "#supseteq") ; Tl.DrawText(x2, y, "#supseteq");
67  y -= step ; Tl.DrawLatex(x1, y, "#wedge") ; Tl.DrawText(x2, y, "#wedge");
68  y -= step ; Tl.DrawLatex(x1, y, "#oright") ; Tl.DrawText(x2, y, "#oright");
69  y -= step ; Tl.DrawLatex(x1, y, "#AA") ; Tl.DrawText(x2, y, "#AA");
70  y -= step ; Tl.DrawLatex(x1, y, "#pm") ; Tl.DrawText(x2, y, "#pm");
71  y -= step ; Tl.DrawLatex(x1, y, "#mp") ; Tl.DrawText(x2, y, "#mp");
72  y -= step ; Tl.DrawLatex(x1, y, "#3dots") ; Tl.DrawText(x2, y, "#3dots");
73 
74  // Draw Fourth Column
75  y = 0.96; x1 = 0.62; x2 = x1+0.04;
76  Tl.DrawLatex(x1, y, "#nabla") ; Tl.DrawText(x2, y, "#nabla");
77  y -= step ; Tl.DrawLatex(x1, y, "#downleftarrow") ; Tl.DrawText(x2, y, "#downleftarrow");
78  y -= step ; Tl.DrawLatex(x1, y, "#topbar") ; Tl.DrawText(x2, y, "#topbar");
79  y -= step ; Tl.DrawLatex(x1, y, "#arcbar") ; Tl.DrawText(x2, y, "#arcbar");
80  y -= step ; Tl.DrawLatex(x1, y, "#uparrow") ; Tl.DrawText(x2, y, "#uparrow");
81  y -= step ; Tl.DrawLatex(x1, y, "#oplus") ; Tl.DrawText(x2, y, "#oplus");
82  y -= step ; Tl.DrawLatex(x1, y, "#Uparrow") ; Tl.DrawText(x2, y, "#Uparrow");
83  y -= step ; Tl.DrawLatex(x1, y-0.01, "#sum") ; Tl.DrawText(x2, y, "#sum");
84  y -= step ; Tl.DrawLatex(x1, y, "#perp") ; Tl.DrawText(x2, y, "#perp");
85  y -= step ; Tl.DrawLatex(x1, y, "#forall") ; Tl.DrawText(x2, y, "#forall");
86  y -= step ; Tl.DrawLatex(x1, y, "#spade") ; Tl.DrawText(x2, y, "#spade");
87  y -= step ; Tl.DrawLatex(x1, y, "#Rgothic") ; Tl.DrawText(x2, y, "#Rgothic");
88  y -= step ; Tl.DrawLatex(x1, y, "#GT") ; Tl.DrawText(x2, y, "#GT");
89  y -= step ; Tl.DrawLatex(x1, y, "#propto") ; Tl.DrawText(x2, y, "#propto");
90  y -= step ; Tl.DrawLatex(x1, y, "#notsubset") ; Tl.DrawText(x2, y, "#notsubset");
91  y -= step ; Tl.DrawLatex(x1, y, "#oslash") ; Tl.DrawText(x2, y, "#oslash");
92  y -= step ; Tl.DrawLatex(x1, y, "#vee") ; Tl.DrawText(x2, y, "#vee");
93  y -= step ; Tl.DrawLatex(x1, y, "#void1") ; Tl.DrawText(x2, y, "#void1");
94 
95  // Draw Fith Column
96  y = 0.96; x1 = 0.82; x2 = x1+0.04;
97  Tl.DrawLatex(x1, y, "#aa") ; Tl.DrawText(x2, y, "#aa");
98  y -= step ; Tl.DrawLatex(x1, y, "#/") ; Tl.DrawText(x2, y, "#/");
99  y -= step ; Tl.DrawLatex(x1, y, "#backslash") ; Tl.DrawText(x2, y, "#backslash");
100  y -= step ; Tl.DrawLatex(x1, y, "#upoint") ; Tl.DrawText(x2, y, "#upoint");
101  y -= step ; Tl.DrawLatex(x1, y, "#partial") ; Tl.DrawText(x2, y, "#partial");
102  y -= step ; Tl.DrawLatex(x1, y, "#corner") ; Tl.DrawText(x2, y, "#corner");
103  y -= step ; Tl.DrawLatex(x1, y, "#ltbar") ; Tl.DrawText(x2, y, "#ltbar");
104  y -= step ; Tl.DrawLatex(x1, y, "#bottombar") ; Tl.DrawText(x2, y, "#bottombar");
105  y -= step ; Tl.DrawLatex(x1, y, "#rightarrow") ; Tl.DrawText(x2, y, "#rightarrow");
106  y -= step ; Tl.DrawLatex(x1, y, "#surd") ; Tl.DrawText(x2, y, "#surd");
107  y -= step ; Tl.DrawLatex(x1, y, "#Rightarrow") ; Tl.DrawText(x2, y, "#Rightarrow");
108  y -= step ; Tl.DrawLatex(x1, y-0.015, "#int") ; Tl.DrawText(x2, y, "#int");
109  y -= step ; Tl.DrawLatex(x1, y, "#odot") ; Tl.DrawText(x2, y, "#odot");
110  y -= step ; Tl.DrawLatex(x1, y, "#exists") ; Tl.DrawText(x2, y, "#exists");
111  y -= step ; Tl.DrawLatex(x1, y, "#plus") ; Tl.DrawText(x2, y, "#plus");
112  y -= step ; Tl.DrawLatex(x1, y, "#minus") ; Tl.DrawText(x2, y, "#minus");
113 
114  return Ms;
115 }
static const double x2[5]
To draw Mathematical Formula.
Definition: TLatex.h:33
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
Definition: TLatex.cxx:1901
virtual void SetTextAlign(Short_t align=11)
Definition: TAttText.h:55
TCanvas * mathsymbols()
Definition: mathsymbols.C:1
The Canvas class.
Definition: TCanvas.h:48
static const double x1[5]
Double_t y[n]
Definition: legend1.C:17
virtual TText * DrawText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
Definition: TText.cxx:171
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60