7

How do I typeset annuity and life-insurance symbols, actuarial notation in ConTeXt. I see there are packages available but not for ConTeXt.

enter image description here

Thanks

11
  • 1
    It would be nice to have an example of how they look like. I don't know those symbols.
    – Marco
    Commented Oct 22, 2013 at 10:51
  • From what I recall having seen some of the actuarial study material, there's nothing that can't be done using standard maths notation. I think you'll need left sub- and superscripts, and some accents not normally used (\urcorner as an accent on a subscript)
    – Chris H
    Commented Oct 22, 2013 at 10:58
  • for examples, see actuaries.org.uk/research-and-resources/documents/… try starting at p33.
    – Chris H
    Commented Oct 22, 2013 at 11:00
  • In the source code of the Wikipedia page on actuarial notation, the symbol is typeset as follows: a_{\overline{n|}i}.
    – jub0bs
    Commented Oct 22, 2013 at 12:03
  • 1
    although unicode recognizes the "actuarial bend" as a character, I doubt it can be easily produced as a single symbol in a font. it certainly isn't acceptably represented by the upper right "quine corner" (\urcorner). Commented Oct 22, 2013 at 12:15

3 Answers 3

7

This is Plain TeX, but I guess it can do for ConTeXt. Experts can improve it.

\def\actuarial#1{%
  \vbox{
    \offinterlineskip
    \tabskip=0pt
    \mathsurround=0pt
    \halign{##&\vrule##\cr
      \noalign{\hrule}%
      &height 1pt\cr
      $\scriptstyle#1$&\cr
    }%
  }%
}

$a_{\actuarial{n}}$

\bye

enter image description here

3
  • I normally avoid using an explicit \subscriptstyle. It may be better to use \mathpallet to get automatic scaling of the argument.
    – Aditya
    Commented Oct 22, 2013 at 23:46
  • @Aditya I don't know whether ConTeXt has \mathpalette. ;-). However I don't think this symbol is ever used in subscripts.
    – egreg
    Commented Oct 23, 2013 at 7:18
  • ConTeXt has almost all commands defined in plain TeX, so yes it has mathpalette, although the current practice is to use setmathstyle instead (basically assume that over etc will not be used so that the math style is predictable)
    – Aditya
    Commented Oct 23, 2013 at 14:03
2

Based on Barbara Beeton's comment, you just need to pick a font that includes the actuarial bend symbol. For example, using XITS fonts you get:

% Use a math font that has the actuarial bend symbol
\usemodule[simplefonts]
\setmathfont[XITS] 

\Umathchardef\actuarial "0 "0 "20E7

\starttext

$a_{n \actuarial}$

\stoptext

enter image description here

If someone can tell what is the right mathclass and tex name for this glyph, I can send in a request to add this to char-def.lua so that it works out of the box in ConTeXt.

4
  • The spacing seems wrong. The horizontal bar should not touch the preceding letters.
    – Marco
    Commented Oct 22, 2013 at 22:28
  • @Marco: Tell that to the glyph designer :) (But it could also be something due to incorrect scaling in subscripts)
    – Aditya
    Commented Oct 22, 2013 at 23:43
  • The scaling of the subscripts is correct. This looks OK if a wider glyph is used.
    – Aditya
    Commented Oct 22, 2013 at 23:51
  • so the basic glyph really should be narrower, and horizontally extendable. i'll forward that comment for consideration. Commented Oct 23, 2013 at 7:22
0

Here's something to get you going, you may want to tweak the raisebox dimension, and the negative spaces, and maybe the size of the \urcorner.

\documentclass{article}

\usepackage{amsmath,amssymb}
\newcommand{\bend}[1]{\smash{#1\!\!\!{\raisebox{-0.2em}{\big\urcorner}}}}
\begin{document}
This is horrible:

$a_{\overline{n|}i}$

This isn't great, but is much better:

$a_{\bend{n} i}$
\end{document}

enter image description here

No doubt someone can propose a cleaner way of doing the adjustments, I can update for comments.

Also it will need testing in ConTeXt - I don't use it, though from what I've read it should work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .