# How to use non-alphabetical symbols respectively characters like '<' and '>' in Tikz qtree node labels? [duplicate]

I am trying to use label nodes for a tikz qtree that include the lower-than < and greater-than > characters like shown in the first node of the example below. The problem is that instead of showing < and > some other strange symbols are presented - see first node label of the picture below.

While the second node does solve the problem somehow by just forcing < and > to be in math-mode I seek for a solution which also forces the text to accept the \textbf command it is enclosed in.

\documentclass[border=3mm]{standalone}
\usepackage{tikz}
\usepackage{tikz-qtree}
\begin{document}
\begin{tikzpicture}
\Tree
[.\node(html){\textbf{<html>}};
[.\node(html){\textbf{$<$html$>$}}; ]
]
\end{tikzpicture}
\end{document}

1. Is there a solution?
2. What is the reason for this - in my eyes - strange behavior?
-

## marked as duplicate by Alan Munn, percusse, lockstep, Kurt, Martin SchröderMar 27 '13 at 13:47

Use \usepackage[T1]{fontenc}. – Ulrike Fischer Mar 27 '13 at 12:55
@UlrikeFischer : \usepackage[T1]{fontenc} works ... but why? – petermeissner Mar 27 '13 at 13:02
@peter-m you can find a possible explanation in my answer below – domenico Mar 27 '13 at 13:08
Just a note about method and problem diagnosis for future reference: your example has nothing to do with tikz-qtree or tikz at all. This is why constructing true minimal examples is important in diagnosing problems. The minimal example that shows the problem is simply a document that contains just <> and no other packages loaded. – Alan Munn Mar 27 '13 at 13:11

use \textless and \textgreater

from The Comprehensive LaTeX Symbol List (pag. 114)

The characters “<”, “>”, and “|” do work as expected in math mode, although they produce, respectively, “¡”, “¿”, and “—” in text mode when using the OT1 font encoding.[13] The following are some alternatives for typesetting “<”, “>”, and “|”:

– Specify a document font encoding other than OT1 (as described on page 8).

– Use the appropriate symbol commands from Table 2 on page 9, viz. \textless, \textgreater, and \textbar.

– Enter the symbols in math mode instead of text mode, i.e., , and $|$.

[13] Donald Knuth didn’t think such symbols were important outside of mathematics so he omitted them from his text fonts.

-
I needed to to greater then or equal to in my or gates so i used $\ge$1 according to this suggestion. Thanks. – span Oct 27 '13 at 13:25