Sign up ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

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.

        [.\node(html){\textbf{$<$html$>$}}; ]

enter image description here

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

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

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
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

Not the answer you're looking for? Browse other questions tagged or ask your own question.