diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /macros/latex/contrib/robustcommand |
Initial commit
Diffstat (limited to 'macros/latex/contrib/robustcommand')
-rw-r--r-- | macros/latex/contrib/robustcommand/README | 98 | ||||
-rw-r--r-- | macros/latex/contrib/robustcommand/robustcommand.dtx | 137 | ||||
-rw-r--r-- | macros/latex/contrib/robustcommand/robustcommand.ins | 60 | ||||
-rw-r--r-- | macros/latex/contrib/robustcommand/robustcommand.pdf | bin | 0 -> 72818 bytes |
4 files changed, 295 insertions, 0 deletions
diff --git a/macros/latex/contrib/robustcommand/README b/macros/latex/contrib/robustcommand/README new file mode 100644 index 0000000000..097fda7654 --- /dev/null +++ b/macros/latex/contrib/robustcommand/README @@ -0,0 +1,98 @@ +[en] +LaTeX-package 'robustcommand' - a variation of \DeclareRobustCommand, +which checks that the command is not yet definded. + +Author: Paul Ebermann <Paul-Ebermann@gmx.de> +License: LPPL 1.3b or later, author-maintained + (see http://www.latex-project.org/lppl/). + +All Documentation (other than this file) is in german. + +The typesetting of the documentation needs 'pauldoc' (from the +same author). + +The package comes as .dtx + .ins. +Run "latex robustcommand.ins" to create the style file (and maybe put +it to texmf/tex/latex/paul/, if your docstrip is configured +accordingly), run (after that and maybe updating your TeX hash) +"latex robustcommand.dtx" to create the documentation. + + Usage +------- +Use the package in your own package or class files. + + \RequirePackage{robustcommand} + +and later you can use + + \robust@new@command + +like \DeclareRobustCommand from the LaTeX kernel. +This command works like \DeclareRobustCommand*, but +it gives an error message, if the defined command +is already defined. + +---------------- +[de] +LaTeX-Paket 'robustcommand' - eine Variante von +\DeclareRobustCommand, welche vorher überprüft, +ob der Befehl schon existiert. + +Autor: Paul Ebermann (Paul-Ebermann@gmx.de). +Lizenz: LPPL 1.3b oder später, mit Maintenance-Status + "author-maintained". Siehe http://www.latex-project.org/lppl/. + +Geschrieben für den eigenen Gebrauch +(-> http://www.math.hu-berlin.de/~ebermann/alg-script/), +aber vielleicht ist es auch für andere von Nutzen. + +Zum Setzen der Dokumentation wird das Paket 'pauldoc' +(vom selben Autor) benötigt. + +Das Paket kommt als .dtx + .ins. +Mit "latex robustcommand.ins" wird die .sty-Datei erstellt (und +eventuell gleich nach texmf/tex/latex/paul/ installiert, +wenn docstrip entsprechend eingerichtet ist), mit +latex robustcommand.dtx kann (danach und eventuell nach einer +Aktualisierung der TeX-Dateidatenbank) die Dokumentation neu +erstellt werden. + +Zur Verwendung siehe robustcommand.pdf. +---------------- +[eo-h] +LaTeX-pakajho 'robustcommand' - Variajho de \DeclareRobustCommand, +kiu antaue elprovas, chu la nomo jam ekzistas. + +Autoro: Paulo Ebermann (Paul-Ebermann@gmx.de). +Licenzo: LPPL 1.3, 'author-maintained' + (-> http://www.latex-project.org/lppl/). + +Kreitaj por propra uzo, sed eble iom de ghi ankau +uzeblas por aliaj. + +La dokumentaro (escepte tiu chi dosiero) estas nur en la germana +lingvo. + +Por krei la dokumentadon vi bezonas 'pauldoc' (de la sama autoro). + +La pakajho venas en .dtx + .ins. +Voku "latex robustcommand.ins" por krei la .sty-dosieron (kaj +eble meti ghin al texmf/tex/latex/paul/, se via docstrip estis +konfigurita laue), voku "latex robustcommand.dtx" por rekrei +la dokumentaron. + + Uzado +------- + +Uzu la pakajhon en propraj pakajhoj (au klasoj): + + \RequirePackage{robustcommand} + +Poste vi povas uzi + + \robust@new@command + +anstatau \DeclareRobustCommand* from the LaTeX kernel. +La komando laboras kiel \DeclareRobustCommand*, sed +ghi donas erarmesaghon, se la difinenda komando jam +antaue estas difinita. diff --git a/macros/latex/contrib/robustcommand/robustcommand.dtx b/macros/latex/contrib/robustcommand/robustcommand.dtx new file mode 100644 index 0000000000..07bb39168b --- /dev/null +++ b/macros/latex/contrib/robustcommand/robustcommand.dtx @@ -0,0 +1,137 @@ +% \iffalse meta-comment +% +%% (C) 2006 Paul Ebermann +%% +%% Package robustcommand - robuste Kommandos, die nicht +%% automatisch überschreiben. +%% +%% Die Datei robustcommand.dtx sowie die dazugehörige +%% robustcommand.ins sowie die damit generierte +%% robustcommand.sty stehen unter der +%% "LaTeX Project Public License" (LPPL, zu finden +%% unter http://www.latex-project.org/lppl/, sowie +%% auch in den meisten TeX-Distributionen in +%% texmf/docs/latex/base/lppl*.txt), Version 1.3b oder +%% später (nach Wahl des Verwenders). +%% +%% Der 'maintenance-status' ist (zur Zeit) 'author-maintained'. +%% +%% Das heißt u.a., die Dateien dürfen frei vertrieben werden, +%% bei Änderungen (durch andere Personen als Paul Ebermann) +%% ist aber der Name der Datei zu ändern. +% +% \fi +% +% \iffalse +%<package>\NeedsTeXFormat{LaTeX2e}[2003/12/01] +%<package>\ProvidesPackage{robustcommand} +%<package> [2006/03/23 v0.1 Robuste Kommandos (PE)] +% +%<*driver> +\documentclass[draft,ngerman]{ltxdoc} +\usepackage{robustcommand} +\usepackage{pauldoc} +\begin{document} + \DocInput{robustcommand.dtx} +\end{document} +%</driver> +% \fi +% +% \CheckSum{5} +% +% \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 \~} +% +% \changes{v0.0}{2006/03/22}{Erste Fassung} +% +% \GetFileInfo{robustcommand.sty} +% +% +% \title{Das \pack{robustcommand}-Package -- Erweiterungen von \cs{DeclareRobustCommand}\thanks{% +% Dieses Dokument gehört zu \pack{robustcommand}~\fileversion, +% vom~\filedate.}} +% \author{Paul Ebermann\thanks{\texttt{Paul-Ebermann@gmx.de}}} +% +% \maketitle +% +% \tableofcontents +% +% \section{Benutzerdoku} +% Im \LaTeX-Kernel gibt es den Befehl '\DeclareRobustCommand', welcher +% ein robustes Kommando definiert. Leider beachtet dies -- im Gegensatz +% zu '\newcommand' -- nicht, ob ein entsprechendes Makro schon vorhanden +% ist, und überschreibt es einfach, so dass man versehentlich Makros +% überschreiben kann. +% +% \DescribeMacro{\robust@new@command} +% Dieses Package schließt diese Lücke mit dem Kommando +% +% '\robust@new@command'\marg{kommando}\oarg{param-num}\oarg{default}\marg{defn} +% +% Dies definiert \meta{kommando}, falls noch nicht vorhanden, als robustes +% Makro (mit kurzen Argumenten) mit Definition \meta{defn}. Falls \meta{kommando} +% schon existiert, gibt es eine Fehlermeldung. +% +% Dies ist also wie '\newcommand*' oder '\DeclareRobustCommand*' zu verwenden, +% eine \emph{Nicht-Stern-Variante} gibt es nicht. +% +% Der Makro-Name enthält '@'-Zeichen, so dass er nur in Package-Dateien verwendet +% werden kann. Normalerweise ist er auch sonst nicht notwendig. +% +% \StopEventually{\PrintChanges\PrintIndex} +% +% \section{Implementation} +% +% \begin{macrocode} +%<*package> +% \end{macrocode} +% +% \begin{macro}{\robust@new@command} \noindent\marg{kommando}\oarg{default}\oarg{params}\marg{defn} +% +% \begin{macrocode} +\newcommand*{\robust@new@command}[1] +{% +% \end{macrocode} +% Die Überprüfung und Fehlermeldung realisieren wir, indem wir \meta{kommando} +% einmal mittels '\newcommand*' definieren. Das gibt eine Fehlermeldung, falls +% \meta{kommando} schon definiert war. +% \begin{macrocode} + \newcommand*{#1}{}% +% \end{macrocode} +% Ansonsten nutzen wir jetzt einfach '\DeclareRobustCommand*', welches auch noch die +% weiteren Argumente (\meta{default}, \meta{params}, \meta{defn}) liest. +% \begin{macrocode} + \DeclareRobustCommand*{#1}% +} +% \end{macrocode} +% \end{macro} +% +% Das war schon alles. +% \begin{macrocode} +\endinput +%</package> +% \end{macrocode} +% +% \Finale +%\endinput + + +%%% Folgendes ist nur für meinen Editor. +%%% +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/macros/latex/contrib/robustcommand/robustcommand.ins b/macros/latex/contrib/robustcommand/robustcommand.ins new file mode 100644 index 0000000000..f2a374d2a1 --- /dev/null +++ b/macros/latex/contrib/robustcommand/robustcommand.ins @@ -0,0 +1,60 @@ +%% +%% (C) 2002-2006 Paul Ebermann - Installationsdatei zu robustcommand.dtx +%% +%% Der vollständige Urheberrechtshinweis befindet sich +%% am Begin von robustcommand.dtx. +%% +%% Ich gebe keine Garantie irgendeiner Art. +%% + +\input docstrip.tex +\usedir{tex/latex/paul} + +\Msg{**********************************************************} +\Msg{* Ich werde Dateien in \showdirectory{tex/latex/paul} } +\Msg{* installieren. Bitte stellen Sie sicher, } +\Msg{* dass dieses Verzeichnis vorhanden ist. } +\Msg{* } + +%% der folgende Text wird in jeder generierten +%% Datei am Anfang eingefügt. +\preamble + + ,--------------------------------------------------. + | Das ist eine generierte Datei. | + | | + | (c) 2006 Paul Ebermann. | + '--------------------------------------------------' +\endpreamble + + +\generate{\file{robustcommand.sty}{\from{robustcommand.dtx}{package}}} +%\generate{\file{robustcommand.cls}{\from{robustcommand.dtx}{class}}} + +\Msg{#######################} +\Msg{# } +\Msg{# Um die Installation zu beenden, } +\Msg{# müssen Sie die folgenden Dateien } +\Msg{# in Ihrem TeX-Suchbaum unterbringen: } +\Msg{# } +\Msg{# robustcommand.sty } +\Msg{# } +\Msg{# Um eine Dokumentation zu erzeugen, } +\Msg{# benutzen Sie } +\Msg{# } +\Msg{# latex robustcommand.dtx } +\Msg{# } +\Msg{# Viel Spaß } +\Msg{# Paul Ebermann } +\Msg{# } +\Msg{#######################} + +\endbatchfile + + +%%% Folgendes ist nur für meinen Editor. +%%% +%%% Local Variables: +%%% mode: latex +%%% TeX-master: t +%%% End: diff --git a/macros/latex/contrib/robustcommand/robustcommand.pdf b/macros/latex/contrib/robustcommand/robustcommand.pdf Binary files differnew file mode 100644 index 0000000000..d80b760f88 --- /dev/null +++ b/macros/latex/contrib/robustcommand/robustcommand.pdf |