[texhax] Corners

Michael Barr barr at barrs.org
Sat Feb 24 00:03:15 CET 2007


You may want to see what I put together:

\def\corners#1{\mathchoice
  %
       {\mathop{\vbox{\m at th\ialign{##\crcr\noalign{\kern-6\p@}%
       $\m at th\ulcorner\hfill\urcorner$%
       \crcr\noalign{\kern-6\p@\nointerlineskip}%
       $\hfil\displaystyle{\,#1\,}\hfil$\crcr}}}\limits}%
  %
       {\mathop{\vbox{\m at th\ialign{##\crcr\noalign{\kern-6\p@}%
       $\m at th\ulcorner\hfill\urcorner$%
       \crcr\noalign{\kern-6\p@\nointerlineskip}%
       $\hfil\textstyle{\,#1\,}\hfil$\crcr}}}\limits}%
  %
       {\mathop{\vbox{\m at th\ialign{##\crcr\noalign{\kern-4\p@}%
       $\m at th\scriptstyle\ulcorner\hfill\urcorner$%
       \crcr\noalign{\kern-4\p@\nointerlineskip}%
       $\hfil\scriptstyle{\,#1\,}\hfil$\crcr}}}\limits}%
  %
       {\mathop{\vbox{\m at th\ialign{##\crcr\noalign{\kern-3\p@}%
       $\m at th\scriptscriptstyle\ulcorner\hfill\urcorner$%
       \crcr\noalign{\kern-3\p@\nointerlineskip}%
       $\hfil\scriptscriptstyle{\,#1\,}\hfil$\crcr}}}\limits}%
  }

Michael


On Fri, 23 Feb 2007, Uwe Lueck wrote:

> Michael Barr <mbarr at math.mcgill.ca> schrieb am 04.12.2006 16:27:04:
>>
>> My journal is reprinting a forty year old paper that has a construction
>> that consists of a string (usually of one two characters) surrounded by
>> corners.  You get something like what I want from \ulcorner#1\urcorner
>> (these are from an AMS symbol font).  However that construction produces
>> ugly looking spaces between the corners and their argument.  I would like
>> to raise the corners, move them over, then add some extra space around the
>> whole construction.  One complication is that they will have to put in
>> boxes to raise them, which means that they won't know if they are in a
>> sub/superscript or not.  I could kludge something together using
>> \mathchoice, but it will ugly.  Is there a better way of doing this, or
>> has someone already done it?
>
> No answer!? (Next time:) \mathchoice (\mathpalette!?) is good,
> together with \hspace (positive arg), \hspace* (negative arg),
> \raisebox from LaTeX.
>
> Uwe Lueck.
>

-- 
Any society that would give up a little liberty to gain a little
security will deserve neither and lose both.

            Benjamin Franklin


More information about the texhax mailing list