summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/babel-contrib/greek/grmath.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/babel-contrib/greek/grmath.dtx')
-rw-r--r--macros/latex/contrib/babel-contrib/greek/grmath.dtx168
1 files changed, 168 insertions, 0 deletions
diff --git a/macros/latex/contrib/babel-contrib/greek/grmath.dtx b/macros/latex/contrib/babel-contrib/greek/grmath.dtx
new file mode 100644
index 0000000000..000daadcd8
--- /dev/null
+++ b/macros/latex/contrib/babel-contrib/greek/grmath.dtx
@@ -0,0 +1,168 @@
+% \iffalse meta-comment
+%
+% Copyright 1989-2008 Johannes L. Braams and any individual authors
+% listed elsewhere in this file. All rights reserved.
+%
+% This file is part of the Babel system.
+% --------------------------------------
+%
+% It 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 2003/12/01 or later.
+%
+% This work has the LPPL maintenance status "maintained".
+%
+% The Current Maintainer of this work is Johannes Braams.
+%
+% The list of all files belonging to the Babel system is
+% given in the file `manifest.bbl. See also `legal.bbl' for additional
+% information.
+%
+% The list of derived (unpacked) files belonging to the distribution
+% and covered by LPPL is defined by the unpacking scripts (with
+% extension .ins) which are part of the distribution.
+% \fi
+%% \CheckSum{126}
+%
+%\iffalse
+%
+%% This is file `grmath.sty'
+%% (c) 1997-2005 Apostolos Syropoulos.
+%% All rights reserved.
+% You are allowed to modify this file as long the initial copyright notice
+% appears in the modified file.
+%
+% Please report errors or suggestions for improvement to
+%
+% Apostolos Syropoulos
+% 366, 28th October Str.
+% GR-671 00 Xanthi, GREECE
+%
+% apostolo at platon.ee.duth.gr or apostolo at obelix.ee.duth.gr
+%
+%\fi
+%\iffalse
+% \begin{macrocode}
+%<*driver>
+\documentclass{ltxdoc}
+\GetFileInfo{grmath.drv}
+\begin{document}
+ \DocInput{grmath.dtx}
+\end{document}
+%</driver>
+% \end{macrocode}
+%\fi
+%
+% \changes{grmath-1.2}{2001/02/12}{Package provides options ``grlog''
+% (default) and ``enlog'' that create Greek and Latin names
+% log functions}
+%
+% \title{Greek log-like Operators}
+% \author{Apostolos Syropoulos\\
+% 366, 28th October Str.\\
+% GR-671 00 Xanthi, HELLAS\\
+% E-mail: \texttt{apostolo@platon.ee.duth.gr}}
+% \date{2001/02/12}
+% \maketitle
+%
+% \MakeShortVerb{|}
+% \section{What is this all about?}
+%
+% In Greece, until recently, it was common practice to write down most
+% log-like functions as abbreviations of their Greek names. Consequently,
+% high school students and even university freshmen were not familiar with
+% the Latin names employed in international literature. However, this practice
+% is fading away in universities but it is still in wide use in books for
+% high schools, mainly because the Latin names would produce nothing but
+% confusion. The package |grmath| redefines most log-like definitions
+% so that they produce the Greek name, instead of the Latin one. The package
+% can be used only in conjunction with the |greek| option of the |babel|
+% package. The new option |enlog| allows one to keep the Latin names for
+% the log functions.
+% \StopEventually
+%
+% \section{The Implementation}
+%
+% As usual we must first identify ourselves.
+%
+% \begin{macrocode}
+%<*package>
+\ProvidesPackage{grmath}[2001/02/12\space v1.2]
+\typeout{Package: `grmath' v1.2\space <2001/02/12> (A. Syropoulos)}
+% \end{macrocode}
+%
+% The next thing we do is to process the options. The default option
+% ``grlog'' generates Greek names for log functions and the ``enlog''
+% option generates Latin names for log functions.
+% \begin{macrocode}
+\DeclareOption{grlog}{%
+ \def\log{\mathop{\mathgroup\symgroperators log_{10}}\nolimits}
+ \def\ln{\mathop{\mathgroup\symgroperators log_%
+ {\mathgroup\symoperators e}}\nolimits}
+}
+\DeclareOption{enlog}{%
+ \def\log{\mathop{\operator@font log}\nolimits}
+ \def\ln{\mathop{\operator@font ln}\nolimits}
+}
+\ExecuteOptions{grlog}
+\ProcessOptions
+% \end{macrocode}
+%
+% Now we check to see if the |babel| package is loaded with at least
+% the |greek| option. In case it isn't, we opt to produce an error message.
+% \begin{macrocode}
+\@ifpackagewith{babel}{greek}{}{%
+ \@ifpackagewith{babel}{polutonikogreek}{}{%
+ \PackageError{grmath}{%
+ `greek' option of the `babel'\MessageBreak
+ package hasn't been loaded}{%
+ The commands provided by this package\MessageBreak
+ are specially designed for greek language\MessageBreak
+ typesetting with the `babel' package. Load\MessageBreak
+ it with at least the `greek' option.}\relax
+ }}
+% \end{macrocode}
+%
+% We define the mathematical font which will be used to typeset
+% the log-like functions.
+% \begin{macrocode}
+\DeclareSymbolFont{groperators}{LGR}{cmr}{m}{n}
+\SetSymbolFont{groperators}{bold}{LGR}{cmr}{bx}{n}
+% \end{macrocode}
+%
+% We are now ready to proceed with the redefinitions of the log-like
+% operator names.
+% \begin{macrocode}
+\def\sin{\mathop{\mathgroup\symgroperators hm}\nolimits}
+\def\cos{\mathop{\mathgroup\symgroperators sun}\nolimits}
+\def\tan{\mathop{\mathgroup\symgroperators ef}\nolimits}
+\def\arcsin{\mathop{\mathgroup\symgroperators toxhm}\nolimits}
+\def\arccos{\mathop{\mathgroup\symgroperators toxsun}\nolimits}
+\def\arctan{\mathop{\mathgroup\symgroperators toxef}\nolimits}
+\def\cot{\mathop{\mathgroup\symgroperators sf}\nolimits}
+\def\sec{\mathop{\mathgroup\symgroperators tem}\nolimits}
+\def\csc{\mathop{\mathgroup\symgroperators stem}\nolimits}
+\def\gcd{\mathop{\mathgroup\symgroperators MKD}\nolimits}
+% \end{macrocode}
+% In the standard \LaTeX\ distribution there is no provision for a
+% Least Common Multiple (lcm) log-like operator. Since, this operator
+% appears quite often in greek literature we opt to include it. Moreover,
+% we include three more log-like functions: |\arccot|, |\arcsec| and
+% |\arccsc|.
+% \begin{macrocode}
+\def\lcm{\mathop{\mathgroup\symgroperators EKP}\nolimits}
+\def\arccot{\mathop{\mathgroup\symgroperators toxsf}\nolimits}
+\def\arcsec{\mathop{\mathgroup\symgroperators toxtem}\nolimits}
+\def\arccsc{\mathop{\mathgroup\symgroperators toxstem}\nolimits}
+%</package>
+% \end{macrocode}
+%
+% \section*{Dedication}
+% I would like to dedicate this piece of work to my son
+% \begin{center}Demetrios-Georgios.\end{center}
+% \Finale
+\endinput