41

How do I produce the output >> in a LaTeX Beamer presentation?

When I write >> or \textgreater\textgreater, I get this symbol, which I believe to be the guillemet(»):

»

I do not want this symbol. I want literally two greater-than symbols, in the context of

Use >> to append to a file, as in date >> dates

phihag
  • 667
  • In what context do you want this symbol to occur? Is this a prompt? – jub0bs Apr 28 '14 at 15:13
  • 2
    Typing >> was once a way to obtain \guillemotright if babel was loaded with the french(b) option. But the latter consists in only one symbol (», unicode 00187), and you can have it directly in any unicode editor with a suitable keyboard driver. You can obtain something similar in maths with the \gg command. – Bernard Apr 28 '14 at 15:25
  • 2
    If you don't want the symbols to be considered part of the same ligature, then use >{}>. – Werner Apr 28 '14 at 18:40
  • 1
    @Jubobs I've updated the question. Although it has been closed as a duplicate, I do not understand how it's a duplicate - I do not want the guillemet, but an output that is literally >>. – phihag Apr 28 '14 at 18:40
  • @Werner Thank you very much, that solves my problem. Do you want to make it as a formal answer so I can accept it? – phihag Apr 28 '14 at 18:42
  • Being this a command, I would use (probably embedded somewhere) a \verb command. You will need it for other things, like # or similar... compare >{}> \texttt{>{}>} \verb|>>| – Rmano Apr 28 '14 at 19:28

2 Answers2

33

You can use the math mode \gg just for that symbol. If you think they are too close together, you could use >> (again in math mode) with some negative space \! between them to bring them together a bit.

\(\gg\)
\(>\!\!>\)

enter image description here

erik
  • 12,673
27

If you want to avoid the automatic combining of characters, separate them using an empty group >{}>:

\documentclass{article}
\usepackage[T1]{fontenc}
\begin{document}
>> >{}>
\end{document} 

enter image description here

Werner
  • 603,163
  • 12
    If you want/need this to work with LuaTeX then something like >\null> or \>\hbox{}> is needed as LuaTeX doesn't treat {} as breaking up the ligature here. – Joseph Wright Apr 28 '14 at 19:21