47

I need the characters «» in my LaTeX document. I'm writing in English though, and I don't want to use Babel. I have the following hack but I'd like a better way:

\newcommand{\q}[1]{{%
\font\larm = larm1000%
\larm%
\char 190}{#1}{%
\font\larm = larm1000%
\larm%
\char 191}}
54

There are several ways to do this:

  • With standard methods, you will find \guillemotleft and \guillemotright. For this you need \usepackage[T1]{fontenc} (which is recommended anyways).
  • Using the language switching capabilities of babel, e.g. \foreignlanguage.
  • Using csquotes and its \foreignquote command.

Personally, I would recommend the third option.

The similar looking mathmode symbols ≪ and ≫ (much less/greater than) are created with \ll and \gg.

6
  • 9
    I'd probably favour csquotes, as it means you keep the semantics of the mark-up and can reuse the source in other places more readily. – Joseph Wright Sep 2 '10 at 18:34
  • 10
    Unfortunately it is indeed spelled incorrectly. It should be guillemetleft and guillemetright (with an "e"). A guillemot with an "o" is a seabird :-) But I think we're stuck with it. – Peter Flynn Jan 19 '12 at 10:48
  • @PeterFlynn In my case it works only with ''o''. – Dog_69 Oct 16 '19 at 22:51
  • 1
    Of course. Read what I said. It was misspelled when created. – Peter Flynn Jan 4 '20 at 12:19
  • See my last answer, \MarkOuterQuote{"} is simpler with csquote package – Metal3d Apr 28 '20 at 7:01
28

There's also a convenient way to do it with Latin Modern:

\documentclass{article}

\usepackage{lmodern}

\begin{document}

<<Quoted text>>.

\end{document}
3
  • 1
    Nice and intuitive! – Hendrik Vogt Mar 8 '11 at 15:59
  • Tried inside a knitr document. and this was the only way that really worked for me. I must admit I am surprised cause the other answers looked sound, too. However thanks Andrey! – hans0l0 Dec 19 '12 at 9:45
  • Does not work for me. I use koma-script book with babel – lalebarde May 6 '14 at 15:03
13

You could type it directly if you use an utf8 encoding :

\documentclass{minimal}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
«for exemple»
\end{document}

But, the spacing isn't — at least for french typography — correct

12

I find this way is very convenient:

package: \usepackage[frenchb]{babel}

in text: \og text \fg{}

2
  • 4
    This is indeed the correct way when using French with babel. – egreg Oct 31 '14 at 20:35
  • @egreg and wrong for non-French text. – vonbrand Sep 1 '18 at 23:09
2

The best I now use in french is:

\usepackage{csquotes}
\MakeOuterQuote{"}

I now can use " to as "guillemet" and it's correctly replaced by « and »

2
  • This did not work in French for me. – Cedric Aug 3 '20 at 13:04
  • Weird, it works perfectly for me (I'm french) – Metal3d Jan 9 at 8:35
1

I tried several of those options all leading to a small square instead of «». This did the trick for me.

\documentclass{article}  
\usepackage[francais]{babel} % guillemets \og text \fg{}
\usepackage{aeguill} % guillemets
 \begin{document}
 \og text \fg{}
 \end{document}
1
  • The OP requests this without use of Babel. Also, Babel has various unwanted side effects such as hyphenation, change of parindent in the first line, change of itemization bullets etc. – Nobody-Knows-I-am-a-Dog Mar 28 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy