121

The standard way of writing quotes and double quotes in LaTeX is with `` and '', but I find them quite ugly. Isn't there something similar to \emph{}, but for quotes? I mean something like \quotes{quoted text goes here}.

I've been looking but couldn't find any, maybe you guys can.

Caramdir
  • 89,023
  • 26
  • 255
  • 291
Sophivorus
  • 1,283
  • 2
  • 9
  • 6
  • Welcome to TeX.sx! Your question was migrated here from Stack Overflow. Please register on this site, too, and make sure that both accounts are associated with each other, otherwise you won't be able to comment on or accept answers or edit your question. – Werner Dec 01 '11 at 15:23
  • 1
    meh, emacs automatically replaces " with `` and '' as appropriate when I type, it also highlights text like a boss. – crasic Dec 01 '11 at 21:33
  • @crasic http://tex.stackexchange.com/questions/39285/whats-the-advantage-of-using-csquotes-over-using-an-editors-auto-replacement-f – matth Apr 21 '12 at 10:30

10 Answers10

123

If you load csquotes by \usepackage{csquotes} you can use \enquote{quoted text}. The package's macros are context sensitive such that the quotation marks are adapted appropriately when nested and to the language used by babel. It also has other great features such as facilities for block quotations and integration with biblatex. Here's a simple example:

\documentclass{article}

\usepackage{csquotes}

\begin{document}

\enquote{quote}

\enquote*{quote}

\enquote{quote \enquote{quote in quote}}

\end{document}

Output of example

N.N.
  • 36,163
  • 1
    Some other packages provide similar functionality. For example \usepackage[slovak]{babel} allows the usage of the command \uv{}. OP, you can also define your own command on a similar basis. – Harold Cavendish Dec 01 '11 at 15:14
  • 3
    @HarroldCavendish I believe however that csquotes is far more advanced and flexible. – N.N. Dec 01 '11 at 16:32
  • @HarroldCavendish It might be an idea to write answers for the packages you're thinking of. Completeness! – N.N. Dec 01 '11 at 19:10
  • It appears that csquotes is language-aware: Package csquotes Warning: No style for language 'marathi'. (csquotes) – Kedar Mhaswade Sep 18 '23 at 01:01
104

You can just define your own macro:

\newcommand{\quotes}[1]{``#1''}
...
\quotes{Hello World!}
Werner
  • 603,163
18

I use the following in all my latex documents:

\usepackage[autostyle=false, style=english]{csquotes}
\MakeOuterQuote{"}

With this, you can simply quote your text like "this", and csquotes will change it to

``this''

The drawback is that if you forget a " it messes up the parity everywhere with no warning. Also, If you need nested quotes, you will have to use \enquote{this}.

Stefan Pinnow
  • 29,535
  • Thank you for "style=english". This takes care of my problem when my document language is non-English and I want to retain English quoting. – Kedar Mhaswade Sep 18 '23 at 01:05
10

FWIW, ConTeXt MkIV disables these "smart quotes" by default. So

\starttext
 ``a''
\stoptext

gives you exactly what you type! The recommended way of getting quotes is to type and (most editors give a keyboard short cut for this) or use \quotation{...}. The \quotation macro is language specific, so it gives you the correct quotes in English (“—”), French (« — »), etc.

Aditya
  • 62,301
9

I think \lq and \rq might just work for single quotes. Use them twice for double-quotes. if you have something like "this is a quote' " do this on the end \rq\,\rq\rq.

Joseph Wright
  • 259,911
  • 34
  • 706
  • 1,036
6

The well established textcmds package provides equivalents of macro suggestions in several of the answers, in particular there is \qq for double quoted text and \q for single quoted:

Sample output

\documentclass{article}

\usepackage{textcmds}

\begin{document}

Some \qq{quoted} material.  Another quote \q{style}.

\end{document}
Andrew Swann
  • 95,762
3

I use this bit of code at the top of my tex file. Just use the regular double quote on your keyboard

"

at the beginning and end of each quote. It will select the open and closing double quotes for you,

\newif\ifquoteopen
    \catcode`\"=\active 
    \DeclareRobustCommand*{"}{%
       \ifquoteopen
         \quoteopenfalse ''%
       \else
         \quoteopentrue ``%
       \fi
    }
sqrepants
  • 131
2

Either with Win XP or Linux your keyboard should have those: »«. The technical term in German for Win XP is »Eingabegebietsschemaleiste«, which I cannot translate; it simply is the layout of your keyboard depending of the country.

EDIT: Following Seamus' comment, find out how to type Guillemets with your keyboard.

Keks Dose
  • 30,892
  • I think the English term is simply Language Bar (cf. German vs. English). I don't quite gather the point of your post though, perhaps you could make it a bit more explicit. Afaik, the Language Bar allows you to switch your keyboard layout quickly, but neither the standard German nor the Standard English layout features »«? – doncherry Dec 01 '11 at 16:03
  • 6
    They're sometimes called "guillemets". Apparently, this is "in honour of French typcutter Guillaume le Bé, who may have invented them". (Bringhurst p.310) – Seamus Dec 01 '11 at 16:18
  • 4
    @Seamus They are also used in Greek, whoever invented them should have been <>. Interestingly both the Greeks as well as the Norwegians almost got rid of them now (mainly due to the web influence). – yannisl Dec 01 '11 at 16:59
  • 1
    On Mac, guillemets are available in the basic qwerty layout at alt-\ («) and alt-| (»). Note that in LaTeX you can type them using << and >> (possibly requires babel and a specific language). But as Yannis suggests, they are used differently depending on the language (e.g. in «french» or in »german«, so this is really if you want to nitpick on typographic details. The curly quotes that everyone understands are similarly available with alt/alt-shift on the [{ key (“double”) or the ]} key (‘simple’). – Damien Pollet Dec 01 '11 at 17:20
  • 2
    On Ubuntu guillemets can be obtained using the awesome Compose key as follows: ComposeKey+ << or >> – Seamus Dec 01 '11 at 18:07
  • In Gnome, certain keyboard layouts will have guillemets as Right Alt+[ and Right Alt+]. – Andrey Vihrov Dec 01 '11 at 21:01
2

\textquotedblleft and \textquotedblright use is best

  • 4
    How is that "best"? – Phelype Oleinik Jul 13 '18 at 11:36
  • 3
    Of course it depends on your definition of "best", but I would argue that the semantic markup of csquotes or even the poor man's version of it (\newcommand{\quotes}[1]{``#1''}) is far superior to \textquotedblleft/\textquotedblright. For one it is more semantic and can be made even more semantic and secondly it is much shorter to type and one does not have to worry about spaces being eaten by the commands. – moewe Jul 13 '18 at 11:39
1

If you're on Emacs there's typopunct.el, which has a number of useful functions. In buffers with typopunct-mode on, ' and " are always input as their curly versions. http://www.emacswiki.org/emacs/typopunct.el

tyche
  • 137