Exercices que j'ai développé lorsque j'étais assistant au cours act-2007 de l'École d'actuariat, Université Laval https://www.ulaval.ca/les-etudes/cours/repertoire/detailsCours/act-2007-mathematiques-actuarielles-vie-ii.html
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

114 lines
3.3KB

  1. \NeedsTeXFormat{LaTeX2e}
  2. \ProvidesPackage{lifecon}[2004/07/27 v2.1 (Eddy Trivedi)]
  3. \PackageInfo{lifecon}{Provides Commands to typeset Life
  4. Contingencies' Symbols}
  5. \RequirePackage{amsmath}
  6. \newlength{\LC@temph}
  7. \newlength{\LC@tempw}
  8. \newlength{\LC@templ}
  9. \newlength{\LC@tempwtwo}
  10. \newcommand*{\lcroof}[1]{%
  11. \settoheight{\LC@temph}{\mbox{$\scriptstyle\overline{#1\,}$}}
  12. {\mbox{$\scriptstyle\overline{#1\,}$\kern-0.1pt
  13. \rule[-0.35pt]{.3pt}{\LC@temph}}} }
  14. %\DeclareRobustCommand{\lcroof}[1]{%
  15. %\def\arraystretch{0}%
  16. %\setlength\arraycolsep{1pt}% adjust these
  17. %\setlength\arrayrulewidth{.3pt}% two settings
  18. %\begin{array}[b]{@{}c|}\hline
  19. %\\[\arraycolsep]%
  20. %\scriptstyle #1%
  21. %\end{array}%
  22. %}
  23. \newcommand*{\lcterm}[3]{%
  24. \settoheight{\LC@temph}{\mbox{$\scriptstyle\overline{#3\,}$}}
  25. \settowidth{\LC@tempw}{$\scriptstyle #2$}
  26. {#1}{}_{#2:\lcroof{#3}}^{\makebox[\LC@tempw]{\hfill$\scriptstyle 1$\hfill}}
  27. }
  28. \newcommand*{\lctermadj}[3]{%
  29. \settoheight{\LC@temph}{\mbox{$\scriptstyle\overline{#3\,}$}}
  30. \settowidth{\LC@tempw}{$\scriptstyle #2$}
  31. {#1}{}_{#2:\lcroof{#3}}^{\makebox[\LC@tempw]{\hfill$\scriptstyle%
  32. A$\hfill}} }
  33. \newcommand*{\lcend}[3]{%
  34. \settoheight{\LC@temph}{\mbox{$\scriptstyle\overline{#3\,}$}}
  35. \settowidth{\LC@tempw}{$\scriptstyle #3$}
  36. \settowidth{\LC@templ}{$\scriptstyle #2$:}
  37. {#1}{}_{#2:\lcroof{#3}}^{\hspace{\LC@templ}\makebox[\LC@tempw]{\hfill$\scriptstyle 1$\hfill}}
  38. }
  39. \newcommand*{\lcfirst}[4][1]{%
  40. \settowidth{\LC@tempw}{$\scriptstyle #3$}
  41. {#2}{}_{{#3}{#4}}^{\makebox[\LC@tempw]{\hfill$\scriptstyle #1$\hfill}}
  42. }
  43. \newcommand*{\lcsecond}[4][2]{%
  44. \settowidth{\LC@tempw}{$\scriptstyle #4$}
  45. \settowidth{\LC@templ}{$\scriptstyle #3$}
  46. {#2}{}_{{#3}{#4}}^{\hspace{\LC@templ}\makebox[\LC@tempw]{\hfill$\scriptstyle #1$\hfill}}
  47. }
  48. \newcommand*{\surstat}[3]{%
  49. \settowidth{\LC@tempw}{$#2_{1}#2_{2}\dots$}
  50. \dfrac{\hspace{\LC@tempw}#1}{#2_{1}#2_{2}\dots#2_{#3}}
  51. }
  52. \newcommand*{\defsurstat}[3]{%
  53. \settowidth{\LC@tempw}{$#2_{1}#2_{2}\dots$}
  54. \dfrac{\hspace{\LC@tempw}[#1]}{#2_{1}#2_{2}\dots#2_{#3}}
  55. }
  56. \newcommand*{\lccomptwo}[4]{%
  57. \settowidth{\LC@tempw}{$\scriptstyle #2$}%
  58. \settowidth{\LC@templ}{$\scriptstyle #3 #4$}%
  59. {#1}{}_{\substack{#2 #3 #4\\\makebox[\LC@tempw]{\hfill$\scriptstyle1$\hfill}
  60. \hspace{\LC@templ}}}^{\hspace{\LC@tempw}\scriptstyle2}%
  61. }
  62. \newcommand*{\lccompthree}[5]{%
  63. \settowidth{\LC@temph}{$\scriptstyle #2$}
  64. \settowidth{\LC@tempw}{$\scriptstyle #3$}
  65. \settowidth{\LC@tempwtwo}{$\scriptstyle #3$}
  66. \settowidth{\LC@templ}{$\scriptstyle #4 #5$}
  67. {#1}{}_{\substack{#2 #3 #4 #5\\\makebox[\LC@temph]{\hfill$\scriptstyle 1$\hfill}%
  68. \makebox[\LC@tempw]{\hfill$\scriptstyle 2$\hfill}%
  69. \hspace{\LC@templ}%
  70. }}^{\hspace{\LC@temph}\hspace{\LC@tempw}\makebox[\LC@tempwtwo]{\hfill$\scriptstyle 3$\hfill}}
  71. }
  72. %% Typesetting Common Symbols in a convenient way%%
  73. \newcommand*{\termins}[2]{%
  74. \lcterm{A}{#1}{#2} }
  75. \newcommand*{\terminsc}[2]{%
  76. \lcterm{\bar{A}}{#1}{#2} }
  77. \newcommand*{\insend}[2]{%
  78. A_{#1:\lcroof{#2}} }
  79. \newcommand*{\insendc}[2]{%
  80. \bar{A}_{#1:\lcroof{#2}} }
  81. \newcommand*{\pureend}[2]{%
  82. \lcend{A}{#1}{#2} }
  83. \newcommand*{\pureendc}[2]{%
  84. {}_{#2}E_{#1} }
  85. \newcommand*{\anndue}[2]{%
  86. \ddot{a}_{#1:\lcroof{#2}} }
  87. \newcommand*{\anncon}[2]{%
  88. \bar{a}_{#1:\lcroof{#2}} }
  89. \newcommand*{\annimm}[2]{%
  90. a_{#1:\lcroof{#2}} }