ROOT logo
void latex3() {
   //example illustrating a TPaveText with Latex inside
   //Author: Rene Brun
   
   TCanvas *c1 = new TCanvas("c1");
   TPaveText *pt = new TPaveText(.05,.1,.95,.8);

   pt->AddText("#frac{2s}{#pi#alpha^{2}}  #frac{d#sigma}{dcos#theta} \
   (e^{+}e^{-} #rightarrow f#bar{f} ) = #left| #frac{1}{1 - #Delta#alpha} \
   #right|^{2} (1+cos^{2}#theta)");

   pt->AddText("+ 4 Re #left{ #frac{2}{1 - #Delta#alpha} #chi(s) \
   #[]{#hat{g}_{#nu}^{e}#hat{g}_{#nu}^{f} \
(1 + cos^{2}#theta) + 2 #hat{g}_{a}^{e}#hat{g}_{a}^{f} cos#theta) } #right}");

   pt->AddText("+ 16#left|#chi(s)#right|^{2}\
 #left[(#hat{g}_{a}^{e}^{2} + #hat{g}_{v}^{e}^{2})\
 (#hat{g}_{a}^{f}^{2} + #hat{g}_{v}^{f}^{2})(1+cos^{2}#theta)\
 + 8 #hat{g}_{a}^{e} #hat{g}_{a}^{f} #hat{g}_{v}^{e} \
 #hat{g}_{v}^{f}cos#theta#right] ");

   pt->SetLabel("Born equation");
   pt->Draw();
}
 latex3.C:1
 latex3.C:2
 latex3.C:3
 latex3.C:4
 latex3.C:5
 latex3.C:6
 latex3.C:7
 latex3.C:8
 latex3.C:9
 latex3.C:10
 latex3.C:11
 latex3.C:12
 latex3.C:13
 latex3.C:14
 latex3.C:15
 latex3.C:16
 latex3.C:17
 latex3.C:18
 latex3.C:19
 latex3.C:20
 latex3.C:21
 latex3.C:22
 latex3.C:23
 latex3.C:24
 latex3.C:25