TLatex *latex = new TLatex(); latex->SetTextAlign(22); latex->SetTextSize(0.03); latex->SetTextFont(42); // set font type to Helvetica latex->DrawLatex(x, y, "Hello World!");
gROOT->SetStyle("Plain"); TLatex *latex = new TLatex(); latex->SetTextAlign(22); latex->SetTextSize(0.04); latex->SetTextFont(62); // set font type to Lucida Bright latex->DrawLatex(x, y, "#alpha_{i,j} = K_{i,j}^{*} / C_{i}");In this example, the ROOT style is set to "Plain" using the `gROOT->SetStyle` function. Then, a new `TLatex` object is created and its `SetTextAlign` and `SetTextSize` functions are used to set the alignment and size of the text. The `SetTextFont` function is used to set the font type to Lucida Bright. Finally, the `DrawLatex` function is used to draw a mathematical formula on the canvas at position `(x, y)`. These examples use the ROOT library package to create and manipulate `TLatex` objects.