122

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.

3
  • 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
    Commented Dec 1, 2011 at 15:23
  • 1
    meh, emacs automatically replaces " with `` and '' as appropriate when I type, it also highlights text like a boss.
    – crasic
    Commented Dec 1, 2011 at 21:33
  • @crasic tex.stackexchange.com/questions/39285/…
    – matth
    Commented Apr 21, 2012 at 10:30

10 Answers 10

107

You can just define your own macro:

\newcommand{\quotes}[1]{``#1''}
...
\quotes{Hello World!}
3
  • 3
    I found this as the most natural solution, and I defined the \q instead of \quotes, for brevity.
    – Sophivorus
    Commented Aug 22, 2013 at 12:29
  • 1
    Out of curiosity, what does the 1 and #1 stand for?
    – warship
    Commented Aug 30, 2015 at 5:51
  • 13
    1 denotes that \quotes takes one argument. #1 denotes that argument.
    – CKM
    Commented Feb 14, 2016 at 5:01
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

4
  • 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. Commented Dec 1, 2011 at 15:14
  • 3
    @HarroldCavendish I believe however that csquotes is far more advanced and flexible.
    – N.N.
    Commented Dec 1, 2011 at 16:32
  • @HarroldCavendish It might be an idea to write answers for the packages you're thinking of. Completeness!
    – N.N.
    Commented Dec 1, 2011 at 19:10
  • It appears that csquotes is language-aware: Package csquotes Warning: No style for language 'marathi'. (csquotes) Commented Sep 18, 2023 at 1:01
19

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}.

2
  • 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. Commented Sep 18, 2023 at 1:05
  • This is the answer that countless internet users have no doubt been seeking. It answers the question, "Shouldn't there be a package that lets me just type double quotes normally?" Thank you.
    – sh37211
    Commented May 13 at 12:16
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.

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.

0
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}
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
    }
3
  • Welcome to tex.se! Commented Oct 28, 2016 at 12:50
  • Can some explain how this works?
    – clay
    Commented May 24, 2017 at 13:58
  • 1
    Looks promising, but this seems to make all my non-breaking spaces become quote characters.
    – beldaz
    Commented May 28, 2018 at 2:11
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.

6
  • 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
    Commented Dec 1, 2011 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
    Commented Dec 1, 2011 at 16:18
  • 4
    @Seamus They are also used in Greek, whoever invented them should have been <<guillotined>>. Interestingly both the Greeks as well as the Norwegians almost got rid of them now (mainly due to the web influence).
    – yannisl
    Commented Dec 1, 2011 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’). Commented Dec 1, 2011 at 17:20
  • 2
    On Ubuntu guillemets can be obtained using the awesome Compose key as follows: ComposeKey+ << or >>
    – Seamus
    Commented Dec 1, 2011 at 18:07
2

\textquotedblleft and \textquotedblright use is best

2
  • 4
    How is that "best"? Commented Jul 13, 2018 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
    Commented Jul 13, 2018 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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .