ROOT
master
Reference Guide
Loading...
Searching...
No Matches
latex_url.cxx
Go to the documentation of this file.
1
/// \file
2
/// \ingroup tutorial_webcanv
3
/// \notebook -js
4
/// Demonstrates how to use interactive URL links in TLatex.
5
///
6
/// JSROOT and standard SVG output support the syntax '#url[link]{label}'.
7
/// This can be combined with other LaTeX commands, such as color or font settings.
8
///
9
/// Since TLatex is used in many contexts, external links can be added to
10
/// histogram titles, axis titles, legend entries, and more.
11
///
12
/// This functionality is available only in web-based graphics and
13
/// standard SVG output.
14
///
15
/// \macro_image (tcanvas_js)
16
/// \macro_code
17
///
18
/// \author Sergey Linev
19
20
void
latex_url
()
21
{
22
auto
c1
=
new
TCanvas
(
"c1"
,
"Use of #url in TLatex"
, 1200, 800);
23
24
auto
latex
=
new
TLatex
(0.5, 0.5,
"Link on #color[4]{#url[https://root.cern]{root.cern}} web site"
);
25
latex
->SetTextSize(0.1);
26
latex
->SetTextAlign(22);
27
latex
->SetTextAngle(30.);
28
c1
->Add(
latex
);
29
c1
->Print(
"c1.svg"
);
30
c1
->Print(
"c1.pdf"
);
31
}
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:360
ROOT::Detail::TRangeCast
Definition
TCollection.h:313
TCanvas
The Canvas class.
Definition
TCanvas.h:23
TLatex
To draw Mathematical Formula.
Definition
TLatex.h:20
c1
return c1
Definition
legend1.C:41
tutorials
visualisation
webcanv
latex_url.cxx
ROOTmaster - Reference Guide Generated on Thu Mar 19 2026 03:32:10 (GVA Time) using Doxygen 1.10.0