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.

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.

share|improve this question

2 Answers 2

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}

enter image description here

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

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}

Result

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}
share|improve this answer
    
Actually, I'm using unicode-math, so MnSymbol is not even an option for me. –  Zhen Lin Apr 18 '13 at 13:44

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.