4

How do I define a new command that will surround given text with Quine corners?

I'm looking for something that will take me from:

$\qquote{Ixy}$ %Where "\qquote" is the name of the new command

to

$\ulcorner Ixy \urcorner$
0
5
\documentclass{article}
\usepackage{amsmath,amssymb}

\newcommand\qquote[1]{\ulcorner#1\urcorner}

\begin{document}

$\qquote{lxy}$

\end{document}

enter image description here

Notice that I didn't use $...$ in the definition to avoid possible errors when trying to write the command inside another math-mode expression such as in $a=\qquote{b}$, for example. Some people would then opt for a definition using \ensuremath:

\newcommand\qquote[1]{\ensuremath{\ulcorner#1\urcorner}}

so you can use \qquote both in math and text modes. I personally prefer not to use \ensuremath and to "force" the use of \qquote only in math-mode.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.