summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2012-10-17 22:47:12 +0000
committerKarl Berry <karl@freefriends.org>2012-10-17 22:47:12 +0000
commit468e15f0c59bbedcccfaa606c1f72d3b6d3a8f9a (patch)
tree13e51d2fbe41c3a86c59bf8c0e34c36f50471d5e /Master
parent5c8abbc605957614e0807fd0423b0eebb8c5b96a (diff)
new latex package actuarialangle
git-svn-id: svn://tug.org/texlive/trunk@28004 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/actuarialangle/README39
-rw-r--r--Master/texmf-dist/tex/latex/actuarialangle/actuarialangle.sty125
-rwxr-xr-xMaster/tlpkg/bin/tlpkg-ctan-check2
-rw-r--r--Master/tlpkg/tlpsrc/actuarialangle.tlpsrc0
-rw-r--r--Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc1
5 files changed, 166 insertions, 1 deletions
diff --git a/Master/texmf-dist/doc/latex/actuarialangle/README b/Master/texmf-dist/doc/latex/actuarialangle/README
new file mode 100644
index 00000000000..8a563221524
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/actuarialangle/README
@@ -0,0 +1,39 @@
+This package defines a single command \actuarialangle to typeset nice
+looking "angles" in present value of an annuity symbols common in
+actuarial and financial notation.
+
+LICENCE
+
+Public Domain
+
+AUTHOR
+
+The code in this package was given to me (Vincent Goulet
+<vincent.goulet@act.ulaval.ca>) by a former colleague who would simply
+copy it in the preamble of all his documents needing an "angle"
+symbol. The actual author of the code is unknown.
+
+My sole contribution was to make a package out of the code.
+
+USAGE
+
+Copy the package file "where LaTeX can find it", then
+
+ \usepackage{actuarialangle}
+
+and (in math mode)
+
+ \actuarialangle{n}
+
+to typeset "angle n". For a complete present value symbol, use
+something like
+
+ a_{\actuarialangle{n}}
+
+SHORTCUTS
+
+You will most likely want to use the following shortcuts:
+
+\angl for \actuarialangle
+\angln for \angl{n}
+\anglr for \angl{r}
diff --git a/Master/texmf-dist/tex/latex/actuarialangle/actuarialangle.sty b/Master/texmf-dist/tex/latex/actuarialangle/actuarialangle.sty
new file mode 100644
index 00000000000..6c79423ec53
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/actuarialangle/actuarialangle.sty
@@ -0,0 +1,125 @@
+%%
+%% This file is put in the Public Domain by Vincent Goulet.
+%%
+%% Original author of the code (and comments past this header) is
+%% unknown.
+%%
+%% This package defines a single command \actuarialangle to typeset
+%% nice looking "angles" in present value of an annuity symbols common
+%% in actuarial and financial notation.
+%%
+%% USAGE
+%%
+%% In math mode
+%%
+%% \actuarialangle{n}
+%%
+%% to typeset "angle n". For a complete present value symbol,
+%% something like
+%%
+%% a_{\actuarialangle{n}}
+%%
+%% SHORTCUTS
+%%
+%% You will most likely want to use the following shortcuts:
+%%
+%% \angl for \actuarialangle
+%% \angln for \angl{n}
+%% \anglr for \angl{r}
+%%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{actuarialangle}
+
+\catcode`\@=11
+\def\actuarialangle{\mathpalette\act@angle}
+%
+% The operation of \mathpalette causes \actuarialangle{30} to expand
+% to a mathchoice. This ensures that proper sizing will be done if
+% \angle is ever used outside of a first-level subscript:
+%
+% \mathchoice{%
+% {\act@angle\displaystyle{30}}%
+% {\act@angle\textstyle{30}}%
+% {\act@angle\scriptstyle{30}}%
+% {\act@angle\scriptscriptstyle{30}}%
+% }
+%
+\def\act@angle#1#2{%
+\mathord{%
+\mkern1mu % Add a bit of preceding space
+\vbox{\hrule \hbox{\vbox{%
+% This amount of vertical space is the normal space for \overline in a
+% subscript:
+\kern3\fontdimen8\scriptfont\thr@@
+\hbox{$#1#2\m@th$}}%
+% Make the right-hand rule extend down to the depth of a parenthesis
+% even if the symbol under the angle does not have a descender:
+\setbox\z@\hbox{$#1()$}\vrule depth\dp\z@}}%
+\mkern1mu}% Add a bit of following space
+}% end \act@angle
+%
+% \topprecedence puts a precedence number above an item, smashed so
+% that the apparent height of the item is its normal height.
+%
+\def\topprecedence#1#2{\mathpalette{\preced@ t{}{#1}}{#2}}
+%
+% Put a multiplier in the empty set of braces to increase
+% the spacing between the precedence number and the
+% symbol to which it applies, e.g.
+%
+% \def\topprecedence#1#2{\mathpalette{\preced@ t{2.5}{#1}}{#2}}
+%
+% This also applies for \botprecedence and \vartopprecedence.
+% If it is desired that all precedence numbers fall at the
+% same height, regardless of whether there is an hrule between
+% them and the symbol to which they apply, then make
+% \topprecedence the same as \vartopprecedence.
+%
+\def\botprecedence#1#2{\mathpalette{\preced@ b{}{#1}}{#2}}
+%
+% \vartopprecedence provides extra space below the top
+% symbol, to accommodate an intervening hrule.
+%
+\def\vartopprecedence#1#2{\mathpalette{\preced@ t3{#1}}{#2}}
+%
+% In \preced@, #1 is `t' for top or `b' for bottom, #2 is a
+% multiplier for the space between the top and bottom symbols (may
+% be empty), #3 is the first argument from the user, #4 is
+% \displaystyle or \textstyle or \scriptstyle or
+% \scriptscriptstyle, from \mathpalette, and #5 is the second
+% argument given by the user. This peculiar ordering of the
+% arguments is done to work around the restriction of \mathpalette
+% that it only reads 2 arguments.
+%
+\def\preced@#1#2#3#4#5{%
+% Measure the arguments:
+\setbox\tw@\hbox{$\m@th#4#3$}%
+\setbox\z@\hbox{$\m@th#4#5$}\dimen@\wd\z@
+\vbox{% to\ht\z@{%
+\baselineskip\z@skip
+% \lineskip is set using AMSTeX's \ex@, if available, for a slight
+% refinement in the spacing if this macro is used in eightpoint
+% text. If \ex@ is not available, \p@ is used.
+\lineskip#2\ifx\UNDEFINED\ex@\p@\else\ex@\fi\relax
+\lineskiplimit\lineskip
+\if b#1\relax\box\z@\else\vss\fi
+\hbox to\dimen@{\hss\unhbox\tw@\hss}%
+\if t#1\relax\box\z@\else\vss\fi
+}% end \vbox
+}% end \preced@
+% Restore the category code of the @ character:
+\catcode`\@=11
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%To get a little more space after stuff under the angle, define \angl
+% in the following way:
+%
+\def\angl#1{{\actuarialangle{{#1}\mkern2mu}}}
+%
+%
+\def\angln{{\angl n}}
+%
+\def\anglr{{\angl r}}
+%
+\def\lift#1#2{{\topprecedence{#1}{#2}}}
+%%
+%% End of file `actuarialangle.sty'.
diff --git a/Master/tlpkg/bin/tlpkg-ctan-check b/Master/tlpkg/bin/tlpkg-ctan-check
index 6ab8f71bb4b..656b314e4dc 100755
--- a/Master/tlpkg/bin/tlpkg-ctan-check
+++ b/Master/tlpkg/bin/tlpkg-ctan-check
@@ -25,7 +25,7 @@ my @TLP_working = qw(
a0poster a2ping a4wide a5comb
aastex abbr abc abraces abstract abstyles accfonts achemso
acmconf acro acronym acroterm
- active-conf
+ active-conf actuarialangle
adfathesis addlines adforn adjmulticol adfsymbols adjustbox adobemapping
adrconv advdate
ae aeguill afthesis
diff --git a/Master/tlpkg/tlpsrc/actuarialangle.tlpsrc b/Master/tlpkg/tlpsrc/actuarialangle.tlpsrc
new file mode 100644
index 00000000000..e69de29bb2d
--- /dev/null
+++ b/Master/tlpkg/tlpsrc/actuarialangle.tlpsrc
diff --git a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
index 9a410e1d1bf..50b06e2f222 100644
--- a/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
+++ b/Master/tlpkg/tlpsrc/collection-latexextra.tlpsrc
@@ -18,6 +18,7 @@ depend achemso
depend acro
depend acronym
depend acroterm
+depend actuarialangle
depend addlines
depend adjmulticol
depend adjustbox