Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I know I can get these fancy quotes

`abc'

enter image description here

I want to get those quotes separately. I know how to get the left one:

{`}a

enter image description here

But when I try just the right one, I get a different quote then when used together:

abc{'}

enter image description here

How can I get the right curved one alone in math mode?

I am using pdflatex.

share|improve this question
    
Can you please explain better? Aren't you getting single quotes with `abc'? –  egreg Mar 4 at 14:39
    
@egreg edited. I get a different right quote when I use that one separately. –  Sergey L. Mar 4 at 14:42
    
That's not the default behaviour for text mode. Perhaps some package is causing this. Can ypu please add a complete, minimla document, showing the undesired output? –  Gonzalo Medina Mar 4 at 14:43
    
You get a prime only in math mode. Is your aim to get a right quote in math mode? If so, please change the title and the text of the question accordingly. –  egreg Mar 4 at 14:43
4  
\usepackage{amsmath} and $abc{\text{'}}$. –  Gonzalo Medina Mar 4 at 14:45
show 1 more comment

2 Answers 2

In math mode ' produces a prime; to get the closing quotation mark in math mode you can use \text from amsmath:

\documentclass{book}
\usepackage{amsmath}

\begin{document}
$abc' \quad abc{\text{'}}$
\end{document}

enter image description here

share|improve this answer
add comment

In math mode, typing ' is equivalent to typing ^{\prime}, '' to ^{\prime\prime} and so on.

If you need “real” quotes in math mode, you have to define a math character for them. Typing ` is not guaranteed to give the desired result.

You can define

\DeclareMathSymbol{\mlq}{\mathord}{operators}{``}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{`'}

Complete example:

\documentclass{article}

\DeclareMathSymbol{\mlq}{\mathord}{operators}{``}
\DeclareMathSymbol{\mrq}{\mathord}{operators}{`'}
\DeclareMathSymbol{\mlqq}{\mathord}{operators}{"5C}
\DeclareMathSymbol{\mrqq}{\mathord}{operators}{`"}

\begin{document}
$\mlq a\mrq$

$\mlqq a\mrqq$
\end{document}

enter image description here

See http://tex.stackexchange.com/a/161253/4427 for a similar setup, but in that case relations were concerned.

share|improve this answer
add comment

Your Answer

 
discard

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.