TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I was looking for a way to beautifully display UML stereotype titles including angle brackets like you can see here:

I like

What I came up with is $\mathtt{\ll metaclass\gg}$, however, as you can see here

don't like

the brackets are too pointy (I hope you know what I mean) and the spacing between brackets and expression is too big.

Short version: Does anyone know a command for according brackets?

share|improve this question

migrated from stackoverflow.com Feb 28 '12 at 0:36

This question came from our site for professional and enthusiast programmers.

Choose a different font? – meagar Feb 27 '12 at 22:15

Use the T1 font encoding to access \guillemotleft and \guillemotright:

enter image description here

\usepackage[T1]{fontenc}% http://ctan.org/pkg/fontenc
$\ll$~\texttt{metaclass}~$\gg$ \par
\guillemotleft~\texttt{metaclass}~\guillemotright \par
\guillemotleft$\;$\texttt{metaclass}$\;$\guillemotright \par
\guillemotleft\,\texttt{metaclass}\,\guillemotright \par

The above sequence lists some spacing options: ~, $\;$, \, and {} (none).

share|improve this answer
If you should get a pixelated font in your output when using \usepackage[T1]{fontenc}, have a look at tex.stackexchange.com/questions/1291/…. – doncherry Feb 28 '12 at 1:25
As ekk said the spacing between brackets and expression is to big, I'd remove the spaces altogether or suggest using \,. – doncherry Feb 28 '12 at 1:27
Brilliant, exactly what I was looking for. Thank you very much! – ekk Feb 28 '12 at 11:09
Why not listing also the possibity of doing \texttt{<<metaclass>>}? Notice that with T1-encoded fonts the combinations << and >> produce the guillemets. – egreg Feb 28 '12 at 11:16

Here is a TikZ-based solution:


    \begin{tikzpicture}[scale=.20,line width=.15ex,join=round,cap=round]
      \draw ( 0,0) -- +(-.5,.5) -- +(0,1);
      \draw (.5,0) -- +(-.5,.5) -- +(0,1);
    \begin{tikzpicture}[scale=.20,line width=.15ex,join=round,cap=round]
      \draw ( 0,0) -- +(.5,.5) -- +(0,1);
      \draw (.5,0) -- +(.5,.5) -- +(0,1);

share|improve this answer
I don't think it is good to use TikZ to emulate guillemets. It's an unnecessary complexity, it does not match the font style and can't be searched for/copied in the PDF. – Andrey Vihrov Feb 28 '12 at 8:51
I think it looks better than guillemets, but maybe that's just me. – Todd Lehman Feb 28 '12 at 9:23

I have come up with three solutions:



% These two packages contain the symbols I hacked (a bit) to get the desired effect:


% Here the symbols are hacked (rotated and shifted as needed):




% This is the first solution: just switch to typewriter font:


% Here's the solution with MnSymbol:


% Here's the skak-based solution:



As you can see the symbols from MnSymbol work only in math mode, while the skak symbols are text mode.

And here are the three solutions lined up:

enter image description here

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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