Logo ROOT   6.08/07
Reference Guide
latex2.C
Go to the documentation of this file.
1 /// \file
2 /// \ingroup tutorial_graphics
3 /// \notebook
4 /// This macro draws 4 Latex-style formula in a canvas and prints the canvas as a Postscript file.
5 ///
6 /// \macro_image
7 /// \macro_code
8 ///
9 /// \author Rene Brun
10 
11 void latex2(){
12  TCanvas *c1 = new TCanvas("c1");
13  TLatex l;
14  l.SetTextAlign(23);
15  l.SetTextSize(0.1);
16  l.DrawLatex(0.5,0.95,"e^{+}e^{-}#rightarrowZ^{0}#rightarrowI#bar{I}, q#bar{q}");
17  l.DrawLatex(0.5,0.75,"|#vec{a}#bullet#vec{b}|=#Sigmaa^{i}_{jk}+b^{bj}_{i}");
18  l.DrawLatex(0.5,0.5,"i(#partial_{#mu}#bar{#psi}#gamma^{#mu}+m#bar{#psi})=0\
19  #Leftrightarrow(#Box+m^{2})#psi=0");
20  l.DrawLatex(0.5,0.3,"L_{em}=eJ^{#mu}_{em}A_{#mu} , J^{#mu}_{em}=#bar{I}\
21  #gamma_{#mu}I , M^{j}_{i}=#SigmaA_{#alpha}#tau^{#alphaj}_{i}");
22  c1->Print("latex2.ps");
23 }
return c1
Definition: legend1.C:41
To draw Mathematical Formula.
Definition: TLatex.h:25
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:1914
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
Definition: TAttText.h:47
TLine * l
Definition: textangle.C:4
virtual void Print(const char *filename="") const
Save Pad contents in a file in one of various formats.
Definition: TPad.cxx:4160
The Canvas class.
Definition: TCanvas.h:41
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
Definition: TAttText.h:52