# Typesetting Quine quotes

The obvious way of typesetting Quine quotes, also known as quasi-quotation marks, in LaTeX doesn't work well when the content of the quote is tall. For example:

\documentclass[12pt]{article}
\usepackage{amssymb}
\begin{document}
$\left\ulcorner \frac{1}{2} \right\urcorner$
\end{document}


This seems odd, given that \ulcorner (resp. \urcorner) is in the mathopen (resp. mathclose) class. Is there some way of getting LaTeX to automatically raise the quotes to match the height of the content?

Edit. I forgot to mention that I would very much prefer a solution that works with unicode-math.

-

For good results \left and \right need support at font level for their delimiters. For example, MnSymbol supports resizable corners:

\documentclass[12pt]{article}
\usepackage{MnSymbol}
\begin{document}
$\left\ulcorner \frac{1}{2} \right\urcorner$
\end{document}


However, loading MnSymbol also affects the appearance of other math symbols.

The following example only uses the relevant part of MnSymbol to get the two corner symbols:

\documentclass[12pt]{article}

\makeatletter
\DeclareFontFamily{OMX}{MnSymbolE}{}
\DeclareSymbolFont{MnLargeSymbols}{OMX}{MnSymbolE}{m}{n}
\SetSymbolFont{MnLargeSymbols}{bold}{OMX}{MnSymbolE}{b}{n}
\DeclareFontShape{OMX}{MnSymbolE}{m}{n}{
<-6>  MnSymbolE5
<6-7>  MnSymbolE6
<7-8>  MnSymbolE7
<8-9>  MnSymbolE8
<9-10> MnSymbolE9
<10-12> MnSymbolE10
<12->   MnSymbolE12
}{}
\DeclareFontShape{OMX}{MnSymbolE}{b}{n}{
<-6>  MnSymbolE-Bold5
<6-7>  MnSymbolE-Bold6
<7-8>  MnSymbolE-Bold7
<8-9>  MnSymbolE-Bold8
<9-10> MnSymbolE-Bold9
<10-12> MnSymbolE-Bold10
<12->   MnSymbolE-Bold12
}{}
\DeclareMathDelimiter{\ulcorner}
{\mathopen}{MnLargeSymbols}{'036}{MnLargeSymbols}{'036}
\DeclareMathDelimiter{\urcorner}
{\mathclose}{MnLargeSymbols}{'043}{MnLargeSymbols}{'043}
\makeatother

\begin{document}
$\left\ulcorner \frac{1}{2} \right\urcorner$
\end{document}

-
Actually, I'm using unicode-math, so MnSymbol is not even an option for me. –  Zhen Lin Apr 18 '13 at 13:44
What is required to obtain the other two corners \llcorner and \lrcorner? –  flamingpenguin Aug 22 at 10:24
@flamingpenguin An editor with the ability to replace \ulcorner by \llcorner and \urcorner by \lrcorner :-) –  Heiko Oberdiek Aug 22 at 13:52

The scalerel package can stretch or scale the symbols, but that may not be what you want. On the other hand, if the quotes are just shifted, is the meaning unambiguous, or could the quotes be misiniterpreted to apply to the numerator only? (I don't know how they are used). Otherwise, if just shifting is acceptable, use \atop

\documentclass[12pt]{article}
\usepackage{scalerel}
\usepackage{amsmath}
\usepackage{amssymb}
\begin{document}
$\stretchleftright{\ulcorner}{\displaystyle\frac{1}{2}}{\urcorner}$

$\scaleleftright{\ulcorner}{\displaystyle\frac{1}{2}}{\urcorner}$

${\ulcorner \atop \phantom{2}} \frac{1}{2} {\urcorner \atop \phantom{2}}$

\end{document}


-
This works in unicode-math, though the results are ugly. Thanks for the suggestion! –  Zhen Lin Apr 18 '13 at 13:48