Typesetting actuarial notation

199 views
Skip to first unread message

gall...@googlemail.com

unread,
Apr 19, 2013, 7:59:05 AM4/19/13
to mathja...@googlegroups.com

I have used the following code for a while to typeset the acturial symbol for a term certain, which is the half-box symbol around the n in this image:

Link to Wikipedia example image: http://upload.wikimedia.org/wikipedia/commons/5/56/Actuarial_notation.svg

Link to page: http://en.wikipedia.org/wiki/Actuarial_notation

    \def \termcertain #1% {% {\setbox 0 = \hbox {$\scriptstyle #1$}% \dimen 0 = \ht 0
    \advance \dimen 0 by 1,0 pt \ht 0 = \dimen 0 \dimen 0 = \dp 0 \advance \dimen 0 by 1,50 pt
    \dp 0 = \dimen 0 \vbox {\hrule \hbox {\box 0 \vrule }}% }% }

Usage:

    a_\termcertain{n}

I got to this code by, frankly, taking something that half worked, combining it with something else that half worked, and poking it with a stick until it met my needs. 

I'd now like to use this code on a forum that uses MathJax.  As is, it doesn't work, and I'm not sure why, but I presume it is using features that are not available in the Mathjax environment.  I know that MathML has this feature built in, but unfortunately the particular installation I'm looking at doesn't have MathML set up.
 
Two questions:

1. How do I fix this to work with MathJax?
2. How do I configure the Mathjax installation to make \termcertain available to users?

Peter Krautzberger

unread,
Apr 19, 2013, 11:18:07 AM4/19/13
to mathja...@googlegroups.com
The MathML element menclose offers an actuarial notation which seems to fit and MathJax allows use of menclose in the TeX syntax via the enclose extension

Adding it to your MathJax configuration should allow you to use  $\enclose{actuarial}{n} $.

Peter.


--
You received this message because you are subscribed to the Google Groups "MathJax Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathjax-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Calum Galleitch

unread,
Apr 19, 2013, 11:49:56 AM4/19/13
to mathja...@googlegroups.com
Thanks Peter,
 
At the moment MathML support is lacking and due to corporate beauracracy getting it set up may be difficult, though I agree the enclose extension would be best.  By way of explanation, the install is a forum provided by a commercial education provider, to which I have no access beyond a normal user.

--
You received this message because you are subscribed to a topic in the Google Groups "MathJax Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mathjax-users/zIKCrJ77pFs/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to mathjax-user...@googlegroups.com.

Peter Krautzberger

unread,
Apr 19, 2013, 12:02:11 PM4/19/13
to mathja...@googlegroups.com
Calum,

I'm confused. You wrote

2. How do I configure the Mathjax installation to make \termcertain available to users?

Does that mean you can add to the MathJax configuration? 

Peter.

Calum Galleitch

unread,
Apr 19, 2013, 1:51:03 PM4/19/13
to mathjax-users
Oh, yes, I can see that that was not very clear.

What I was hoping was that one could include a TeX definition similar to the code I originally posted, inside a hidden div or something similar.

The administrators of the forum can get IT support to make changes but if there is any simpler route it would probably be preferable.

Peter Krautzberger

unread,
Apr 20, 2013, 12:27:41 AM4/20/13
to mathja...@googlegroups.com
Funny thing, I just forgot that's this is no problem. You can use the \require command to load extensions. 

So $\require{enclose}$ somewhere before the $\enclose{actuarial}{n}$ should get it to work.

Peter.
Reply all
Reply to author
Forward
0 new messages