ROOT
master
Reference Guide
Loading...
Searching...
No Matches
latex.C
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_graphics
3
/// \notebook
4
/// \preview This macro draws 5 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
latex
()
12
{
13
TCanvas
*
c1
=
new
TCanvas
(
"c1"
,
"test"
, 600, 700);
14
// write formulas
15
TLatex
l
;
16
l
.SetTextAlign(12);
17
l
.SetTextSize(0.04);
18
l
.DrawLatex(0.1, 0.9,
"1) C(x) = d #sqrt{#frac{2}{#lambdaD}}\
19
#int^{x}_{0}cos(#frac{#pi}{2}t^{2})dt"
);
20
l
.DrawLatex(0.1, 0.7,
"2) C(x) = d #sqrt{#frac{2}{#lambdaD}}\
21
#int^{x}cos(#frac{#pi}{2}t^{2})dt"
);
22
l
.DrawLatex(0.1, 0.5,
"3) R = |A|^{2} = #frac{1}{2}#left(#[]{#frac{1}{2}+\
23
C(V)}^{2}+#[]{#frac{1}{2}+S(V)}^{2}#right)"
);
24
l
.DrawLatex(0.1, 0.3,
"4) F(t) = #sum_{i=-#infty}^{#infty}A(i)cos#[]{#frac{i}{t+i}}"
);
25
l
.DrawLatex(0.1, 0.1,
"5) {}_{3}^{7}Li"
);
26
c1
->Print(
"latex.ps"
);
27
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:358
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TLatex
To draw Mathematical Formula.
Definition
TLatex.h:18
c1
return c1
Definition
legend1.C:41
l
TLine l
Definition
textangle.C:4
tutorials
visualisation
graphics
latex.C
ROOT master - Reference Guide Generated on Tue Apr 22 2025 16:24:55 (GVA Time) using Doxygen 1.10.0