ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
latex2.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// This macro draws 4 Latex-style formula in a canvas and prints the canvas as a Postscript file.
4 ///
5 /// \macro_image
6 /// \macro_code
7 ///
8 /// \author Rene Brun
9 
10 void latex2(){
11  TCanvas *c1 = new TCanvas("c1");
12  TLatex l;
13  l.SetTextAlign(23);
14  l.SetTextSize(0.1);
15  l.DrawLatex(0.5,0.95,"e^{+}e^{-}#rightarrowZ^{0}#rightarrowI#bar{I}, q#bar{q}");
16  l.DrawLatex(0.5,0.75,"|#vec{a}#bullet#vec{b}|=#Sigmaa^{i}_{jk}+b^{bj}_{i}");
17  l.DrawLatex(0.5,0.5,"i(#partial_{#mu}#bar{#psi}#gamma^{#mu}+m#bar{#psi})=0\
18  #Leftrightarrow(#Box+m^{2})#psi=0");
19  l.DrawLatex(0.5,0.3,"L_{em}=eJ^{#mu}_{em}A_{#mu} , J^{#mu}_{em}=#bar{I}\
20  #gamma_{#mu}I , M^{j}_{i}=#SigmaA_{#alpha}#tau^{#alphaj}_{i}");
21  c1->Print("latex2.ps");
22 }
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:4134
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
TLine * l
Definition: textangle.C:4
The Canvas class.
Definition: TCanvas.h:48
virtual void SetTextSize(Float_t tsize=1)
Definition: TAttText.h:60