Quotation Marks in LaTeX

Open a quotation with two backquotes (the key left of 1) and close it with two apostrophes; single quotes use one of each. The straight " key gives two closing marks, which is why quotes look backwards. With the csquotes package, \enquote{text} picks the right marks for you.

Quote marks

  • “ ” (typed directly)
    Text mode, no math preview

    Curly quotes typed in a UTF-8 document also work.

  • \enquote{text}
    Text mode, no math preview

    csquotes: correct marks for the language, nested quotes switch to single.

  • \begin{quote} ... \end{quote}
    Text mode, no math preview

    Indented block for short quotations.

  • \begin{quotation} ... \end{quotation}
    Text mode, no math preview

    Block for long, multi-paragraph quotations.

  • \textquotedbl
    Text mode, no math preview

    A straight " character when you really need it.

Try it live

Change the formula and the preview redraws as you type. Copy the LaTeX, download a PNG or SVG, copy it for Word, or use Edit here on any example below to load it.

Templates

Quotation marks examples

Each result below is drawn from the LaTeX under it. Copy the code, edit it on this page, or open it in the full editor.

  • Quoted words in a formula

    the “golden ratio”  φ = 1 + 5 2
    LaTeX
    \text{the “golden ratio” } \varphi = \frac{1 + \sqrt{5}}{2}
  • Prime marks are not quotes

    f ′ ( x ) f ″ ( x )
    LaTeX
    f'(x) \quad f''(x)

    In math an apostrophe is a prime for derivatives, not a closing quote.

In a LaTeX document

These commands work in the text of a .tex document (Overleaf, TeX Live, MiKTeX), not inside math. The box on the right shows what the compiled PDF looks like.

  • Double and single quotes

    LaTeX
    He said ``hello'' and then `goodbye'.
    Compiled result

    He said “hello” and then ‘goodbye’.

  • What the " key gives

    LaTeX
    He said "hello".
    Compiled result

    He said ”hello”.

  • csquotes

    LaTeX
    \usepackage[autostyle]{csquotes}
    ...
    She wrote \enquote{the term \enquote{proof} is precise}.
    Compiled result

    She wrote “the term ‘proof’ is precise”.

Why quotes come out backwards

LaTeX was designed for keyboards with separate opening and closing quote keys. The straight double-quote key produces a closing mark, so "text" becomes ”text”: two closing quotes. Typing two backquotes before and two apostrophes after gives the correct “text”.

Other languages and code

csquotes with babel selects German „…“, French « … » or Swiss styles from the document language. In verbatim and listings, quote characters are printed straight, as in code.

Common mistakes

  • The straight key gives closing marks on both sides.

    Instead of
    "quoted"
    Write
    ``quoted''
  • Two apostrophes at the start also give closing marks.

    Instead of
    ''quoted''
    Write
    ``quoted''
  • \enquote comes from csquotes.

    Instead of
    \enquote{text}  (no csquotes)
    Write
    \usepackage{csquotes}

In Overleaf, MathJax and Word

  • Overleaf and pdfLaTeX

    Backquotes and apostrophes work without packages; csquotes is preinstalled.

  • MathJax and KaTeX

    In MathJax and KaTeX use curly quotes inside \text{}; the backquote convention is not applied on the web.

  • Microsoft Word

    Word replaces straight quotes with curly ones automatically (AutoFormat As You Type › "Straight quotes" with “smart quotes”).

Already have the whole document?

Move complete papers between PDF, Word and LaTeX without retyping; every equation stays editable.

Single printed formulas are free: 3 a day without an account, 6 with a free account. New accounts get 30 credits to try handwriting, pages and documents; failed conversions return their credits. See plans and credit prices.

Quotation marks in LaTeX: questions

How do I type quotation marks in LaTeX?
Type two backquotes (the key left of 1) before the text and two apostrophes after it, as in the first example above.
Why are my quotes backwards?
The " key prints closing quotes. Use backquotes for the opening mark.
How do I write single quotes?
One backquote to open and one apostrophe to close.

Have the formula as a picture?

Paste a screenshot or photo of the equation and get its LaTeX, ready to copy or open in the editor.

Convert an image to LaTeX