Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Actuarial half-rectangle

11 views
Skip to first unread message

Joerg Knappen

unread,
Feb 6, 1996, 3:00:00 AM2/6/96
to
In article <4f8a8f$2...@vixen.cso.uiuc.edu>, ad...@orion.math.uiuc.edu (Adam H. Lewenberg) writes:
:Has someone come up with a way to typeset the little half-rectangle
:symbol used in actuarial mathematics. It looks something like
:

Actually, similar symbols are used by physicists, known as quantum group
operators. They can appear in left and right variants.


: _
: 1|
:
:that is, it's the vertical and horizontal lines, not the "1". It needs
:to work in subscripts and it needs to work with text longer than 1,
:e.g.,
:
: A _______
: 1234568|

Here's a solution drawn from my archives (originally due to Peter Schmitt,
Wien) (not tested, if it works in sub/super-scripts):

\def\L#1{\hbox{\vrule\vbox{\hrule\kern.6pt%
\hbox{\kern.6pt$\mathstrut#1$\kern.6pt}\kern.6pt}}}
\def\R#1{\hbox{\vbox{\hrule\kern.6pt%
\hbox{\kern.6pt$\mathstrut#1$\kern.6pt}\kern.6pt}\vrule}}

$\L{a}$

$\L{a^2}$

$\L{\L{a^2}}$

$\R{\L{a^2}}$

$\R{\L{\L{a^2}}}$

$\R{\sqrt{a^2+b^3}}$

\end

--J"org Knappen.
:
:--
:University of Illinois at Champaign-Urbana, Dept. Of Mathematics
:INTERNET: ad...@math.uiuc.edu or lewe...@uiuc.edu
:

Adam H. Lewenberg

unread,
Feb 6, 1996, 3:00:00 AM2/6/96
to
Has someone come up with a way to typeset the little half-rectangle
symbol used in actuarial mathematics. It looks something like

_
1|

that is, it's the vertical and horizontal lines, not the "1". It needs
to work in subscripts and it needs to work with text longer than 1,
e.g.,

A _______
1234568|

--

Peter Schmitt

unread,
Feb 7, 1996, 3:00:00 AM2/7/96
to
kna...@kph.Uni-Mainz.DE (Joerg Knappen) writes:
>:Has someone come up with a way to typeset the little half-rectangle

>:symbol used in actuarial mathematics. It looks something like
>:
>Actually, similar symbols are used by physicists, known as quantum group
>operators. They can appear in left and right variants.
>: A _______
>: 1234568|
>
>Here's a solution drawn from my archives (originally due to Peter Schmitt,
>Wien) (not tested, if it works in sub/super-scripts):
Surprise, I did not remember that I posted this ... :-)
Well, as it stands the code will not work well in sub/superscripts, since
some dimensions are hardwired into the code (quite unprofessionally!)
At least the \kern, and probably also the rules have to be given
other (smaller) dimensions, either by making them font dependent
(ex,em) or using \mathpalette, or (probably) the symbols
will look to `heavy':


>
>\def\L#1{\hbox{\vrule\vbox{\hrule\kern.6pt%
> \hbox{\kern.6pt$\mathstrut#1$\kern.6pt}\kern.6pt}}}
.1em? (I cannot test it out right now)

>\def\R#1{\hbox{\vbox{\hrule\kern.6pt%
> \hbox{\kern.6pt$\mathstrut#1$\kern.6pt}\kern.6pt}\vrule}}
>

Peter

Peter Schmitt

unread,
Feb 8, 1996, 3:00:00 AM2/8/96
to
>Well, as it stands the code will not work well in sub/superscripts, since
>some dimensions are hardwired into the code (quite unprofessionally!)

Well: I was right, it does not work well - but the main problem is,
that the argument in the \hbox is always in \textsize.
You can fix this using \mathchoice and \mathpalette.

The new code seems to work quite well, but it certainly is not optimal.
The dimensions can be improved, probably depending on the desired purpose.

I have replaced the two horizontal \kern's by \mkern's which depend on
the size, and removed the vertical \kern below the argument,
since it changes the baseline (one could, of course, work harder,
retain the \kern, but adapt the depth of the box).
I choose to put in (via \mathchoice) strut's in displaysize
and textsize only, since in indices it probably is better to have
symbols as small as possible, which do not add depth
(this can be changed, of course).
I did not make the rules depend on size it could be done
putting four slightly different boxes into a \mathchoice.

Peter

%%%%%%%

\def\LL#1#2{\mathop{\hbox{\vrule\vbox{\hrule\kern.6pt
\hbox{$#1\LRstrut\mkern1mu#2\mkern1mu$}}}}}

\def\RR#1#2{\mathop{\hbox{\vbox{\hrule\kern.6pt
\hbox{$#1\mskip1mu\LRstrut#2\mskip1mu$}}\vrule}}}

\def\LRstrut{\mathchoice{\vphantom1}{\vphantom1}{}{}}

\def\L#1{\mathpalette\LL{#1}}
\def\R#1{\mathpalette\RR{#1}}

% test

$x \L{123}^{\L{12}^{\L1}} y$
$x \R{123}^{\R{12}^{\R1}} y$

$$x \L{y23}^{\L{12}^{\L1}} y$$
$$x \R{y23}^{\R{12}^{\R1}} y$$

\end

0 new messages