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 have the following piece of text which I want to output literally: <<"Welcome">>. However it's converted to those funky quotations. I've been trying all sorts of things with \ mostly but to no avail.

\verb=!<<"Welcome">>! kind of works, or gets the job done, but then it loses all other formatting (font face, size, etc.) as well.

share|improve this question
@stephan, your \! does not appear.. – Yossi Farjoun Feb 14 '11 at 14:54
up vote 7 down vote accepted

A quick solution would be to use inline math mode: $<<$``Welcome''$>>$

edit: if you want to preserve formatting, have you considered \textgreater and \textless ?

share|improve this answer
No I haven't, but I'll google what they are about! – Till Feb 13 '11 at 21:10
Thanks again for the quick help! – Till Feb 13 '11 at 21:14

I don't think the less-than and greater-than signs are that pretty here. You might try instead:

  • $\langle\langle$``Welcome''$\rangle\rangle$ for angle brackets that are narrower and taller than the mathematical relations.
  • ![\guillemotleft``Welcome''\guillemotright][1] for french quotation marks. Make sure you also have \usepackage[T1]{fontenc} in the preamble.

enter image description here

To be honest I don't think any of those look that pretty, but it is what you asked for. :-D

share|improve this answer
And $\ll$, $\gg$ – Leo Liu Feb 13 '11 at 20:12
@Leo Liu: good one. I added it to my answer. – Matthew Leingang Feb 13 '11 at 20:23
It's a code listing. I have pretty much no control over what it says and I need to display it. Thanks though, I learned a lot! – Till Feb 13 '11 at 21:10

This may be what you want:

enter image description here





For code listing, you can use listings package:

enter image description here


  literate={<<}{\guillemotleft}1 {>>}{\guillemotright}1




You can modify the literate as you wish.

share|improve this answer
Looks pretty sweet and I salute you for you fu! Unfortunately, it's a code listing. But I will keep this in mind! – Till Feb 13 '11 at 21:09
@Till: You didn't mention that. My previous solution use lisings package especially for code listing. But I thought it's normal text and deleteted it. You may have a look at the edit history of this question (click the time after edited). – Leo Liu Feb 13 '11 at 21:31
I recovered the previous solution. – Leo Liu Feb 13 '11 at 21:34
Thanks for editing and extending your answer. I'll make sure to provide more details next time. – Till Feb 13 '11 at 22:35

You can simply use brackets around one of your < or > symbol to avoid merging it with the second one. For example <{<}My text{>}>.

share|improve this answer
This implies << necessarily merges. Why is that? – Werner Jun 16 at 20:39

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.