Dear Root Experts,
In naming histograms I am using a notation in which some of the symbols are underlined.
In LaTeX there is a simple command \underline to accomplish this goal:
\documentclass[12pt]{article}
\begin{document}
$\underline{a}$
\end{document}
but as far as I could conclude from the documentation of TLatex this command is not supported in Root.
Is there an alternative way to underline symbol in Root?
Thanks,
Ante
couet
July 20, 2009, 4:12pm
2
Yes you are right, you can put a bar above a character (#bar {}) but not below.
To be done.
If you want to underline a full word may be a TLine can make it ?
system
July 20, 2009, 4:48pm
3
With Qt-plugin “on”, one can add any Qt widget on the top of the TCanvas.
For example, to add QLabel (see: doc.trolltech.com/4.5/qlabel.html#details ),
Create a simple function, “addLabel.C” [code]#ifndef CINT
include “QtGui/QWidget”
include “QtGui/QLabel”
include “TQtUtil.h”
include “TCanvas.h”
using namespace TQtUtil;
#endif
void addLabel(TCanvas *c)
{
#ifndef CINT
QWidget *w = canvasWidget©;
QLabel *l = new QLabel(w); // create QLabel with TCanvas as its parent
l->setText(“Hello Qt Label !!”);
l->move(100,100); // set the label location in TPad pixel coordinates
l->resize(140,40); // set the label size ( pixels )
l->show(); // Show the label on the top of the TCanvas
w->update(); // Update TCanvas
#endif
}[/code];
2. Start ROOT with Qt-layer “on” and type:
root[0] gSystem->AddIncludePath("-I$QTDIR/include");
root[1] gSystem->AddIncludePath("-I$QTDIR/include/QtCore -I$QTDIR/include/QtGui");
root[2] .L addLabel.C+
root[3] .x $ROOTSYS/tutorials/hsimple.C
root[4] addLabel(gPad);
to get the picture attached.