% \iffalse %<*driver> \def\formuladate{April 29, 1998} \def\formulaversion{0.2} \documentclass[11pt,twoside,a4paper]{article} \usepackage{doc} \usepackage{formula} \usepackage[T1]{fontenc} \usepackage{relsize} \newcommand{\FORMULA}{{\relsize{3}$\varphi$}{\relsize{2}$\!_o$}$rmula$} \newcommand{\Formula}{\FORMULA\xspace} \newcommand{\atname}{\texttt{formula}} \newcommand{\atnamesty}{\texttt{formula.sty}\xspace} \begin{document} \title{The \Formula style \\ {\small Version \formulaversion}} \author{Andreas Tille} \date{\formuladate} \maketitle \OnlyDescription \DocInput{formula.dtx} \end{document} % % \fi % \CheckSum{671} % \newcommand{\HOCH}{$\vphantom{\biggl(}$} % \iffalse excerpt from amsdoc.cls \fi % \newcommand{\AmS}{{\protect\usefont{OMS}{cmsy}{m}{n}% % A\kern-.1667em\lower.5ex\hbox{M}\kern-.125emS}} % \newcommand{\amslatex}{{\protect\AmS-\protect\LaTeX}} % \newcommand{\Mac}[1]{\texttt{\textbackslash #1}} % \newcommand{\parm}[1]{{\em #1}} % \newcommand{\ttBo}{\texttt{\{}} % \newcommand{\ttBc}{\texttt{\}}} % \newcommand{\Parm}[1]{\ttBo\parm{#1}\ttBc} % \newcommand{\Parmz}[2]{\Parm{#1}\Parm{#2}} % \newcommand{\Parmd}[3]{\Parmz{#1}{#2}\Parm{#3}} % \newcommand{\Parmv}[4]{\Parmd{#1}{#2}{#3}\Parm{#4}} % \newcommand{\oParm}[1]{\texttt{[}#1\texttt{]}} % \newcommand{\BB}{\textbackslash\textbackslash} % \newenvironment{syntax} % {\list{}{\rightmargin\leftmargin}% % \item\relax} % {\endlist} % % \thispagestyle{empty} % \tableofcontents % \bigskip\bigskip % % \begin{abstract} % \Formula is inteded to be helpful when using symbols inside % and outside math-mode. The symbols which can be defined using % \Formula should help to ensure a unique layout over all documents % using the same definitions. % % Additionally there is support for physical units. The use of % \Formula units makes sure to have the right spacing. % \end{abstract} % % % \section{Usage} % % To use \Formula you have to include % \begin{syntax} % \Mac{usepackage\{\atname\}} % \end{syntax} % in the preamble of your \LaTeX2e-document. % The \atnamesty depends from some other packages which are: % \begin{itemize} % \item \texttt{xspace.sty} from {\em David Carlisle}, % \item \texttt{amsfonts.sty} and \texttt{amstext.sty} contained in % the \amslatex-package and % \item \texttt{textcomp.sty} from {\em J\"org Knappen} (at least % Version 1998/03/05 v1.9n; if you really havn't access to this % Version you will have to replace \Mac{textcelsius} by % \Mac{textcentigrade} in \texttt{formula.dtx}). % \end{itemize} % % Loading of \atnamesty takes some time. If the predefined % commands are not used this time can be shortened by using % the option \texttt{[nopredefinition]}. To get a list of all % predefined commands in \Formula use prepverz % (see section \ref{predef}). % % \section{Definitions of \Formula} % \subsection{Definining single \Formula commands} % % Zur Definition von einfachen Symbolen wird \Mac{formuladef} verwendet. % Dieses Makro ist mit vier Argumenten aufzurufen. % \begin{syntax} % \Mac{formuladef \Parm{Name} \Parm{Inhalt} \Parm{Beschreibung} \Parm{Artikel}} % \end{syntax} % Dabei steht \parm{Name} f\"ur den Namen eines zu definierenden Makros % das im Folgenden mit \Mac{Name} verwendet werden kann. Das Makro % \Mac{Name} bewirkt, da\ss{} \parm{Inhalt} im Mathemodus gesetzt wird, unabh\"angig % davon, ob der Mathemodus oder der Textmodus aktiv ist. % Falls der \parm{Inhalt} oder Teile desselben in Roman gesetzt werden % sollen, so ist das durch \Mac{mathrm}\Parm{Inhalt in Roman} zu kennzeichnen. % Durch \Mac{formuladef} wird ein weiteres Makro \Mac{Namedoc} erzeugt. % Dieses Makro hat folgenden Inhalt: % \begin{syntax} % \Mac{Name \& }\parm{Beschreibung} \BB % \end{syntax} % Der Zweck dieses Makros ist die Vereinfachte Schreibweise f\"ur ein % Abk\"urzungsverzeichnis. Ein typisches Abk\"urzungsverzeichnis sieht % folglich so aus: % \begin{syntax} % \Mac{begin\{tabular\}\{ll\}} \\ % \Mac{einsdoc} \\ % \Mac{zweidoc} \\ % \Mac{dreidoc} \\ % \Mac{end\{tabular\}} % \end{syntax} % wobei \Mac{eins}, \Mac{zwei} und \Mac{drei} durch \Mac{formuladef} definierte % Befehle sein m\"ogen. % Zwei weitere durch \Mac{formuladef} erzeugte Makros sind \Mac{Nametxt} und % \Mac{Nameart}. Sie stellen das dritte bzw.~vierte Argument des % Aufrufs von \Mac{formuladef} bereit. Diese beiden Befehle k\"onnen sich % bei der Erl\"auterung von Symbolen in einer Formel als n\"utzlich % erweisen. Der \parm{Artikel} kann nat\"urlich auch \Parm{} sein. Er wird % lediglich deshalb extra aufgelistet, weil er im Abk\"urzungsverzeichnis % in der Regel nicht ben\"otigt wird, bei Erl\"auterungen von % Formelzeichen jedoch erst einen vollst\"andigen Satz erm\"oglicht. % Das letzte durch \Mac{formuladef} erzeugte Makro hei\ss{}t \Mac{Namemy}. % Es gibt dem Autor die M\"oglichkeit, einen \"Uberblick \"uber seine % 1001 \Mac{formuladef}-Definitionen zu behalten. Es hat folgenden % Inhalt: % \begin{syntax} % \Mac{texttt\{}\Mac{Name\} \& }\Mac{Namedoc} % \end{syntax} % Damit wird f\"ur den Autor dokumentiert, welchen Befehl er einzugeben hat und % was sich hinter dem Befehl verbirgt. % Beispiel: % \iffalse %<*exampl> % \fi % \begin{verbatim} \documentclass{article} \usepackage[T1]{fontenc} \usepackage[nopredefinition]{formula} \pagestyle{empty} \textheight 55\baselineskip \advance\oddsidemargin by -10mm \textwidth 150mm \formuladef IQ {\text{IQ}} {Intelligenzquotient} {der} \formuladef Kl {K} {Klugheit} {die} \formuladef Du {D} {Dummheit} {die} \begin{document} \section*{Wie dumm ist der Zufall} Herr Rainer Zufall hat einen \IQ von \texttt{???} {(\em Zensiert, Frau Emma N. Z. Daten-Schutz)}. Dabei ist der \IQ definiert als \beq \IQ = \frac{\Kl}{\Du} \label{IQ} \eeq wobei \Kl \Klart \Kltxt des Herrn Zufall und \Du \Duart \Dutxt dieses werten Herrn ist. \par % \end{verbatim} % \iffalse % % \fi % % Bemerkung: \Mac{formuladef} und auch die im Folgenden definierten % Befehle werden {\em global} definiert, da\ss{} hei\ss{}t, auch wenn % die Definitionen der Befehle innerhalb einer Umgebung vereinbart % werden, sind sie im gesamten folgenden Text bekannt. % % \subsection{Formelzeichen mit Anhang} % % Es kann vorkommen, da\ss{} an ein Formelzeichen etwas angeh\"angt % werden soll (Indizes, Potenzen, etc.). Daf\"ur wurde eine Abwandlung % von \Mac{formuladef} eingef\"uhrt: % \begin{syntax} % \Mac{formulaarg} \Parm{Name} \Parm{Inhalt} \Parm{Beschreibung} \Parm{Artikel} \Parm{Argument} % \end{syntax} % Die ersten vier Argumente von \Mac{formulaarg} entsprechen denen von % \Mac{formuladef}. Hinzugekommen ist lediglich das f\"unfte Argument. Es % ist nur in \Mac{Namedoc} von Bedeutung: In der Dokumentation wird % das \parm{Argument} an den Befehl angeh\"angt. In der \parm{Beschreibung} ist % zweckm\"a\ss{}igerweise auf diese Argument Bezug zu nehmen. % Das sieht zum Beispiel so aus: % \iffalse %<*exampl> % \fi % \begin{verbatim} \formulaarg {Kli} {K_} {Klugheit bei der T\"atigkeit $X$} {die} {X} \formulaarg {Dui} {D_} {Dummheit bei der T\"atigkeit $X$} {die} {X} Angenommen, Herr Zufall stellt sich bei verschiedenen T\"atigkeiten unterschiedlich dumm an, so l\"a\ss{}t sich (\ref{IQ}) folgenderma\ss{}en pr\"azisieren: \beq \label{IQi} \IQ = \frac{\sum\limits_{i=1}^M\Kli{i}}{\sum\limits_{i=1}^N\Dui{i}} \eeq\par % \end{verbatim} % \iffalse % % \fi % % \subsection{Formelzeichen mit Einschub} % % Auch wenn ein Argument zwischen Teile eines zu definierenden Befehls % eingebaut werden soll, wird eine Definition bereitgestellt: % \begin{syntax} % \Mac{formulamit} \Parm{Name} \Parm{I1} \Parm{I2} \Parm{Beschreibung} \Parm{Artikel} \Parm{Argument}. % \end{syntax} % In \Mac{formulamit} wird offensichtlich der \parm{Inhalt} in zwei Teilen % \parm{I1} und \parm{I2} angegeben. Zwischen diese beiden Teile wird das % Argument eingef\"ugt. Das l\"a\ss{}t sich auch wieder am Beispiel eines % reinen Zufalls demonstrieren: % \iffalse %<*exampl> % \fi % \begin{verbatim} \formulamit {KlT} {K_} {^T} {Klugheit am Tag} {die} {X} \formulamit {KlN} {K_} {^N} {Klugheit in der Nacht} {die} {X} \formulamit {DuT} {D_} {^T} {Dummheit am Tag} {die} {X} \formulamit {DuN} {D_} {^N} {Dummheit in der Nacht} {die} {X} Wird nun noch in Betracht gezogen, da\ss{} der Zufall im Traum eine ganz andere Rolle spielt, als im realen Leben, so kann zwischen den Klugheiten bei Tag (\KlT{X}) und Nacht (\KlN{X}), sowie den Dummheiten zu diesen Tageszeiten (\DuT{X} bzw. \DuN{X}) unterschieden werden. Bei Reiner Zufall ist die Klugheit tags\"uber vernachl\"assigbar klein gegen\"uber der beim Tr\"aumen. Die Dummheit verh\"alt sich genau umgekehrt. Also ergibt sich aus (\ref{IQi}) \beq \IQ \simeq \frac{\sum\limits_{i=1}^M\KlN{i}}{\sum\limits_{i=1}^N\DuT{i}}. \eeq % \end{verbatim} % \iffalse % % \fi % % \subsection{Differenzenquotienten} % % Schlie\ss{}lich wird noch ein Makro bereitgestellt, mit der % Differenzenquotienten leicht definiert werden k\"onnen. Dieses wird % folgenderma\ss{}en aufgerufen: % \begin{syntax} % \Mac{formuladiff} \Parm{Name} \Parm{Art} \Parm{y} \Parm{x} \Parm{Beschreibung} \Parm{Artikel}. % \end{syntax} % Dabei haben \parm{Name}, \parm{Beschreibung} und \parm{Artikel} die gleiche % Bedeutung wie in den vorangegangenen Definitionen. Das Argument \parm{Art} % kann den Wert 'd' oder '$\partial$' haben, kennzeichnet also, ob es % sich um eine totale oder partielle Ableitung handeln soll. % Die abh\"angige Variable \parm{y} erscheint im Nenner, die unabh\"angige % Variable \parm{x} im Z\"ahler. Einem auf diese Art und Weise definierten % Befehl mu\ss{} ein Argument folgen, da\ss{} den Grad der Ableitung angibt. % Mit diesem Argument wird im Nenner das entsprechende % Differentialzeichen (\parm{Art}) potenziert, im Z\"ahler dagegen % die unabh\"angige Variable (\parm{x}) -- wie das halt so \"ublich ist. % \iffalse %<*exampl> % \fi % \begin{verbatim} \formuladiff Klt {d} {\Kl} {t} {Klugheitszuwachs n-ten Grades} {der} Da Herr Zufall ein eifriger Leser der Boulevardpresse ist, gilt: \bea \Klt{} & < & 0 \qquad\forall\quad t > t_0 \\ \Klt{2} & > & 0 \qquad\forall\quad t > t_0 \eea % \end{verbatim} % \iffalse % % \fi % % \subsection{Ma\ss{}einheiten} % % Zur Vereinheitlichung von Ma\ss{}einheiten wurde der Befehl \Mac{formulaunit} % eingef\"uhrt. Er hat folgende Syntax: % \begin{syntax} % \Mac{formulaunit} \Parm{Name} \Parm{rm} \Parm{gr} \Parm{Einheit} \Parm{Einheit in Worten}. % \end{syntax} % Wie in den Definitionen oben ist \parm{Name} ein zu definierender % Befehl. Weiterhin werden die Befehle \Mac{Namedoc}, \Mac{Nametxt} % und \Mac{Namemy} erzeugt, die die gleiche Bedeutung wie oben haben. % Die Argumente \parm{rm} und \parm{gr} sind als Vors\"atze vor Einheiten % zu gebrauchen. Dabei steht \parm{rm} f\"ur einen Vorsatz aus lateinischen % Buchstaben (z.B. m f\"ur Milli) und \parm{gr} f\"ur einen Vorsatz in % griechischen Buchstaben (z.B.~\textmu\ f\"ur Mikro). % Die Definitionen % \begin{syntax}\tt % \Mac{formulaunit} mm \{m\} \{\} m \{Millimeter\} \\ % \Mac{formulaunit} mum \{\} \{\textbackslash mu\} m \{Mikrometer\} % \end{syntax} % bewirken folglich, da\ss{} die Eingabe % \begin{syntax}\tt % 1\Mac{mm} = 1000\Mac{mum} % \end{syntax} % im Ergebnis ~~$1\mm = 1000\mum$~~ liefert. Zu beachten ist, da\ss{} der % Einheit-Befehl immer unmittelbar auf den Zahlenwert folgt, damit % nicht zus\"atzlicher Leerraum eingef\"ugt wird und \TeX\ an dieser % Stelle nicht trennt. % \parm{Einheit} ist die Einheit ohne weitere Vors\"atze. Einheiten % werden unabh\"angig davon, ob sie im Mathemodus oder nicht verwendet % werden, immer in Roman gesetzt. Der Wert der Einheit wird durch % \Mac{,} von der Einheit getrennt. % % \subsection{\label{predef}How to get all \Formula definitions} % % \Formula contains a number predefined commands. The script % \texttt{prepverz} can be used to get an overview % of this predefinitions and to remember your own \Formula definitions. % There should be no problem on any \texttt{UNIX} system. Using % \texttt{DOS} or \texttt{OS/2} (rename \texttt{prepverz.bat} to % \texttt{prepverz.cmd} in the latter case) you need a working \texttt{grep} % and \texttt{sed}. There should be no problems with any \texttt{grep} % version but there are reports of \texttt{DOS} \texttt{sed}s which failed. % The \texttt{GNU-sed} version 2.05 is known to work reliable. % Try to get a copy of it for your operating system. % % The streameditor \texttt{sed} is used to get all % \Mac{formula\dots}-definitions from any input file of \texttt{prepverz}. % These definitions where written into a \texttt{longtable} % environment in the outputfile \texttt{abverz.tex}. For example % \begin{syntax}\tt % prepverz formula.sty % \end{syntax} % creates \texttt{abverz.tex} with all predefined \Formula definitions. % Use your own files containing \Formula definitions to get all your % own defined commands. Then you can type % \begin{syntax}\tt % latex abverz.tex % \end{syntax} % twice (to get the longtable formatted correctly) and you will get % a fairly formated output of the definitions. % % \subsection{Einfache Differenzenquotienten} % % Es kann auch einmal der Fall eintreten, da\ss{} der Nutzer f\"ur eine Ableitung % keinen extra Befehl definieren will. Es gibt deshalb f\"ur partielle % Ableitungen (wenn auch totale gew\"unscht werden, kann das schnell analog % definiert werden) eine kleine Unterst\"utzung. % \DeleteShortVerb{\|} % \setbox0=\hbox{2. Ordnung nach einer Variablen ohne Klammern} % \dimen0=\wd0 % \begin{center} % \begin{tabular}{|l|c|p{\dimen0}|}\hline % Eingabe & Resultat & Beschreibung \\ \hline % \HOCH\Mac{odif}\Parmz{y}{x} & \odif{y}{x} & 1. Ordnung ohne Klammern \\ % \HOCH\Mac{pdif}\Parmz{y}{x} & \pdif{y}{x} & 1. Ordnung mit Klammern \\ % \HOCH\Mac{osdif}\Parmz{y}{x} & \osdif{y}{x} & \box0\\ % \HOCH\Mac{oodif}\Parmd{z}{y}{x} & \oodif{z}{y}{x} & 2. Ordnung nach zwei Variablen ohne Klammern\\ % \HOCH\Mac{ppdif}\Parmd{z}{y}{x} & \ppdif{z}{y}{x} & 2. Ordnung nach zwei Variablen mit Klammern\\ % \HOCH\Mac{ooodif}\Parmv{u}{z}{y}{x} & \ooodif{u}{z}{y}{x} & 3. Ordnung ohne Klammern\\ % \HOCH\Mac{pppdif}\Parmv{u}{z}{y}{x} & \pppdif{u}{z}{y}{x} & 3. Ordnung mit Klammern\\ % \HOCH\Mac{oosdif}\Parmd{z}{y}{x} & \oosdif{z}{y}{x} & % 3. Ordnung ohne Klammern, wobei nach einer Variablen zweimal abgelitten wird \\ % \hline\end{tabular} % \end{center} % % Offensichtlich ist diese Tabelle unvollst\"andig und recht willk\"urlich % zusammengestellt. Es wurden nur diejenigen F\"alle aufgenommen, % die in der bisherigen Praxis auftraten. Analoge Definitionen k\"onnen % leicht abgeleitet werden. % % % \paragraph{\Mac{buildul}} % Mit \Mac{buildrel} k\"onnen im Mathematiksatz neue mathematische % Relationen durch \"Ubereinandersetzen von verschiedenen Symbolen % erzeugt werden. % \begin{syntax} % \Mac{buildrel} \Parm{oben} \Mac{over} \Parm{unten} % \end{syntax} % Dabei wird \Parm{oben} verkleinert \"uber \Parm{unten} gesetzt. % Ein Pendant zu \Mac{buildrel} wird durch \Formula bereitgestellt. % Mit dem Befehl \Mac{buildrul} wird das zweite Argument verkleinert % unter das erste gesetzt: % \begin{syntax} % \texttt{\$}\Mac{buildrul}\Mac{longrightarrow}\Mac{over}% % \texttt{\{\parm{i}\Mac{to}\Mac{infty}\}}\texttt{\$} \qquad % $\buildrul\longrightarrow\over{i\to\infty}$ % \end{syntax} % % % \section{Language support} % % Originally \Formula was designed for internal use and % the documentation is mostly in German. This will change in the % future but may take a little time. For users who didn't understand % German all comments in the code section are written in English and % hopefully they are understandable and useful. % % To give easy support for translations the macro \Mac{eorg} was % included. It is intended to define \Mac{formuladef} and friends % macros with German and English description (the \Mac{*doc} part of % the created macro. For example you can use % \begin{syntax} % \Mac{formuladef} Du \Parm{D} \ttBo\Mac{eorg}\Parm{foolery}\Parm{Dummheit}\ttBc\ \ttBo\Mac{eorg}\Parm{the}\Parm{die}\ttBc % \end{syntax} % % \StopEventually{ % \vfill % Questions, comments or additions to: % % \hbox to \hsize{ % \parbox[t]{0.39\hsize}{ % Andreas Tille \\ % Gartenstra\ss{}e 8 \\ % D-38855 Wernigerode} % \hss % \parbox[t]{0.59\hsize}{ % Martin-Luther-Universit\"at Halle/Wittenberg \\ % Fachbereich Physik \\ % Experimentalphysik II \\ % Friedemann-Bach-Platz 6 \\ % D-06108 Halle\,/\,Saale \\[3pt] % Telefon: (+49 345) 55\,25550 \\ % Fax: (+49 345) 55\,27\,158}} % \par\medskip % E-Mail: \texttt{tille@physik.uni-halle.de} \\ % WWW: \texttt{http://www.physik.uni-halle.de/~e2od5} % % \clearpage % \endinput % } % % \advance\hsize by -10mm% to get more space for marginpars % \section{The Code} % % Here we are for the folks who do not understand German. % % \iffalse %<*formula> % \fi % \newcommand{\EngTrans}[2]{\typeout{#1 -> #2}{#2}\xspace} % \newcommand{\CIRC}{\textsf CIRC} % % \subsection{Code of the \atname-Style} % \subsubsection{The beginning and the included styles} % % First we check if the style was loaded before. % \begin{macrocode} \csname @ifundefined\endcsname{formuladef}{}{\endinput} % \end{macrocode} % Then we make sure, that \LaTeX2e{} is used % \begin{macrocode} \NeedsTeXFormat{LaTeX2e}[1997/12/01] % \end{macrocode} % and declare the package name. % \begin{macrocode} \ProvidesPackage{formula} % \end{macrocode} % Some necessary packages used in \atname\texttt{.sty} were loaded. % \begin{macrocode} \RequirePackage{amsfonts} \RequirePackage{amstext} \RequirePackage{textcomp}[1998/03/05 v1.9n] \RequirePackage{xspace} % \end{macrocode} % % \subsubsection{The \Mac{formuladef}-family} % \begin{macro}{\formuladef} % The macro \Mac{formuladef} is used to define macros which ensure that % the contained text is the same in math mode and normal text. The % parameters which have to be separated by blanks have the following meaning: % % \#1 - macro name \\ % \#2 - contents to be printed \\ % \#3 - description for a list of abbreviations \\ % \#4 - \{\} or an article which is useful in German to put in front of \#3 % \begin{macrocode} \def\formuladef#1 #2 #3 #4{% \globaldefs=1% \expandafter\newcommand\expandafter{\csname#1\endcsname} {\relax\ensuremath{#2}\xspace}% % \end{macrocode} % First we define the macro \Mac{\#1}. This definition makes sure that % the contents of the macro is printed in math mode regardless of % whether we are in math or normal mode. To use roman fonts (instead of % the italic math fonts) you have to use % \Mac{mathrm}, \Mac{mbox} or preferably \Mac{text} from the % \texttt{amstext}-style inside the second parameter (\#2). Please % note, that in the end is the \Mac{xspace} command to make sure % that some space follows after the macro \Mac{\#1} if this makes % sense. We set \Mac{globaldefs=1} to ensure that definitions given by % \Mac{formuladef} are known global. % \begin{macrocode} \expandafter\newcommand\expandafter{\csname#1doc\endcsname} {\csname#1\endcsname & #3\\}% % \end{macrocode} % Then we define the macro \Mac{\#1doc} which is useful in a list of % abbreviations (two column table each row containig a single % \Mac{\#1doc}-command). % \begin{macrocode} \expandafter\newcommand\expandafter{\csname#1art\endcsname} {#4\xspace}% der Artikel \expandafter\newcommand\expandafter{\csname#1txt\endcsname} {#3\xspace}% der beschreibende Text % \end{macrocode} % These two macros could be useful to build the description of a formula % or things like that inside the text. % \begin{macrocode} \expandafter\newcommand\expandafter{\csname#1my\endcsname} {{\tt\char92#1} & \csname#1doc\endcsname} \globaldefs=0}% % \end{macrocode} % The last Macro \Mac{\#1my} which is defined by \Mac{formuladef} can be % used for a private overview of the author which macros are defined % ad how to call them. It is used in a three column table each row % containing a single \Mac{\#1my}-command. % \end{macro} % \begin{macro}{\formulaarg} % The macro \Mac{formuladef} does the same as \Mac{formuladef}, however, % you can add an argument behind the defined macro which will be % concatenated with the text to be printed. All parameters have the % same meaning as in \Mac{formuladef}. The additional fifth parameter % is used as default value when printed in the list of abbreviations. % Resetting globaldefs is importand to make other styles work properly. % \begin{macrocode} \def\formulaarg#1 #2 #3 #4 #5{% \globaldefs=1% \expandafter\newcommand\expandafter{\csname#1\endcsname}[1]% {\relax\ensuremath{#2{##1}}\xspace}% \expandafter\newcommand\expandafter{\csname#1doc\endcsname}% {\csname#1\endcsname{#5} & #3\\}% \expandafter\newcommand\expandafter{\csname#1art\endcsname}% {#4}% der Artikel \expandafter\newcommand\expandafter{\csname#1txt\endcsname}% {#3}% der beschreibende Text \expandafter\newcommand\expandafter{\csname#1my\endcsname}% {{\tt\char92#1\{}{\em #5}{\tt \}} & \csname#1doc\endcsname} \globaldefs=0}% % \end{macrocode} % \end{macro} % \begin{macro}{\formulamit} % Like \Mac{formulaarg} but the argument is printed in between the text % to be printed instead of the end. So we need a first part of the % macro-text then comes the argument and the second part of the text in % the end. The % parameters (which may separated by blanks) have the following meaning: % % \#1 - macro name \\ % \#2 - first part of the contents to be printed \\ % \#3 - end of the contents to be printed (after the Argument) \\ % \#4 - description for a list of abbreviations \\ % \#5 - \{\} or an article which is useful in German to put in front of \#4 % \#6 - default argument which is used in the list of abbreviations % \begin{macrocode} \def\formulamit#1 #2 #3 #4 #5 #6{% \globaldefs=1% \expandafter\newcommand\expandafter{\csname#1\endcsname}[1]% {\relax\ensuremath{#2{##1}#3}\xspace}% \expandafter\newcommand\expandafter{\csname#1doc\endcsname} {\csname#1\endcsname{#6} & #4\\}% \expandafter\newcommand\expandafter{\csname#1art\endcsname} {#5}% der Artikel \expandafter\newcommand\expandafter{\csname#1txt\endcsname} {#4}% der beschreibende Text \expandafter\newcommand\expandafter{\csname#1my\endcsname}% {{\tt\char92#1\{}{\em #6}{\tt \}} & \csname#1doc\endcsname} \globaldefs=0}% % \end{macrocode} % \end{macro} % \begin{macro}{\formuladiff} % To be helpful in typing differentials the macro \Mac{formuladiff} is defined. % It needs one argument to declare the order of the differential. The % parameters of \Mac{formuladiff} have the following meanings: % % \#1 - macro name \\ % \#2 - type of the differential (d or $\partial$) \\ % \#3 - denominator \\ % \#4 - numerator \\ % \#5 - description for a list of abbreviations \\ % \#6 - \{\} or an article which is useful in German to put in front of \#5 % \begin{macrocode} \def\formuladiff#1 #2 #3 #4 #5 #6{% \globaldefs=1% \expandafter\newcommand\expandafter{\csname#1\endcsname}[1]% {\relax\ensuremath{\frac{#2^{##1}#3}{#2#4^{##1}}}\xspace}% \expandafter\newcommand\expandafter{\csname#1doc\endcsname}% {\csname#1\endcsname{n} & #5\\}% \expandafter\newcommand\expandafter{\csname#1art\endcsname}% {#6}% der Artikel \expandafter\newcommand\expandafter{\csname#1txt\endcsname}% {#5}% der beschreibende Text \expandafter\newcommand\expandafter{\csname#1my\endcsname}% {{\tt\char92#1\{}{\em n}{\tt \}} & \csname#1doc\endcsname} \globaldefs=0}% % \end{macrocode} % \end{macro} % % \begin{macro}{\eorg} % To support easy translations of texts the describing parts can be % defined with an English and a German part. % % \#1 - English description % \#2 - German description % \begin{macrocode} \newcommand{\eorg}[2]{% \expandafter\ifx\csname l@german\endcsname\relax #1% \else \ifnum\csname l@german\endcsname=\language #2% \else #1\fi\fi} % \end{macrocode} % \end{macro} % % We define some symbols which are often used in our group. If % you do not want this symbols call \atname in this way: % \begin{syntax}\texttt{ % \Mac{usepackage}[nopredefinition]\{formula\} % }\end{syntax} % This option makes sense if you want to save time while loading % \atname-style or you want to use the same names of some macros % with a different meaning. % \begin{macrocode} \newif\ifpredefinition \predefinitiontrue \newcommand{\NoPreDefinition}{\predefinitionfalse} \DeclareOption{nopredefinition}{\NoPreDefinition} \ProcessOptions \ifpredefinition % \end{macrocode} % Here come a lot of predefined macros in \atname-style (sorry, all the % descriptions are in German, but all this stuff was developed for % {\bf internal} use in a German institute.) % \begin{macrocode} \formuladef MA {\text{\bf A}} {\eorg{m}{M}atrix A} {\eorg{the}{die}} \formuladef Cmess {\text{C}_m} {\eorg{linear capacitor for measurement} {linearer Me\ss{}kondensator}} {} \formuladef Cnl {C_{nl}} {\eorg{nonlinear capacity of the sample} {nichtlineare Kapazit\"at der Probe}} {\eorg{the}{die}} \formulaarg Cr {\mathbb{C}^} {\eorg{set of r times continuous differentiable functions} {Menge der r-mal stetig differenzierbaren Funktionen}} {} {r} \formuladef dPR {d} {\eorg{d}{D}imension \eorg{of phase space}{des Phasenraums}} {die} \formuladef DV {D} {dielektrische Verschiebung} {die} \formuladef Det {\text{det}} {Determinante einer Matrix} {die} \formuladef Dx {\text{\bf D}_x} {Jakobimatrix} {die} \formuladef EF {E} {elektrische Feldst\"arke} {die} \formuladef EC {E_C} {Koerzitivfeldst\"arke} {die} \formuladef ECnl {E_{\Cnl}} {elektrische Feldst\"arke \"uber der Probe} {die} \formuladef dynSys {\vec{f}(\vec{x},\vp)} {beliebiges dynamisches System} {ein} \formulamit Effi {f_} {(\cdot,\cdot)} {} {} {i} \formuladef falles {\Effi{1}, \Effi{2}, \cdots} {Komponenten des beliebigen dynamischen Systems} {} \formuladef F {\text{F}} {Probenfl\"ache} {die} \formuladef Fouri {\mathcal{F}} {Fouriertransformation} {die} \formuladef Fourin {\text{F}_{i,n}} {$n$-te Fourierkomponente von \Effi{i}} {die} \formuladef FOp {\Fouri_{n}} {Operator f\"ur die $n$-te Fourierkomponente} {der} \formuladef FB {\text{f}} {Brennweite} {die} \formuladef freq {f} {Frequenz} {die} \formuladef vf {\vec{f}} {Vektorfeld} {ein} \formuladef fa {\freq_a} {Abtastfrequenz} {die} \formuladef fgrund {\freq_{ext}} {Anregungsfrequenz der Schwingung} {die} \formuladef fstrob {\freq_s} {Blitzfrequenz des Stroboskops} {die} \formuladef fvirt {\freq_v} {virtuelle Frequenz} {die} \formuladef vfO {\vf(\vO)} {Vektorfeld f im Ursprung} {} \formuladef FE {G} {freie Enthalpie} {die} \formuladef FEO {\FE_0} {temperaturunabh\"angiger Anteil der freien Energie} {} \formuladef h {\text{h}} {Probendicke} {die} \formuladef Hrel {H_r} {relative Helligkeit eines Videobildes} {die} \formuladef IH {I} {elektrische Stromst\"arke} {die} \formuladef Itot {\IH_{tot}} {Gesamtstromst\"arke} {die} \formuladef ICnl {\IH_{\Cnl}} {Strom durch die nichtlineare Kapazit\"at} {der} \formuladef IRp {\IH_{\Rp}} {Strom durch den Parallelverlustwiderstand \Rp} {der} \formuladef je {j} {Stromdichte} {die} \formuladef Lx {\text{L}} {Induktivit\"at der linearen Spule} {die} % \end{macrocode} % {\tiny (I would like to name the inductance of a coil "`L"' but it conflicts % with the coil in \CIRC. Furthermore \Mac{L} is used inside \TeX.} % \begin{macrocode} \formuladef vO {\vec{o}} {Nullvektor} {der} \formuladef Par {p} {} {} \formuladef vp {\vec{\Par}} {Modellparameter} {die} \formulaarg Para {\Par_} {} {} {i} \formuladef Parai {\Para{1}, \Para{2}, \cdots} {Komponenten der Modellparameter} {die} \formuladef Pol {P} {Polarisation} {die} \formuladef Poinc {\mathfrak{P}} {Poincar\'e-Ebene} {die} \formuladef Pols {\Pol_s} {spontane Polarisation} {die} \formuladef Lad {Q} {elektrische Ladung} {die} \formuladef Rz {\mathbb{R}} {reeller Raum} {} \formuladef Rx {\text{R}} {Widerstand} {} % \end{macrocode} % {\tiny (I would like to name the resistor "`R"' but it conflicts % with the resistor in \CIRC.)} % \begin{macrocode} \formuladef RCnl {\Rx_{\Cnl}} {linearer Widerstand in der Ersatzschaltung der Probe} {} \formuladef RL {\Rx_{\Lx}} {Verlustwiderstand der Spule} {der} \formuladef Rlin {\Rx_{lin}} {linearer Verlustwiderstand; \Rlin = \RL + \Rmess} {} \formuladef Rmess {\Rx_m} {linearer Me\ss{}widerstand} {} \formulaarg Rn {\Rz^} {n-dimensionaler reeller Raum} {} {n} \formuladef Rp {\Rx_p} {Parallelverlustwiderstand der nichtlinearen Kapazit\"at} {der} \formuladef Rs {\Rx_s} {Serienverlustwiderstand der nichtlinearen Kapazit\"at} {der} \formuladef Spur {\text{Spur}} {Spur einer Matrix} {die} \formuladef tx {t} {Zeit} {die} \formuladef T {T} {Periodendauer} {die} \formuladef Te {\text{T}} {Temperatur} {die} \formuladef ta {\tx_a} {Abtastzeit} {die} \formuladef te {\tx_e} {Delay-Zeit} {die} \formuladef Tgrund {\T_0} {Periodendauer der Anregung} {die} \formuladef TC {\Te_C} {absolute Curie-Temperatur} {die} \formuladef TCrit {\Te_{crit}} {kritische absolute Temperatur} {die} \formuladef Ux {U} {Spannung} {die} % \end{macrocode} % {\tiny (I would like to name the voltage "`U"' but it conflicts % with the voltage in \CIRC.)} % \begin{macrocode} \formuladef Umg {\mathbb{U}} {Umgebung} {} \formuladef Ueff {\Ux_{ef\kern-1pt{f}}} {Effektivwert der Anregungsspannung} {der} \formuladef Uext {\Ux_{ext}} {externe Spannung} {die} \formuladef UCnl {\Ux_{\Cnl}} {Spannung \"uber \Cnl} {die} \formuladef URL {\Ux_{\RL}} {Spannung \"uber \RL} {die} \formuladef URs {\Ux_{\Rs}} {Spannung \"uber \Rs} {die} \formuladef Vnl {V_{nl}} {nichtlineares Potential} {} \formuladef x {x} {beliebige skalare physikalische Gr\"o\ss{}e} {} \formuladef dxdt {\dot x} {Ableitung von x nach der Zeit} {} \formuladef vx {\vec{x}} {beliebige vektorielle physikalische Gr\"o\ss{}e} {} \formuladef vX {\vec{X}} {Fouriertransformierte der vektoriellen Gr\"o\ss{}e \vx} {} \formuladef xO {x_0} {} {} \formuladef vxO {\vec{\xO}} {} {} \formulaarg PotK {\alpha_} {} {} {i} \formuladef PotKo {\PotK{2}, \PotK{4}} {Koeffizienten des nichtlinearen Potentials \Vnl} {die} \formulaarg LanK {\tilde{\alpha}_} {} {} {i} \formuladef LanKo {\LanK{1}, \LanK{2}, \cdots} {Entwicklungskoeffizienten der Landau-Entwicklung} {die} \formuladef Feige {\delta} {Feigenbaum-Konstante} {die} \formuladef Abli {\partial_i} {Ableitungsoperator nach der $i$-ten Koordinate} {der} \formuladef eps {\varepsilon} {Dielektrizit\"atskonstante} {die} \formuladef epsO {\eps_0} {Influenzkonstante $\epsO = 8.84\cdot 10^{-12}\AsVm$} {die} \formuladef epsr {\eps_r} {relative Dielektrizit\"atskonstante} {die} \formuladef OP {\eta} {Ordnungsparameter} {der} \formuladef Ev {\eta} {mit Index: Komponente des Eigenvektors} {der} \formuladef vEv {\vec{\Ev}} {Eigenvektor} {der} \formuladef GOP {\OP^{*}} {Gleichgewichtswert des Ordnungsparameters} {der} \formuladef Ewl {\lambda} {Eigenwert} {der} \formuladef phistrob {\varphi_s} {Phasenwinkel des Stroboskops} {der} \formuladef TGrdC {\vartheta} {Temperatur in Celsius} {die} \formuladef ThC {\TGrdC_C} {Curie-Temperatur} {die} \formuladef ThCrit {\TGrdC_{crit}} {kritische Temperatur} {die} \formuladef oC {\omega} {Kreisfrequenz $\oC = 2\pi\freq$} {die} \formuladef oO {\oC_0} {Grundfrequenz} {die} \formuladef siehe {\rightarrow} {siehe} {} \formuladef drf {\Rightarrow} {daraus folgt} {} \fi% end of predefinition % \end{macrocode} % % \begin{macro}{\formulaunit} % Last but not least in the \Mac{formuladef}-family we define a macro % \Mac{formulaunit} which is helpful when defining macros for physical % units. The parameters have the following meaning: % % \#1 - macro name \\ % \#2 - \EngTrans{Vorsatz}{preposition} typed in roman \\ % \#3 - \EngTrans{Vorsatz}{preposition} typed in greek \\ % \#4 - the unit \\ % \#5 - the unit in words % \begin{macrocode} \def\formulaunit#1 #2 #3 #4 #5{% \globaldefs=1% \expandafter\newcommand\expandafter{\csname#1\endcsname}% {\relax\ensuremath{\text{\,#2}#3\text{#4}}\xspace}% % \end{macrocode} % Here the unit-macro \Mac{\#1} is defined. Used right behind a value % it is separated from this value by a small space (\Mac{,}). Than follows % the \EngTrans{Vorsatz}{preposition} in roman (if this parameter is not) % empty or the \EngTrans{Vorsatz}{preposition} in greek. (I do not know any % example where a roman {\bf and} a greek \EngTrans{Vorsatz}{preposition} % is used.) I strongly recommend you to use the upright versions of % greek letters in \texttt{textcomp.sty} like in the examples below. % Behind the \EngTrans{Vorsatz}{preposition} follows the unit and as in all % the macros of the \Mac{formuladef}-family a \Mac{xspace}. % % The following three macros do the same job like in the other definitions. % \begin{macrocode} \expandafter\newcommand\expandafter{\csname#1doc\endcsname} {{\em x}\csname#1\endcsname & #5\\}% \expandafter\newcommand\expandafter{\csname#1txt\endcsname} {#5}% description of units in words \expandafter\newcommand\expandafter{\csname#1my\endcsname}% {{\em x\tt\char92#1} & \csname#1doc\endcsname} \globaldefs=0}% % \end{macrocode} % \end{macro} % Now we come to some often used units which are predefined in % the \atname-style (sorry once more for the German descriptions) % \begin{macrocode} \ifpredefinition \formulaunit mn {} {} min {\eorg{minute}{Minute}} \formulaunit sek {} {} s {\eorg{second}{Sekunde}} \formulaunit msek {m} {} s {Millisekunde} \formulaunit musek {} {\text{\textmu}} s {Mikrosekunde} \formulaunit m {} {} m {Meter} \formulaunit cm {c} {} m {Zentimeter} \formulaunit mm {m} {} m {Millimeter} \formulaunit mum {} {\text{\textmu}} m {Mikrometer} \formulaunit nm {n} {} m {Nanometer} \formulaunit li {} {} l {Liter} \formulaunit ml {m} {} l {Milliliter} \formulaunit g {} {} g {Gramm} \formulaunit kg {k} {} g {Kilogramm} \formulaunit Hz {} {} Hz {Hertz} \formulaunit kHz {k} {} Hz {Kilohertz} \formulaunit MHz {M} {} Hz {Megahertz} \formulaunit MV {M} {} V {Megavolt} \formulaunit kV {k} {} V {Kilovolt} \formulaunit Vo {} {} V {Volt} \formulaunit mV {m} {} V {Millivolt} \formulaunit Ohm {} {\text{\textohm}} {} {Ohm} \formulaunit kOhm {k} {\text{\textohm}} {} {Kiloohm} \formulaunit MOhm {M} {\text{\textohm}} {} {Megaohm} \formulaunit muF {} {\text{\textmu}} F {Mikrofarad} \formulaunit nF {n} {} F {Nanofarad} \formulaunit pF {p} {} F {Picofarad} \formulaunit He {} {} H {Henry} \formulaunit mH {m} {} H {Millihenry} \formulaunit K {} {} K {Kelvin} \formulaunit grd {} {\text{\textdegree}} {} {Grad} \formulaunit grdC {} {\text{\textcelsius}} {} {Grad Celsius} \formulaunit J {} {} {J} {Joule} \formulaunit muJ {} {\text{\textmu}} {J} {Mikrojoule} \formulaunit mW {m} {} {W} {Milliwatt} \formulaunit W {} {} {W} {Watt} \formulaunit Bit {} {} Bit {Bit} \formulaunit Byte {} {} HByte {Byte} \formulaunit kByte {k} {} Byte {Kilobyte} \formulaunit MByte {M} {} Byte {Megabyte} \formulaunit Bilderprosek {} {} {\eorg{images}{Bilder}/s} {\eorg{Bilder pro Sekunde}{images per second}} \formulaunit Bilder {} {} {\eorg{images}{Bilder}} {\eorg{images}{Bilder}} \formulaunit dpi {} {} {dpi} {\eorg{dots per inch}{Punkte pro Zoll}} \formulaunit Prozent {} {} {\%} {\eorg{per cent}{Prozent}} \formulaunit Upromin {} {} {U/min} {Umdrehungen pro Minute} \formulaunit AsVm {} {} {\ensuremath{\frac{\text{As}}{\text{Vm}}}} {Amperesekunden pro Voltmeter} \formulaunit DM {} {} {DM} {DM} \formulaunit TDM {T} {} {DM} {tausend DM} \fi% end predefinition % \end{macrocode} % % \subsubsection{Some useful abbreviations} % % Now we define some macros to abbreviate some partial derivations. % They are not complete. Only those which were used in my very own % texts were included. Add your own ones if you like. % % 1.~order without brackets % \begin{macrocode} \newcommand{\Odif}[2]{\frac{\partial #1}{\partial #2}} \newcommand{\odif}[2]{\relax\ensuremath{\Odif{#1}{#2}}} % \end{macrocode} % 1.~order with brackets % \begin{macrocode} \newcommand{\Pdif}[2]{\left( \odif{#1}{#2} \right)} \newcommand{\pdif}[2]{\relax\ensuremath{\Pdif{#1}{#2}}} % \end{macrocode} % 2.~order without brackets \EngTrans{Ableitung nach}{after} a single variable % \begin{macrocode} \newcommand{\OSdif}[2]{\frac{\partial^2 #1}{\partial #2^2}} \newcommand{\osdif}[2]{\relax\ensuremath{\OSdif{#1}{#2}}} % \end{macrocode} % 2.~order without brackets % \begin{macrocode} \newcommand{\OOdif}[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}} \newcommand{\oodif}[3]{\relax\ensuremath{\OOdif{#1}{#2}{#3}}} % \end{macrocode} % 2.~order with brackets % \begin{macrocode} \newcommand{\PPdif}[3]{\left( \oodif{#1}{#2}{#3} \right)} \newcommand{\ppdif}[3]{\relax\ensuremath{\PPdif{#1}{#2}{#3}}} % \end{macrocode} % 3.~order without brackets % \begin{macrocode} \newcommand{\OOOdif}[4]{\frac{\partial^3 #1}{\partial #2 \partial #3 \partial #4}} \newcommand{\ooodif}[4]{\relax\ensuremath{\OOOdif{#1}{#2}{#3}{#4}}} % \end{macrocode} % 3.~order with brackets % \begin{macrocode} \newcommand{\PPPdif}[4]{\left( \ooodif{#1}{#2}{#3}{#4} \right)} \newcommand{\pppdif}[4]{\relax\ensuremath{\PPPdif{#1}{#2}{#3}{#4}}} % \end{macrocode} % 3.~order without brackets in which the function is derived two times % \EngTrans{nach}{after} one variable % \begin{macrocode} \newcommand{\OOSdif}[3]{\frac{\partial^3 #1}{\partial #2^2\partial #3}} \newcommand{\oosdif}[3]{\relax\ensuremath{\OOSdif{#1}{#2}{#3}}} % \end{macrocode} % Some further useful abbreviations. % \begin{macrocode} \newcommand{\beq}{\begin{equation}} \newcommand{\eeq}{\end{equation}} \newcommand{\bea}{\begin{eqnarray}} \newcommand{\eea}{\end{eqnarray}} % \end{macrocode} % \iffalse % Hmmm, wie macht man das mit einem '*' sauber ???? % \catcode\blablabla --- da mu\ss{} ich mich nochmal Schlau machen (at) % \chardef\@ccst\the\catcode`\* % \catcode`\*=11 % \newcommand{\be*}{\begin{eqnarray*}} % \newcommand{\ee*}{\end{eqnarray*}} % \catcode`\*=\@ccst % %% \catcode`\*=12 % \fi % \begin{macrocode} \def\be*{\begin{eqnarray*}} \def\ee*{\end{eqnarray*}} % \end{macrocode} % \begin{macro}{\buildrul} % To define mathematical symbols as \Mac{buildrel} we define % \Mac{buildrul} which puts its second argument in small font % under the first argument. % \begin{macrocode} \def\buildrul#1\over #2{\mathrel {\mathop {#1}\limits_{#2}}} % \end{macrocode} % \end{macro} % \Finale % %<*prepverz> @echo off set name=zw$$$ echo \documentclass{article} > %name% echo %%%%%% uncomment this if you want descriptions in German language >> %name% echo %% \usepackage{german} >> %name% echo \usepackage[T1]{fontenc} >> %name% echo \usepackage{formula,longtable,vmargin} >> %name% echo \setpapersize{A4} >> %name% echo \setmargins{20mm}{9mm}{180mm}{240mm}{12pt}{11mm}{0pt}{11mm} >> %name% echo \input %1 >> %name% echo \setlongtables >> %name% echo \begin{document} >> %name% echo \begin{longtable}{llp{10cm}} >> %name% grep "^ *\\formula" %1 >> %name% echo \end{longtable} >> %name% echo \end{document} >> %name% type %name% | sed -e "/^\\formula[^ ]* *{*\([A-Za-z]*\)}* .*/s//\\\1my/" > zw$$$$ sed -e "/^File /d" zw$$$$ > abverz.tex del %name% del zw$$$$ rem mit GnuGrep kann "grep -h" aufgerufen werden - kein Filename - zweiter rem sed-Aufruf entf"allt rem eleganter w"are (ohne Zwischendatei zz$$$): rem grep -h "^ *\\formula" %1 | sed -e "/^\\formula[^ ]* *{*\([A-Za-z]*\)}* .*/s//\\\1my/" rem irgendwie m"ochte DOS die Pipe nicht so richtig und es funktionukelt rem so nur im OS/2 % %<*prepverzsh> #!/bin/sh name=abverz.tex echo \\documentclass{article} > $name echo %%% uncomment this if you want descriptions in German language >> $name echo % \\usepackage{german} >> $name echo \\usepackage[T1]{fontenc} >> $name echo "\\usepackage{formula,longtable,vmargin}" >> $name echo \\setpapersize{A4} >> $name echo \\setmargins{20mm}{9mm}{180mm}{240mm}{12pt}{11mm}{0pt}{11mm} >> $name echo \\input $1 >> $name echo \\setlongtables >> $name echo \\begin{document} >> $name echo \\begin{longtable}{llp{10cm}} >> $name grep -h "^ *\\\\formula" $1 | sed -e "/^\\\\formula[^ ]* *{*\([A-Za-z]*\)}* .*/s//\\\\\\1my/" >> $name echo \\end{longtable} >> $name echo \\end{document} >> $name % %<*exampl> \bigskip\bigskip\noindent Und hier noch einmal alle definierten Gr\"o\ss{}en auf einen Blick: \medskip \begin{tabular}{@{}ll} \IQdoc \Kldoc \Dudoc \Klidoc \Duidoc \KlTdoc \KlNdoc \DuTdoc \DuNdoc \Kltdoc \end{tabular} \end{document} %