From 2385109f9c04a438cbd803b18e9b8dd0637aa31c Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Mon, 24 Feb 2014 22:58:28 +0000 Subject: calculator (23feb14) git-svn-id: svn://tug.org/texlive/trunk@33041 c570f23f-e606-0410-a88d-b1316a301751 --- .../source/latex/calculator/calculator.dtx | 881 ++++++++++++++++++--- .../source/latex/calculator/calculator.ins | 74 ++ 2 files changed, 862 insertions(+), 93 deletions(-) create mode 100644 Master/texmf-dist/source/latex/calculator/calculator.ins (limited to 'Master/texmf-dist/source/latex/calculator') diff --git a/Master/texmf-dist/source/latex/calculator/calculator.dtx b/Master/texmf-dist/source/latex/calculator/calculator.dtx index 543ed6d3564..41d95f24a0e 100644 --- a/Master/texmf-dist/source/latex/calculator/calculator.dtx +++ b/Master/texmf-dist/source/latex/calculator/calculator.dtx @@ -1,86 +1,48 @@ % \iffalse meta-comment -%<*internal> -\begingroup -\input docstrip.tex -\keepsilent -\preamble ------------------------------------------------------------------- -The calculator and calculus packages -Copyright (C) 2012 by Robert Fuster -All rights reserved - -This file may be distributed and/or modified under the -conditions of the LaTeX Project Public License, either version 1.3 -of this license or (at your option) any later version. -The latest version of this license is in: - - http://www.latex-project.org/lppl.txt - -and version 1.3 or later is part of all distributions of LaTeX -version 1999/12/01 or later. ------------------------------------------------------------------- -\endpreamble -\postamble -\endpostamble -\askforoverwritefalse - -\generateFile{calculator.sty}{t}{\from{calculator.dtx}{calculator}} -\generateFile{calculus.sty}{t}{\from{calculator.dtx}{calculus}} - -\def\tmpa{plain} -\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi -\endgroup -% % -% Copyright (C) 2012 by Robert Fuster -% -% This file may be distributed and/or modified under the -% conditions of the LaTeX Project Public License, either version 1.2 -% of this license or (at your option) any later version. -% The latest version of this license is in: +% Copyright (C) 2012, 2014 by Robert Fuster % +% This work may be distributed and/or modified under the conditions of +% the LaTeX Project Public License, either version 1.3 of this license +% or (at your option) any later version. The latest version of this +% license is in: +% % http://www.latex-project.org/lppl.txt +% +% and version 1.3 or later is part of all distributions of LaTeX +% version 2005/12/01 or later. +%% +% This work has the LPPL maintenance status `maintained'. +% +% The Current Maintainer of this work is Robert Fuster % -% and version 1.2 or later is part of all distributions of LaTeX -% version 1999/12/01 or later. +% This work consists of the files calculator.dtx and calculator.ins +% and the derived files calculator.sty, calculus.ins, and several +% calculator.tex derived files. % % \fi -% \CheckSum{3135} -% \changes{v1.0}{2012/04/25}{First public version} -% \changes{v1.0a}{2012/06/10}{calculator.dtx modified to make it autoinstallable. -% calculus.dtx embedded in calculus.dtx} -%% \CharacterTable -%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z -%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z -%% Digits \0\1\2\3\4\5\6\7\8\9 -%% Exclamation \! Double quote \" Hash (number) \# -%% Dollar \$ Percent \% Ampersand \& -%% Acute accent \' Left paren \( Right paren \) -%% Asterisk \* Plus \+ Comma \, -%% Minus \- Point \. Solidus \/ -%% Colon \: Semicolon \; Less than \< -%% Equals \= Greater than \> Question mark \? -%% Commercial at \@ Left bracket \[ Backslash \\ -%% Right bracket \] Circumflex \^ Underscore \_ -%% Grave accent \` Left brace \{ Vertical bar \| -%% Right brace \} Tilde \~} % % \iffalse +% %<*driver> \documentclass{ltxdoc} \ProvidesFile{calculator.dtx} - [2012/06/10 v.1.0a documented calculator package] -\GetFileInfo{calculator.dtx} + [2014/02/20 v.2.0 documented calculator package] + +\usepackage{calculus} \usepackage{amsmath} \usepackage[lmargin=1.75in,rmargin=1in]{geometry} \usepackage{fancyvrb} -\def\fileversion{1.0a} -\def\filedate{2012/06/10} -\usepackage{calculus} + +\def\fileversion{2.0} +\def\filedate{2014/02/20} + +\GetFileInfo{calculator.dtx} + \title{The \textsf{calculator} and \textsf{calculus} packages% \thanks{This document corresponds to - \textsf{calculator} and \textsf{calculus}~\fileversion, - dated \filedate.}\\ + \textsf{calculator}~\fileversion{} and + \textsf{calculus}~\fileversion, dated \filedate.}\\ Scientific calculations with \LaTeX} \author{Robert Fuster\\ Universitat Polit\`ecnica de Val\`encia \\ @@ -90,9 +52,19 @@ version 1999/12/01 or later. \CodelineIndex \RecordChanges +\def\partname{Part} + \newcommand{\TBS}{\textbackslash} \newcommand{\Marg}[1]{\textnormal{\marg{#1}}} +\newcommand{\newinversion}[1]{\textnormal{\textit{(new in version~#1)}}} + +\newcommand{\arccot}{\operatorname{arccot}} +\newcommand{\arsinh}{\operatorname{arsinh}} +\newcommand{\arcosh}{\operatorname{arcosh}} +\newcommand{\artanh}{\operatorname{artanh}} +\newcommand{\arcoth}{\operatorname{arcoth}} + \newcounter{exem}\stepcounter{exem} \newenvironment{exemple}{% \VerbatimEnvironment\begin{VerbatimOut}[gobble=2]{./calculator\theexem.tex}}{% @@ -114,7 +86,7 @@ version 1999/12/01 or later. \stepcounter{exem}\par\bigskip\noindent} \newcommand{\textttit}[1]{\texttt{\textit{#1}}} - +%\OnlyDescription \begin{document} \maketitle \DocInput{calculator.dtx} @@ -125,6 +97,27 @@ version 1999/12/01 or later. % % \fi % +% \CheckSum{3753} +% \changes{v1.0}{2012/04/25}{First public version} +% \changes{v1.0a}{2012/06/10}{calculator.dtx modified to make it autoinstallable. +% calculus.dtx embedded in calculus.dtx} +% \changes{v2.0}{2014/02/20}{new calculator.dtx and calculator.ins files} +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +% % \DoNotIndex{\newcommand,\newenvironment,\RequirePackage,\begin,\end} % \DoNotIndex{\begingroup,\endgroup,\expandafter,\undefined,\@ifnextchar} @@ -153,6 +146,14 @@ version 1999/12/01 or later. % several utilities to use and define various functions and their derivatives, % including elementary functions, operations with functions, % polar coordinates and vector-valued real functions. + +% Version 2.0 adds new capabilities to both packages. +% Specifically, now, \textsf{calculator} and \textsf{calculus} +% can evaluate the inverse trigonometric +% and the inverse hyperbolic functions +% (so that we can work with all the classic elementary functions), +% and also can do some additional calculation with vectors +% (such as the cross product and the angle between two vectors). % \end{abstract} % % \tableofcontents @@ -382,15 +383,6 @@ version 1999/12/01 or later. % \DIVIDE{1.256}{3.214}{\sol} % $1.256/3.214=\sol$ % \end{exemple} -% -% In addition, the \cs{LENGTHDIVIDE} command divides two lengths -% and returns a number. -% \item[\cs{LENGTHDIVIDE}\marg{length1}\marg{length2}\marg{\cs{cmd}}]% -% \SpecialUsageIndex{\LENGTHDIVIDE}\mbox{} -% \begin{exemple} -% \LENGTHDIVIDE{1in}{1cm}{\sol} -% One inch equals $\sol$ centimeters. -% \end{exemple} % \end{description} % \subsubsection{Powers with integer exponent} % \begin{description} @@ -759,7 +751,7 @@ version 1999/12/01 or later. % \sol % \end{exemple} % -% Moreover, we have a couple od commands +% Moreover, we have a couple of commands % to convert between radians and degrees, % \begin{description} % \item[\cs{DEGtoRAD}% @@ -830,6 +822,106 @@ version 1999/12/01 or later. % \sol % \end{exemple} % \end{description} +% +% \subsubsection{Inverse trigonometric functions\newinversion{2.0}} +% \begin{description} +% \item[\cs{ARCSIN}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCSIN}% +% stores in \textttit{\TBS cmd} +% the arcsin (inverse of sine) of \textttit{num}. +% +% \item[\cs{ARCCOS}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCCOS}% +% arccos of \textttit{num}. +% +% \item[\cs{ARCTAN}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCTAN}% +% arctan of \textttit{num}. +% +% \item[\cs{ARCCOT}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCCOT}% +% arccot of \textttit{num}. +% +% \begin{exemple} +% \ARCSIN{0.5}{\sol} +% \sol +% +% \ARCCOS{0.5}{\sol} +% \sol +% +% \ARCTAN{\numberSQRTTHREE}{\sol} +% \sol +% +% \ARCCOT{-1}{\sol} +% \sol +% \end{exemple} +% \end{description} +% +% \subsubsection{Inverse hyperbolic functions\newinversion{2.0}} +% \begin{description} +% \item[\cs{ARSINH}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARSINH}% +% stores in \textttit{\TBS cmd} +% the arsinh (inverse of hyperbolic sine) of \textttit{num}. +% +% \item[\cs{ARCOSH}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCOSH}% +% arcosh of \textttit{num}. +% +% \item[\cs{ARTANH}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARTANH}% +% artanh of \textttit{num}. +% +% \item[\cs{ARCOTH}% +% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCOTH}% +% arcoth of \textttit{num}. +% +% \begin{exemple} +% \ARSINH{1}{\sol} +% \sol +% +% \ARCOSH{1}{\sol} +% \sol +% +% \ARTANH{0.5}{\sol} +% \sol +% +% \ARCOTH{2}{\sol} +% \sol +% \end{exemple} +% \end{description} +% +% \section{Operations with lengths} +% \begin{description} +% \item[\cs{LENGTHDIVIDE}\marg{length1}\marg{length2}\marg{\cs{cmd}}]% +% \SpecialUsageIndex{\LENGTHDIVIDE}\mbox{} +% +% This command divides two lengths +% and returns a number. +% \begin{exemple} +% \LENGTHDIVIDE{1in}{1cm}{\sol} +% One inch equals $\sol$ centimeters. +% \end{exemple} +% +% Commands \cs{LENGTHADD} and \cs{LENGTHSUBTRACT} return the sum and +% the difference of two lengths \newinversion{2.0}. +% +% \item[\cs{LENGTHADD}\marg{length1}\marg{length2}\marg{\cs{cmd}}]% +% \SpecialUsageIndex{\LENGTHADD}\mbox{} +% \item[\cs{LENGTHSUBTRACT}\marg{length1}\marg{length2}\marg{\cs{cmd}}]% +% \SpecialUsageIndex{\LENGTHSUBTRACT}\mbox{} +% +% (\cs{cmd} must be a predefined length). +% \begin{exemple} +% \newlength{\mylength} +% \LENGTHADD{1in}{1cm}{\mylength} +% $1in+1cm=\the\mylength$. +% +% \LENGTHSUBTRACT{1in}{1cm}{\mylength} +% $1in-1cm=\the\mylength$. +% \end{exemple} +% \end{description} +% % \section{Matrix arithmetic} % The \textsf{calculator} package defines the commands described below % to operate on vectors and matrices. @@ -902,13 +994,16 @@ version 1999/12/01 or later. % $2(3,5,-1)=(\sola,\solb,\solc)$ % \end{exemple} % \end{description} -% \subsubsection{Scalar product and euclidean norm} +% \subsubsection{Scalar (dot) product and euclidean norm} % \begin{description} % \item[\cs{SCALARPRODUCT}\parg{x1,y1}\parg{x2,y2}\marg{\cs{cmd}}] % \SpecialUsageIndex{\SCALARPRODUCT}% % % \item[\cs{SCALARPRODUCT}\parg{x1,y1,z1}\parg{x2,y2,z2}\marg{\cs{cmd}}] % \SpecialUsageIndex{\SCALARPRODUCT}% +% +% \item[\cs{DOTPRODUCT}]\SpecialUsageIndex{\DOTPRODUCT}% +% is an alias of \cs{SCALARPRODUCT} \newinversion{2.0}. % % \item[\cs{VECTORNORM}\parg{x,y}\marg{\cs{cmd}}]\mbox{} % \SpecialUsageIndex{\VECTORNORM}% @@ -919,7 +1014,7 @@ version 1999/12/01 or later. % \SCALARPRODUCT(1,-1)(3,5){\sol} % $(1,-1)\cdot(3,5)=\sol$ % -% \SCALARPRODUCT(1,-1,2)(3,5,-1){\sol} +% \DOTPRODUCT(1,-1,2)(3,5,-1){\sol} % $(1,-1,2)\cdot(3,5,-1)=\sol$ % % \VECTORNORM(3,4)\sol @@ -929,6 +1024,25 @@ version 1999/12/01 or later. % $\left\|(1,2,-2)\right\|=\sol$ % \end{exemple} % \end{description} +% \subsubsection{Vector (cross) product \newinversion{2.0}} +% \begin{description} +% +% \item[\cs{VECTORPRODUCT}\parg{x1,y1,z1}\parg{x2,y2,z2}\parg{\cs{cmd1},\cs{cmd2},\cs{cmd3}}] +% \SpecialUsageIndex{\VECTORPRODUCT}% +% +% \item[\cs{CROSSPRODUCT}]\SpecialUsageIndex{\CROSSPRODUCT}% +% is an alias of \cs{VECTORPRODUCT}. +% \begin{exemple} +% \CROSSPRODUCT(1,-1,2)(3,5,-1)% +% (\sola,\solb,\solc) +% $(1,-1,2)\times(3,5,-1)=(\sola,\solb,\solc)$ +% +% \VECTORPRODUCT(1,-1,2)(-3,3,-6)% +% (\sola,\solb,\solc) +% $(1,-1,2)\times(-3,3,-6)=(\sola,\solb,\solc)$ +% +% \end{exemple} +% \end{description} % \subsubsection{Unit vector parallel to a given vector (normalized vector)} % \begin{description} % \item[\cs{UNITVECTOR}\parg{x,y}\parg{\TBS cmd1,\TBS cmd2}] @@ -959,6 +1073,26 @@ version 1999/12/01 or later. % $(\sola,\solb,\solc)$ % \end{exemple} % \end{description} +% \subsubsection{Angle between two vectors \newinversion{2.0}} +% \begin{description} +% \item[\cs{TWOVECTORSANGLE}\parg{x1,y1}\parg{x2,y2}\marg{\cs{cmd}}] +% \SpecialUsageIndex{\TWOVECTORSANGLE}% +% +% \item[\cs{TWOVECTORSANGLE}\parg{x1,y1,z1}\parg{x2,y2,z2}\marg{\cs{cmd}}] +% \mbox{} \SpecialUsageIndex{TWOVECTORSANGLE} +% \begin{exemple} +% \TWOVECTORSANGLE(1,1)(0,1){\sol} +% $\sol$ radians +% \RADtoDEG{\sol}{\degsol} +% (or $\degsol$ degrees) +% +% \TWOVECTORSANGLE(1,0,0)(0,1,0){\sol} +% $\sol$ +% \RADtoDEG{\sol}{\degsol} +% (or $\degsol$ degrees) +% \end{exemple} +% \end{description} +% % \subsection{Matrix operations} % \subsubsection{Assignments} % \begin{description} @@ -1319,6 +1453,21 @@ version 1999/12/01 or later. % \end{tabular} % \end{center} % +% The following functions are added in version 2.0 \newinversion{2.0} +% +% \begin{center} +% \begin{tabular}{llll} +% \ttfamily \cs{ARCCOSfunction} & $f(t)=\arccos t$ & +% \ttfamily \cs{ARCSINfunction} & $f(t)=\arcsin t$ \\ +% \ttfamily \cs{ARCTANfunction} & $f(t)=\arctan t$ & +% \ttfamily \cs{ARCCOTfunction} & $f(t)=\arccot t$ \\ +% \ttfamily \cs{ARCOSHfunction} & $f(t)=\arcosh t$ & +% \ttfamily \cs{ARSINHfunction} & $f(t)=\arsinh t$ \\ +% \ttfamily \cs{ARTANHfunction} & $f(t)=\artanh t$ & +% \ttfamily \cs{ARCOTHfunction} & $f(t)=\arcoth t$ \\ +% \end{tabular} +% \end{center} +% % In the following example, we use the |\LOGfunction| function to compute % a table of the $\log$ function and its derivative. % \begin{exemple} @@ -1718,13 +1867,14 @@ version 1999/12/01 or later. % % \StopEventually{} % -% \section{Implementation (\textsf{calculator})} +% \part{Implementation} +% \section{\textsf{calculator}} % \begin{macrocode} %<*calculator> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{calculator}[2012/06/10 v.1.0a] +\ProvidesPackage{calculator}[2014/02/20 v.2.0] % \end{macrocode} -% \subsection{Internal lengths and special nmbers} +% \subsection{Internal lengths and special numbers} % \cs{cctr@lengtha} and \cs{cctr@lengthb} % will be used in internal calculations and comparisons. % \begin{macrocode} @@ -1739,7 +1889,7 @@ version 1999/12/01 or later. % $0.00002\approx1/65536=1/2^{16}$. % \begin{macrocode} \newdimen\cctr@epsilon -\cctr@epsilon=1sp +\cctr@epsilon=1sp % \end{macrocode} % \end{macro} % \begin{macro}{\cctr@logmaxnum} @@ -1772,6 +1922,37 @@ version 1999/12/01 or later. {The exponent in power function\MessageBreak must be an integer\MessageBreak I can't define #1^#2}} + +\def\cctr@Warnbigarcsin#1{% + \PackageWarning{calculator}% + {The argument in arcsin\MessageBreak + must be a number between -1 and 1\MessageBreak + I can't define arcsin(#1)}} + +\def\cctr@Warnbigarccos#1{% + \PackageWarning{calculator}% + {The argument in arccos\MessageBreak + must be a number between -1 and 1\MessageBreak + I can't define arccos(#1)}} + +\def\cctr@Warnsmallarcosh#1{% + \PackageWarning{calculator}% + {The argument in arcosh\MessageBreak + must be a number greater or equal than 1\MessageBreak + I can't define arcosh(#1)}} + +\def\cctr@Warnbigartanh#1{% + \PackageWarning{calculator}% + {The argument in artanh\MessageBreak + must be a number between -1 and 1\MessageBreak + I can't define artanh(#1)}} + +\def\cctr@Warnsmallarcoth#1{% + \PackageWarning{calculator}% + {The argument in arcoth\MessageBreak + must be a number greater than 1\MessageBreak + or smaller than -1\MessageBreak + I can't define arcoth(#1)}} \def\cctr@Warnsingmatrix#1#2#3#4{% \PackageWarning{calculator}% @@ -1783,18 +1964,18 @@ version 1999/12/01 or later. {Matrix (#1 #2 #3; #4 #5 #6; #7 #8 #9) is singular\MessageBreak Its inverse is not defined}} -\def\cctr@WarnIncLinSys{\PackageWarning{xpicture}{% +\def\cctr@WarnIncLinSys{\PackageWarning{calculator}{% Incompatible linear system}} -\def\cctr@WarnIncTDLinSys{\PackageWarning{xpicture}{% +\def\cctr@WarnIncTDLinSys{\PackageWarning{calculator}{% Incompatible or indeterminate linear system\MessageBreak For 3x3 systems I can solve only determinate systems}} -\def\cctr@WarnIndLinSys{\PackageWarning{xpicture}{% +\def\cctr@WarnIndLinSys{\PackageWarning{calculator}{% Indeterminate linear system.\MessageBreak I will choose one of the infinite solutions}} -\def\cctr@WarnZeroLinSys{\PackageWarning{xpicture}{% +\def\cctr@WarnZeroLinSys{\PackageWarning{calculator}{% 0x=0 linear system. Every vector is a solution!\MessageBreak I will choose the (0,0) solution}} @@ -1829,7 +2010,19 @@ version 1999/12/01 or later. \PackageWarning{calculator}{% The value of the variable\MessageBreak in the logarithm function must be positive\MessageBreak - I can't define log(#1)}} + I can't define log(#1)}} + +\def\cctr@Warncrossprod(#1)(#2){% + \PackageWarning{calculator}% + {Vector product only defined\MessageBreak + for 3 dimmensional vectors.\MessageBreak + I can't define (#1)x(#2)}} + +\def\cctr@Warnnoangle(#1)(#2){% + \PackageWarning{calculator}% + {Angle between two vectors only defined\MessageBreak + for nonzero vectors.\MessageBreak + I can't define an angle between (#1) and (#2)}} % \end{macrocode} % \subsection{Operations with numbers} % \subsubsection*{Assignements and comparisons} @@ -2017,6 +2210,30 @@ version 1999/12/01 or later. \fi\ignorespaces} % \end{macrocode} % \end{macro} +% \changes{v2.0}{2014/02/13}{New commands: \cs{LENGTHADD}, +% \cs{LENGTHSUBTRACT}} +% \begin{macro}{\LENGTHADD} +% The sum of two lengths. +% \cs{LENGTHADD}\marg{\#1}\marg{\#2}\marg{\#3} +% stores in \textit{\#3} the sum of the lenghts +% \textit{\#1} and \textit{\#2} (\#3 must be a length). +% \begin{macrocode} +\def\LENGTHADD#1#2#3{\cctr@lengtha=#1 + \cctr@lengthb=#2 + \advance\cctr@lengtha by \cctr@lengthb + \setlength{#3}{\cctr@lengtha}\ignorespaces} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\LENGTHSUBTRACT} +% The difference of two lengths. +% \cs{LENGTHSUBTRACT}\marg{\#1}\marg{\#2}\marg{\#3} +% stores in \textit{\#3} the difference of the lenghts +% \textit{\#1} and \textit{\#2} (\#3 must be a length). +% \begin{macrocode} +\def\LENGTHSUBTRACT#1#2#3{% + \LENGTHADD{#1}{-#2}{#3}} +% \end{macrocode} +% \end{macro} % \begin{macro}{\LENGTHDIVIDE} % The quotient of two lengths must be a number (not a length). % For example, one inch over one centimeter equals $2.54$. @@ -2981,11 +3198,10 @@ version 1999/12/01 or later. % We start with |\cctr@lengthb=5\p@| to ensure almost one iteration. % \begin{macrocode} \cctr@lengthb=5\p@% - \cctr@lengtha=\cctr@epsilon% % \end{macrocode} % Successive iterations % \begin{macrocode} - \@whilenum \cctr@lengthb>\cctr@lengtha \do {% + \@whilenum \cctr@lengthb>\cctr@epsilon \do {% \COPY{\cctr@tempw}{\cctr@tempoldw} \EXP{\cctr@tempw}{\cctr@tempxw} \DIVIDE{#1}{\cctr@tempxw}{\cctr@tempxw} @@ -2999,6 +3215,334 @@ version 1999/12/01 or later. \COPY{\cctr@tempw}{#2}\@OUTPUTSOL{#2}} % \end{macrocode} % \end{macro} +% \paragraph*{Inverse trigonometric functions} +% \changes{v2.0}{2014/02/13}{New commands: \cs{ARCSIN}, +% \cs{ARCCOS}, \cs{ARCTAN}, +% \cs{ARCCOT}} +% \begin{macro}{\ARCSIN} +% \cs{ARCSIN}\marg{\#1}\marg{\#2} +% defines \textit{\#2} as the arcsin of \textit{\#1}, +% using the Newton's method: $x_{n+1}=x_n-(\sin x_n-\textit{\#1})/(\cos x_n)$. +% \begin{macrocode} +\def\ARCSIN#1#2{% + \begingroup + \ifdim #1\p@ = \z@ + \COPY{0}{#2} + \else + \ifdim #1\p@ = 1\p@ + \COPY{\numberHALFPI}{#2} + \else + \ifdim #1\p@ = -1\p@ + \COPY{-\numberHALFPI}{#2} + \else + \ifdim #1\p@ > 1\p@ + \let#2\undefined + \cctr@Warnbigarcsin{#1} + \else + \ifdim #1\p@ < -1\p@ + \let#2\undefined + \cctr@Warnbigarcsin{#1} + \else +% \end{macrocode} +% If $x$ is close to $1$ we use $\arcsin x=\pi/2-2\arcsin\sqrt{(1-x)/2}$ +% \begin{macrocode} + \ifdim #1\p@ >0.89\p@ + \SUBTRACT{1}{#1}{\cctr@tempx} + \DIVIDE{\cctr@tempx}{2}{\cctr@tempx} + \SQRT{\cctr@tempx}{\cctr@tempxx} + \ARCSIN{\cctr@tempxx}{#2} + \MULTIPLY{2}{#2}{#2} + \SUBTRACT{\numberHALFPI}{#2}{#2} + \else +% \end{macrocode} +% Symmetrically, for $x$ close to $-1$, $\arcsin x=-\pi/2+2\arcsin\sqrt{(1+x)/2}$ +% \begin{macrocode} + \ifdim #1\p@ <-0.89\p@ + \ADD{1}{#1}{\cctr@tempx} + \DIVIDE{\cctr@tempx}{2}{\cctr@tempx} + \SQRT{\cctr@tempx}{\cctr@tempxx} + \ARCSIN{\cctr@tempxx}{#2} + \MULTIPLY{2}{#2}{#2} + \SUBTRACT{#2}{\numberHALFPI}{#2} + \else +% \end{macrocode} +% We take \textit{\#1} as the initial approximation. +% \begin{macrocode} + \COPY{#1}{#2} +% \end{macrocode} +% If $-0.4\leq t\leq 0.4$ then $\arcsin x\approx x$ is a good approximation. +% Else, we apply the Newton method +% \begin{macrocode} + \ABSVALUE{#1}{\cctr@tempy} + \ifdim \cctr@tempy\p@ < 0.04\p@ + \else +% \end{macrocode} +% \cs{cctr@lengthb} will be the difference of two successive iterations, and +% \cs{cctr@tempoldy}, \cs{cctr@tempy} will be the two last iterations. +% +% We start with |\cctr@lengthb=5\p@| and |\cctr@tempy=16383| to ensure almost one iteration. +% \begin{macrocode} + \cctr@lengthb=5\p@ + \COPY{16383}{\cctr@tempy} +% \end{macrocode} +% Successive iterations +% \begin{macrocode} + \@whilenum \cctr@lengthb>\cctr@epsilon \do {% +% \end{macrocode} +% Copy the actual approximation to \cs{cctr@tempw} +% \begin{macrocode} + \COPY{#2}{\cctr@tempw} + \COPY{\cctr@tempy}{\cctr@tempoldy} + \SIN{\cctr@tempw}{\cctr@tempz} + \SUBTRACT{\cctr@tempz}{#1}{\cctr@tempz} + \COS{\cctr@tempw}{\cctr@tempy} + \DIVIDE{\cctr@tempz}{\cctr@tempy}{\cctr@tempz} + \SUBTRACT{\cctr@tempw}{\cctr@tempz}{\cctr@tempz} +% \end{macrocode} +% Now, \cs{cctr@tempz} is the new approximation. +% \begin{macrocode} + \COPY{\cctr@tempz}{#2} +% \end{macrocode} +% Finally, we store in \cs{cctr@lengthb} the difference +% of the two last approximations, finishing the loop. +% \begin{macrocode} + \SUBTRACT{#2}{\cctr@tempw}{\cctr@tempy} + \ABSVALUE{\cctr@tempy}{\cctr@tempy} + \cctr@lengthb=\cctr@tempy\p@% + \ifdim\cctr@tempy\p@=\cctr@tempoldy\p@ + \cctr@lengthb=\z@ + \fi}\fi\fi\fi\fi\fi\fi\fi\fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCCOS} +% \cs{ARCCOS}\marg{\#1}\marg{\#2} +% defines \textit{\#2} as the arccos of \textit{\#1}, +% using the well know relation $\arccos x=\pi/2-\arcsin x$. +% \begin{macrocode} +\def\ARCCOS#1#2{% + \begingroup + \ifdim #1\p@ = \z@ + \COPY{\numberHALFPI}{#2} + \else + \ifdim #1\p@ = 1\p@ + \COPY{0}{#2} + \else + \ifdim #1\p@ = -1\p@ + \COPY{\numberPI}{#2} + \else + \ifdim #1\p@ > 1\p@ + \let#2\undefined + \cctr@Warnbigarccos{#1} + \else + \ifdim #1\p@ < -1\p@ + \let#2\undefined + \cctr@Warnbigarccos{#1} + \else + \ARCSIN{#1}{#2} + \SUBTRACT{\numberHALFPI}{#2}{#2} + \fi\fi\fi\fi\fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCTAN} +% \cs{ARCTAN}\marg{\#1}\marg{\#2}. arctan of \textit{\#1}. +% \begin{macrocode} +\def\ARCTAN#1#2{% + \begingroup +% \end{macrocode} +% If $\left\vert t \right\vert>1$, compute $\arctan x$ using +% $\arctan x=sign(x)\pi/2-\arctan(1/x)$. +% \begin{macrocode} + \ifdim#1\p@<-1\p@ + \DIVIDE{1}{#1}{\cctr@tempb} + \ARCTAN{\cctr@tempb}{#2} + \SUBTRACT{-\numberHALFPI}{#2}{#2} + \else + \ifdim#1\p@>1\p@ + \DIVIDE{1}{#1}{\cctr@tempb} + \ARCTAN{\cctr@tempb}{#2} + \SUBTRACT{\numberHALFPI}{#2}{#2} + \else +% \end{macrocode} +% For $-1\leq x\leq 1$ call \cs{@BASICARCTAN}. +% \begin{macrocode} + \@BASICARCTAN{#1}{#2} + \fi + \fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\@BASICARCTAN} +% \cs{@BASICARCTAN}\marg{\#1}\marg{\#2} applies this approximation: +% \[ +% \arctan x = \frac{x}{ +% 1+\displaystyle\frac{x^2}{ +% 3+\displaystyle\frac{(2x)^2}{ +% 5+\displaystyle\frac{(3x)^2}{ +% 7+\displaystyle\frac{(4x)^2}{ +% 9+\cdots +% } +% } +% } +% } +% } +% \] +% \begin{macrocode} +\def\@BASICARCTAN#1#2{% + \begingroup +% \end{macrocode} +% Exact arctan of zero +% \begin{macrocode} + \ifdim#1\p@=\z@ \COPY{0}{#2} + \else +% \end{macrocode} +% Compute the continued fraction. +% \begin{macrocode} + \SQUARE{#1}{\cctr@tempa} + \MULTIPLY{64}{\cctr@tempa}{#2} + \ADD{15}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{49}{#2}{#2} + \ADD{13}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{36}{#2}{#2} + \ADD{11}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{25}{#2}{#2} + \ADD{9}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{16}{#2}{#2} + \ADD{7}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{9}{#2}{#2} + \ADD{5}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \MULTIPLY{4}{#2}{#2} + \ADD{3}{#2}{#2} + \DIVIDE{\cctr@tempa}{#2}{#2} + \ADD{1}{#2}{#2} + \DIVIDE{#1}{#2}{#2} + \fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCCOT} +% \cs{ARCCOT}\marg{\#1}\marg{\#2} +% defines \textit{\#2} as the arccot of \textit{\#1}, +% using the well know relation $\operatorname{arccot} x=\pi/2-\arctan x$. +% \begin{macrocode} +\def\ARCCOT#1#2{% + \begingroup + \ARCTAN{#1}{#2} + \SUBTRACT{\numberHALFPI}{#2}{#2} + \@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \paragraph*{Inverse hyperbolic functions} +% \changes{v2.0}{2014/02/13}{New commands: \cs{ARSINH}, +% \cs{ARCOSH}, \cs{ARTANH}, +% \cs{ARCOTH}} +% \begin{macro}{\ARSINH} +% \cs{ARSINH}\marg{\#1}\marg{\#2}. Inverse hyperbolic sine of \textit{\#1}: +% $\arsinh x = \log\left(x+\sqrt{1+x^2}\right)$ +% \begin{macrocode} +\def\ARSINH#1#2{% + \begingroup + \SQUARE{#1}{\cctr@tempa} + \ADD{1}{\cctr@tempa}{\cctr@tempa} + \SQRT{\cctr@tempa}{\cctr@tempb} + \ADD{#1}{\cctr@tempb}{\cctr@tempb} + \LOG\cctr@tempb{#2} + \@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\ARCOSH} +% \cs{ARCOSH}\marg{\#1}\marg{\#2}. Inverse hyperbolic sine of \textit{\#1}: +% $\arcosh x = \log\left(x+\sqrt{x^2-1}\right)$ +% \begin{macrocode} +\def\ARCOSH#1#2{% + \begingroup +% \end{macrocode} +% If $x<1$, this function is no defined +% \begin{macrocode} + \ifdim#1\p@<1\p@ + \let#2\undefined + \cctr@Warnsmallarcosh{#1} + \else + \SQUARE{#1}{\cctr@tempa} + \SUBTRACT{\cctr@tempa}{1}{\cctr@tempa} + \SQRT{\cctr@tempa}{\cctr@tempb} + \ADD{#1}{\cctr@tempb}{\cctr@tempb} + \LOG\cctr@tempb{#2} + \fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARTANH} +% \cs{ARTANH}\marg{\#1}\marg{\#2}. Inverse hyperbolic tangent of \textit{\#1}: +% $\artanh x = \frac12\log \left((1+x)-\log(1-x)\right)$ +% \begin{macrocode} +\def\ARTANH#1#2{% + \begingroup +% \end{macrocode} +% If $\left\vert x \right\vert\geq1$, this function is no defined +% \begin{macrocode} + \ifdim#1\p@<-0.99998\p@ + \let#2\undefined + \cctr@Warnbigartanh{#1} + \else + \ifdim#1\p@>0.99998\p@ + \let#2\undefined + \cctr@Warnbigartanh{#1} + \else + \COPY{#1}{\cctr@tempa} + \ADD1\cctr@tempa\cctr@tempb + \SUBTRACT1\cctr@tempa\cctr@tempc + \LOG\cctr@tempb\cctr@tempB + \LOG\cctr@tempc\cctr@tempC + \SUBTRACT\cctr@tempB\cctr@tempC{#2} + \DIVIDE{#2}{2}{#2} + \fi + \fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCOTH} +% \cs{ARCOTH}\marg{\#1}\marg{\#2}. Inverse hyperbolic cotangent of \textit{\#1}: +% +% $\arcoth x = sign(x)\frac12\log \left((x+1)-\log(x-1)\right)$ +% \begin{macrocode} +\def\ARCOTH#1#2{% + \begingroup +% \end{macrocode} +% If $\left\vert x \right\vert\leq1$, this function is no defined +% \begin{macrocode} + \ifdim#1\p@>-0.99998\p@ + \ifdim#1\p@<0.99998\p@ + \let#2\undefined + \cctr@Warnsmallarcoth{#1} + \else + \ifdim#1\p@>\p@ +% \end{macrocode} +% For $x>1$, calcule $\arcoth x = \frac12\log \left((x+1)-\log(x-1)\right)$ +% \begin{macrocode} + \COPY{#1}{\cctr@tempa} + \ADD1\cctr@tempa\cctr@tempb + \SUBTRACT\cctr@tempa1\cctr@tempc + \LOG\cctr@tempb\cctr@tempB + \LOG\cctr@tempc\cctr@tempC + \SUBTRACT\cctr@tempB\cctr@tempC{#2} + \DIVIDE{#2}{2}{#2} + \else + \fi + \fi + \else +% \end{macrocode} +% For $x<-1$, calcule $-\artanh(-x)$ +% \begin{macrocode} + \MULTIPLY{-1}{#1}{\cctr@tempa} + \ARCOTH{\cctr@tempa}{#2} + \COPY{-#2}{#2} + \fi\@OUTPUTSOL{#2}} +% \end{macrocode} +% \end{macro} +% % \subsection{Matrix arithmetics} % \subsubsection*{Vector operations} % \begin{macro}{\VECTORSIZE} @@ -3090,6 +3634,45 @@ version 1999/12/01 or later. \else \@@@SCALARPRODUCT(#1)(#2){#3}\fi\@OUTPUTSOL{#3}} % \end{macrocode} % \end{macro} + +% \changes{v2.0}{2013/07/10}{New commands: \cs{DOTPRODUCT}, +% \cs{VECTORPRODUCT}, \cs{CROSSPRODUCT}} +% \begin{macro}{\DOTPRODUCT} +% \cs{DOTPRODUCT} is an alias for \cs{SCALARPRODUCT}. +% \begin{macrocode} +\let\DOTPRODUCT\SCALARPRODUCT +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\VECTORPRODUCT} +% Vector product of two (three dimensional) vectors. +% \begin{macrocode} +\def\@@VECTORPRODUCT(#1)(#2)(#3,#4){% + \let#3\undefined + \let#4\undefined + \cctr@Warncrossprod(#1)(#2)} + +\def\@@@VECTORPRODUCT(#1,#2,#3)(#4,#5,#6)(#7,#8,#9){% + \DETERMINANT(#2,#3;#5,#6){#7} + \DETERMINANT(#3,#1;#6,#4){#8} + \DETERMINANT(#1,#2;#4,#5){#9}} + +\def\VECTORPRODUCT(#1)(#2)(#3){% + \begingroup + \VECTORSIZE(#1){\cctr@size} + \ifnum\cctr@size=2 + \@@VECTORPRODUCT(#1)(#2)(#3) + \else \@@@VECTORPRODUCT(#1)(#2)(#3)\fi\@OUTPUTSOL{#3}} +% \end{macrocode} +% \end{macro} + +% \begin{macro}{\CROSSPRODUCT} +% \cs{CROSSPRODUCT} is an alias for \cs{VECTORPRODUCT}. +% \begin{macrocode} +\let\CROSSPRODUCT\VECTORPRODUCT +% \end{macrocode} +% \end{macro} + % \begin{macro}{\VECTORADD} % Sum of two vectors. % \begin{macrocode} @@ -3179,6 +3762,28 @@ version 1999/12/01 or later. \SCALARVECTORPRODUCT{\cctr@tempa}(#1)(#2)\@OUTPUTVECTOR(#2)} % \end{macrocode} % \end{macro} +% \begin{macro}{\TWOVECTORSANGLE} +% Angle between two vectors. +% \begin{macrocode} +\def\TWOVECTORSANGLE(#1)(#2)#3{% + \begingroup + \VECTORNORM(#1){\cctr@tempa} + \VECTORNORM(#2){\cctr@tempb} + \SCALARPRODUCT(#1)(#2){\cctr@tempc} + \ifdim \cctr@tempa\p@ =\z@ + \let#3\undefined + \cctr@Warnnoangle(#1)(#2) + \else + \ifdim \cctr@tempb\p@ =\z@ + \let#3\undefined + \cctr@Warnnoangle(#1)(#2) + \else + \DIVIDE{\cctr@tempc}{\cctr@tempa}{\cctr@tempc} + \DIVIDE{\cctr@tempc}{\cctr@tempb}{\cctr@tempc} + \ARCCOS{\cctr@tempc}{#3} + \fi\fi\@OUTPUTSOL{#3}} +% \end{macrocode} +% \end{macro} % \subsubsection*{Matrix operations} % Here, we need to define some internal macros % to simulate commands with more than nine arguments. @@ -3787,12 +4392,12 @@ version 1999/12/01 or later. % % \end{macrocode} % -% \section{Implementation (\textsf{calculator})} +% \section{\textsf{calculus}} +% \changes{v2.0}{2013/07/10}{Trivial error in documentation corrected} % \begin{macrocode} %<*calculus> \NeedsTeXFormat{LaTeX2e} -\ProvidesPackage{calculus} - [2012/06/10 v.1.0a] +\ProvidesPackage{calculus}[2014/02/20 v.2.0] % \end{macrocode} % This package requires the calculator package. % \begin{macrocode} @@ -4382,6 +4987,96 @@ version 1999/12/01 or later. \COPY{0}{\Dy}} % \end{macrocode} % \end{macro} +% \changes{v2.0}{2014/02/13}{New commands: \cs{ARCSINfunction}, +% \cs{ARCCOSfunction}, \cs{ARCTANfunction}, +% \cs{ARCCOTfunction}} +% \begin{macro}{\ARCSINfunction} +% The \cs{ARCSINfunction}: $y(t)=\arcsin t$, $y'(t)=1/\sqrt{1-t^2}$ +% \begin{macrocode} +\newfunction{\ARCSINfunction}{% + \ARCSIN{\t}{\y} + \SQUARE{\t}{\yy} + \SUBTRACT{1}{\yy}{\yy} + \SQRT{\yy}{\Dy} + \DIVIDE{1}{\Dy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCCOSfunction} +% The \cs{ARCCOSfunction}: $y(t)=\arccos t$, $y'(t)=-1/\sqrt{1-t^2}$ +% \begin{macrocode} +\newfunction{\ARCCOSfunction}{% + \ARCCOS{\t}{\y} + \SQUARE{\t}{\yy} + \SUBTRACT{1}{\yy}{\yy} + \SQRT{\yy}{\Dy} + \DIVIDE{-1}{\Dy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCTANfunction} +% The \cs{ARCTANfunction}: $y(t)=\arctan t$, $y'(t)=1/(1+t^2)$ +% \begin{macrocode} +\newfunction{\ARCTANfunction}{% + \ARCTAN{\t}{\y} + \SQUARE{\t}{\yy} + \ADD{1}{\yy}{\yy} + \DIVIDE{1}{\yy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCCOTfunction} +% The \cs{ARCCOTfunction}: $y(t)=\arccot t$, $y'(t)=-1/(1+t^2)$ +% \begin{macrocode} +\newfunction{\ARCCOTfunction}{% + \ARCCOT{\t}{\y} + \SQUARE{\t}{\yy} + \ADD{1}{\yy}{\yy} + \DIVIDE{-1}{\yy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \changes{v2.0}{2014/02/13}{New commands: \cs{ARSINHfunction}, +% \cs{ARCOSHfunction}, \cs{ARTANHfunction}, +% \cs{ARCOTHfunction}} +% \begin{macro}{\ARSINHfunction} +% The \cs{ARSINHfunction}: $y(t)=\arsinh t$, $y'(t)=1/\sqrt{1+t^2}$ +% \begin{macrocode} +\newfunction{\ARSINHfunction}{% + \ARSINH{\t}{\y} + \SQUARE{\t}{\yy} + \ADD{1}{\yy}{\yy} + \SQRT{\yy}{\Dy} + \DIVIDE{1}{\Dy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCOSHfunction} +% The \cs{ARSINHfunction}: $y(t)=\arcosh t$, $y'(t)=1/\sqrt{t^2-1}$ +% \begin{macrocode} +\newfunction{\ARCOSHfunction}{% + \ARCOSH{\t}{\y} + \SQUARE{\t}{\yy} + \SUBTRACT{\yy}{1}{\yy} + \SQRT{\yy}{\Dy} + \DIVIDE{1}{\Dy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARTANHfunction} +% The \cs{ARTANHfunction}: $y(t)=\artanh t$, $y'(t)=1/(t^2-1)$ +% \begin{macrocode} +\newfunction{\ARTANHfunction}{% + \ARTANH{\t}{\y} + \SQUARE{\t}{\yy} + \SUBTRACT{1}{\yy}{\yy} + \DIVIDE{1}{\yy}{\Dy}} +% \end{macrocode} +% \end{macro} +% \begin{macro}{\ARCOTHfunction} +% The \cs{ARCOTHfunction}: $y(t)=\arcoth t$, $y'(t)=1/(t^2-1)$ +% \begin{macrocode} +\newfunction{\ARCOTHfunction}{% + \ARCOTH{\t}{\y} + \SQUARE{\t}{\yy} + \SUBTRACT{1}{\yy}{\yy} + \DIVIDE{1}{\yy}{\Dy}} +% \end{macrocode} +% \end{macro} % \subsection{Operations with functions} % \begin{macro}{\CONSTANTfunction} % \cs{CONSTANTfunction} defines \#2 as the constant function $f(t)=\#1$. diff --git a/Master/texmf-dist/source/latex/calculator/calculator.ins b/Master/texmf-dist/source/latex/calculator/calculator.ins new file mode 100644 index 00000000000..1b761991586 --- /dev/null +++ b/Master/texmf-dist/source/latex/calculator/calculator.ins @@ -0,0 +1,74 @@ +%% +%% Copyright (C) 2012, 2014 by Robert Fuster +%% +%% This work may be distributed and/or modified under the conditions of +%% the LaTeX Project Public License, either version 1.3 of this license +%% or (at your option) any later version. The latest version of this +%% license is in: +%% +%% http://www.latex-project.org/lppl.txt +%% +%% and version 1.3 or later is part of all distributions of LaTeX +%% version 2005/12/01 or later. +%% +%% This work has the LPPL maintenance status `maintained'. +%% +%% The Current Maintainer of this work is Robert Fuster +%% +%% This work consists of the files calculator.dtx and calculator.ins +%% and the derived files calculator.sty, calculus.ins, and several +%% calculator.tex derived files. +%% + +\input docstrip.tex +\keepsilent + +\usedir{tex/latex/calculator} + +\preamble +This is a generated file. + +This work may be distributed and/or modified under the conditions of +the LaTeX Project Public License, either version 1.3 of this license +or (at your option) any later version. The latest version of this +license is in: + + http://www.latex-project.org/lppl.txt + +and version 1.3 or later is part of all distributions of LaTeX +version 2005/12/01 or later. + +This work has the LPPL maintenance status `maintained'. + +The Current Maintainer of this work is Robert Fuster + +This work consists of the files calculator.dtx and calculator.ins +and the derived files calculator.sty, calculus.ins, and several +calculator.tex derived files. + +\endpreamble + +\generate{\file{calculator.sty}{\from{calculator.dtx}{calculator}}} +\generate{\file{calculus.sty}{\from{calculator.dtx}{calculus}}} + +\obeyspaces +\Msg{*****************************************************} +\Msg{* *} +\Msg{* To finish the installation you have to move the *} +\Msg{* following file into a directory searched by TeX: *} +\Msg{* *} +\Msg{* calculator.sty *} +\Msg{* *} +\Msg{* (in a TDS compliant tree, something like *} +\Msg{* /tex/latex/calculator/ *} +\Msg{* can be a good choice) *} +\Msg{* *} +\Msg{* To produce the documentation run the file *} +\Msg{* calculator.dtx *} +\Msg{* through LaTeX. *} +\Msg{* *} +\Msg{* Happy TeXing! *} +\Msg{* *} +\Msg{*****************************************************} + +\endbatchfile -- cgit v1.2.3