latex.C

Go to the documentation of this file.
00001 // This macro draws 4 Latex-style formula in a canvas and prints the canvas
00002 // as a Postscript file.
00003 // Note that this macro relies on a first implementation of the TLatex class.
00004 // There are still some discrepancies between the result on the screen
00005 // and the result on Postscript.
00006 // Also some differences will be seen between Unix servers depending
00007 // the version of X in use. Results on WindowsNT are also slightly different.
00008 //Author: Rene Brun
00009 void latex() {
00010    TCanvas *c1 = new TCanvas("c1","test",600,700);
00011    // write formulas
00012    TLatex l;
00013    l.SetTextAlign(12);
00014    l.SetTextSize(0.04);
00015    l.DrawLatex(0.1,0.9,"1)   C(x) = d #sqrt{#frac{2}{#lambdaD}}\
00016    #int^{x}_{0}cos(#frac{#pi}{2}t^{2})dt");
00017    l.DrawLatex(0.1,0.7,"2)   C(x) = d #sqrt{#frac{2}{#lambdaD}}\
00018    #int^{x}cos(#frac{#pi}{2}t^{2})dt");
00019    l.DrawLatex(0.1,0.5,"3)   R = |A|^{2} = #frac{1}{2}#left(#[]{#frac{1}{2}+\
00020    C(V)}^{2}+#[]{#frac{1}{2}+S(V)}^{2}#right)");
00021    l.DrawLatex(0.1,0.3,
00022    "4)   F(t) = #sum_{i=-#infty}^{#infty}A(i)cos#[]{#frac{i}{t+i}}");
00023    l.DrawLatex(0.1,0.1,"5)   {}_{3}^{7}Li");
00024    c1->Print("latex.ps");
00025 }

Generated on Tue Jul 5 15:44:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1