[Tex/LaTex] How to get double angle brackets, i.e. – << >>

math-modesymbols

I can create an angle bracket with the commands $\langle and \rangle$.

So if I want to say something like

IList<T>

I can achieve this with

IList $\langle T \rangle$

But I am unable to create double angled brackets. I am trying to say:

(Expression<Func<T, bool>>)

And I cannot get the two sets of angle brackets in place. Can anyone advise how I can get double angle brackets to work?

EDIT:

Actually, I just found that I can do the following to get double angle brackets:

$\llangle and \rrangle$

However, its still not possible to have two single left angle brackets followed by a double angle, which is what I need for the expression above.

Best Answer

The following works for me:

Expression\(\langle\)Func\(\langle\)T, bool\(\rangle\rangle\)

(\(…\) is the same as $…$ but the latter is deprecated in LaTeX.)

Notice that you probably want to define macros for this to make it more readable:

\newcommand*\template[1]{\(\langle\)#1\(\rangle\)}
…
Expression\template{Func\template{T, bool}}