I'm newbie to TikZ. When I use < and > in matrix, they are interpreted to some other symbols. The following code

  \matrix [matrix of nodes] {
    <hello> & world\\


will produce PDF and SVG:

¡hello¿ world

<hello> was translated to ¡hello¿.


  1. Why?
  2. How do I input angle bracket in matrix
  • 1
    This is unconnected to tikz, try \begin{document} <hello> world\end{document} You could add \usepackage[T1]{fontenc} although less than and greater than signs do not really make good angle brackets, better to use $\langle$ and $\rangle$ or \guillemotleft and \guillemotright – David Carlisle Aug 23 '15 at 20:59
  • @DavidCarlisle True. I was using \usepackage[T1]{fontenc} all the time but never really knew its purpose. Thanks. – gongzhitaao Aug 23 '15 at 21:02

Ad. 1. < and > give inequality marks only in math mode. You can write, e.g., $<$hello$>$. You have also symbols to use directly in text mode, but their names are longer than 3 characters, hence my suggestion.

  • So if not in math mode, they are interpreted otherwise? For what purpose? – gongzhitaao Aug 23 '15 at 20:45
  • 1
    @gongzhitaao In the times of origin of TeX fonts needed a huge amount of computer processor and memory, hence the original ones have only 128 characters (and math font 256 characters) and in place of ASCII < and > there are in most of text fonts Spanish reversed ! and ?. – Przemysław Scherwentke Aug 23 '15 at 20:53
  • 1
    This is only true in OT1 encoding if you use \usepackage[T1]{fontenc} you will get the expected symbols. – David Carlisle Aug 23 '15 at 20:55
  • @DavidCarlisle Certainly. This is the case of reverse compatibility. However I hope that such a simplification is proper for a newbie. Edit: Sorry, newbie in TikZ, not TeX. – Przemysław Scherwentke Aug 23 '15 at 20:58
  • @PrzemysławScherwentke Thanks for your excellent explaination. Never knew that reverse ! and ? reason. – gongzhitaao Aug 23 '15 at 21:01

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