home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 5 Edit
/
05-Edit.zip
/
lyx21041.zip
/
XFree86
/
lib
/
X11
/
lyx
/
tex
/
alfa.sty
next >
Wrap
Text File
|
1999-11-17
|
11KB
|
288 lines
%% Alphanumeric Section Numbering
%% Renamed to 'alfa.sty' to adapt as requested by LyX Team http://www.lyx.org
%% for testing with LyX.
%%
%% This file is derived from `alphanum.sty', but due to the adaption it is not
%% compatible with it anymore.
%% You are *not* allowed to modify this file without changing its name AND AUTHOR:
%% This is a test release for testing with LyXfor testing with LyX. For evaluation only:
%%
%% Are you sure what you are doing? Harmful results are to be expected!
%% It may destroy data! Your own risk! No responsability at all!
%%
%% Send bug reports and modifications to:
%% Arnd.H.Hanses@rz.ruhr-uni-bochum.de
%% so that they can be included in an eventual public release.
%% Based on original idea in jura.cls by Felix Braun.
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{alfa}[1999/09/24 v00.3betanoresonsabilityatall]
\newcommand*{\J@FootnoteSpread}{1}
\DeclareOption{tightfn}{\renewcommand*{\J@FootnoteSpread}{1}}
\DeclareOption{spacedfn}{\renewcommand*{\J@FootnoteSpread}{1.3}}
\AtEndOfClass{\setlength{\footnotesep}{\J@FootnoteSpread\footnotesep}}
\ExecuteOptions{tightfn}
\ProcessOptions\relax
%% \LoadClass{scrxxx} % use Koma script base classes, only tested base
\newcommand*{\@greek}[1]{\ifcase#1\relax\or$\alpha$\or$\beta$\or
$\gamma$\or$\delta$\or$\varepsilon$\or$\zeta$\or$\eta$\or$\vartheta$\or
$\iota$\or$\kappa$\or$\lambda$\or$\mu$\or$\nu$\or$\xi$\or$o$\or$\pi$\or
$\rho$\or$\sigma$\or$\tau$\or$\upsilon$\or$\varphi$\or$\chi$\or$\psi$\or
$\omega$\else\@ctrerr\fi}
\newcounter{lvla}
\newcounter{lvlb}
\newcounter{lvlc}
\newcounter{lvld}
\newcounter{lvle}
\newcounter{lvlf}
\newcounter{lvlg}
\newcounter{lvlh}
\newcounter{lvli}
\newcounter{lvlj}
\newcounter{lvlk}
\newcounter{lvll}
\renewcommand*{\thelvla}{\J@Number}
\renewcommand*{\thelvlb}{\J@Number}
\renewcommand*{\thelvlc}{\J@Number}
\renewcommand*{\thelvld}{\J@Number}
\renewcommand*{\thelvle}{\J@Number}
\renewcommand*{\thelvlf}{\J@Number}
\renewcommand*{\thelvlg}{\J@Number}
\renewcommand*{\thelvlh}{\J@Number}
\renewcommand*{\thelvli}{\J@Number}
\renewcommand*{\thelvlj}{\J@Number}
\renewcommand*{\thelvlk}{\J@Number}
\renewcommand*{\thelvll}{\J@Number}
\if@twoside
\newcommand*{\lvlamark}[1]{\J@SetCurrent%
\@mkboth{\J@NumberRoot1\J@NumberEnd1\ #1}%
{\J@NumberRoot1\J@NumberEnd1\ #1}}
\newcommand*{\lvlbmark}[1]{\J@SetCurrent%
\@mkboth{\J@NumberRoot1\,\J@NumberRoot2\J@NumberEnd2\ #1}%
{\J@NumberRoot1\,\J@NumberRoot2\J@NumberEnd2\ #1}}
\newcommand*{\lvlcmark}[1]{\J@SetCurrent\markright{\J@Number\ #1}}
\else
\newcommand*{\lvlamark}[1]{\J@SetCurrent%
\markright{\J@NumberRoot1\J@NumberEnd1\ #1}}
\newcommand*{\lvlbmark}[1]{\J@SetCurrent%
\markright{\J@NumberRoot1\,\J@NumberRoot2\J@NumberEnd2\ #1}}
\newcommand*{\lvlcmark}[1]{\J@SetCurrent%
\markright{\J@NumberRoot1\,\J@NumberRoot2\,\J@Number\ #1}}
\fi
\newcommand*{\lvldmark}{\J@SetCurrent\@gobble}
\newcommand*{\lvlemark}{\lvldmark}
\newcommand*{\lvlfmark}{\lvldmark}
\newcommand*{\lvlgmark}{\lvldmark}
\newcommand*{\lvlhmark}{\lvldmark}
\newcommand*{\lvlimark}{\lvldmark}
\newcommand*{\lvljmark}{\lvldmark}
\newcommand*{\lvlkmark}{\lvldmark}
\newcommand*{\lvllmark}{\lvldmark}
\newcounter{tiefe}\setcounter{tiefe}{1}
\setcounter{tocdepth}{12}\setcounter{secnumdepth}{12}
\newcommand*{\J@Number}{\J@NumberRoot{\value{tiefe}}%
\J@NumberEnd{\value{tiefe}}}
\newcommand*{\J@NumberRoot}[1]{\J@INumberRoot{#1}%
{\csname c@lvl\@alph{#1}\endcsname}}
\newcommand*{\J@INumberRoot}[2]{%
\ifcase#1\or
\@Alph{#2}\or
\@Roman{#2}\or
\@arabic{#2}\or
\@alph{#2}\or
\@alph{#2}\@alph{#2}\or
\@greek{#2}\or
\@greek{#2}\@greek{#2}\or
(\@arabic{#2})\or
(\@alph{#2})\or
(\@alph{#2}\@alph{#2})\or
(\@greek{#2})\or
(\@greek{#2}\@greek{#2})\fi}
\newcommand*{\J@NumberEnd}[1]{\ifnum#1<8\ifnum#1<4.\else)\fi\fi}
\newcommand*\l@lvla{\@dottedtocline{1}{0em}{2,5em}}
\newcommand*\l@lvlb{\@dottedtocline{2}{1em}{2,5em}}
\newcommand*\l@lvlc{\@dottedtocline{3}{2em}{2,5em}}
\newcommand*\l@lvld{\@dottedtocline{4}{3em}{2,5em}}
\newcommand*\l@lvle{\@dottedtocline{5}{4em}{2,5em}}
\newcommand*\l@lvlf{\@dottedtocline{6}{5em}{2,5em}}
\newcommand*\l@lvlg{\@dottedtocline{7}{6em}{2,5em}}
\newcommand*\l@lvlh{\@dottedtocline{8}{7em}{2,5em}}
\newcommand*\l@lvli{\@dottedtocline{9}{8em}{2,5em}}
\newcommand*\l@lvlj{\@dottedtocline{10}{9em}{2,5em}}
\newcommand*\l@lvlk{\@dottedtocline{11}{10em}{2,5em}}
\newcommand*\l@lvll{\@dottedtocline{12}{11em}{2,5em}}
\newcommand*{\J@SetCurrent}{\xdef\@currentlabel{{\arabic{lvla}}%
{\arabic{lvlb}}{\arabic{lvlc}}{\arabic{lvld}}{\arabic{lvle}}%
{\arabic{lvlf}}{\arabic{lvlg}}{\arabic{lvlh}}{\arabic{lvli}}%
{\arabic{lvlj}}{\arabic{lvlk}}{\arabic{lvll}}}}
\newcommand*{\toc}{\secdef\J@LongToc\J@ShortToc}
\newcommand*{\J@ShortToc}[1]{\stepcounter{lvl\alph{tiefe}}\J@Number\ %
\addcontentsline{toc}{lvl\alph{tiefe}}%
{\protect\numberline{\J@Number}#1}%
\csname lvl\alph{tiefe}mark\endcsname{#1}\@gobblecr}
\newcommand*{\J@LongToc}[2][]{%
\@startsection{lvl\alph{tiefe}}{\value{tiefe}}{0pt}
{\ifnum\value{tiefe}=1 -4ex plus-1,5ex minus-0,ex\else
-2,7ex plus-0,8ex minus-0,2ex\fi}
{\ifnum\value{tiefe}>7 -1em plus-0,5em\relax\else
0,6ex plus0,3ex minus0,1ex\fi}
{\normalfont%
\ifnum\value{tiefe}=1\large\else\normalsize\fi
\ifnum\value{tiefe}>7\itshape\else\bfseries\fi}[#1]{#2}}
\renewcommand*{\@seccntformat}[1]{\csname the#1\endcsname\ }
\renewcommand*{\numberline}[1]{#1\ }
\newcommand*{\leveldown}{%
\ifnum\value{lvla}=0%
\PackageWarning{alfa}{\protect\sub\space without
\protect\toc\space}\fi
\ifnum\value{tiefe}=12%
\PackageWarning{alfa}{too many sublevels!! Ignored \protect\sub.
\MessageBreak There will probably be an \protect\levelup\space
without \protect\sub\space warning later on}
\setcounter{tiefe}{11}\fi
\stepcounter{tiefe}}
\newcommand*{\sub}{\leveldown\toc}
\newcommand*{\levelup}{%
\ifnum\value{tiefe}=1%
\PackageWarning{alfa}{\protect\levelup\space without\protect\sub}
\stepcounter{tiefe}\fi
\ifnum\value{lvl\alph{tiefe}}=1%
\PackageWarning{alfa}{only one subitem in level "\J@Number" ending}%
\fi
\setcounter{lvl\alph{tiefe}}{0}
\addtocounter{tiefe}{-1}\par\addvspace{2,7ex plus0,8ex minus1ex}}
\renewcommand*{\@cite}[2][]{#1#2}
\def\@citex[#1]#2{%
\let\@citea\@empty
\@cite{\@for\@citeb:=#2\do
{\@citea\def\@citea{,\penalty\@m\ }%
\edef\@citeb{\expandafter\@firstofone\@citeb\@empty}%
\if@filesw\immediate\write\@auxout{\string\citation{\@citeb}}\fi
\@ifundefined{b@\@citeb}{\mbox{\reset@font\bfseries ?}%
\G@refundefinedtrue
\@latex@warning
{Citation `\@citeb' on page \thepage \space undefined}}%
{\csname b@\@citeb\endcsname}}}{#1}}
\renewcommand*{\ref}{%
\@ifstar{\@tempswatrue\J@ref}{\@tempswafalse\J@ref}}
\newcommand*{\J@ref}[1]{%
\expandafter\ifx\csname r@#1\endcsname\relax
\protect\G@refundefinedtrue
\nfss@text{\reset@font\bfseries ??}
\@latex@warning{Reference '#1' on page \thepage \space undefined}%
\else
\expandafter\J@refX\csname r@#1\endcsname
\fi}
\newcommand*{\J@refX}[1]{\expandafter\J@refXX#1}
\newcommand*{\J@refXX}[2]{%
\ifcat#10
#1%
\else
\expandafter\J@refA#1%
\fi}
\newcommand*{\J@refA}[6]{\@tempcnta\@ne%
\J@refP1{#1}0\J@refP2{#2}{#1}\J@refP3{#3}{#2}\J@refP4{#4}{#3}%
\J@refP5{#5}{#4}\J@refP6{#6}{#5}\J@refB#6}
\newcommand*{\J@refB}[7]{\J@refP7{#2}{#1}\J@refP8{#3}{#2}%
\J@refP9{#4}{#3}\J@refP{10}{#5}{#4}\J@refP{11}{#6}{#5}%
\J@refP{12}{#7}{#6}\J@NumberEnd\@tempcnta}
\newcommand*{\J@refP}[3]{%
\if@tempswa%
\ifnum#2>0\@tempcnta#1\,\J@INumberRoot{#1}{#2}\fi
\else%
\ifnum#2=\value{lvl\@alph{#1}}%
\ifnum#1=12\PackageError{alfa}{Self-reference detected!}{You used
a \protect\ref\space in the same section as the referenced
\protect\label\MessageBreak That makes no sense!}\fi
\else
\ifnum#2>0\@tempcnta#1\@tempswatrue\J@INumberRoot{#1}{#2}\else
\ifnum#3>0%
\@tempcnta#1\advance\@tempcnta-1\relax\J@INumberRoot{\@tempcnta}{#3}%
\fi
\fi
\fi
\fi}
%% Better interface (hints by Jean-Marc Lagouttes and Amir Karger)
\newcommand\frontmatter{\newpage\pagenumbering{roman}}
\newcommand\mainmatter{\newpage\pagenumbering{arabic}}
%% \newcommand\endmatter{\newpage\appendix}
\newcommand\up{\levelup\toc}
\newcommand\uptwo{\levelup\levelup\toc}
\newcommand\upthree{\levelup\levelup\levelup\toc}
\newcommand\upfour{\levelup\levelup\levelup\levelup\toc}
\newcommand\upfive{\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upsix{\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upseven{\levelup\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upeight{\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upnine{\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upten{\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newcommand\upeleven{\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\levelup\toc}
\newenvironment{keywords}{%
\if@twocolumn
\section*{\keywordname}%
\else
\small
\begin{center}%
{\bfseries \keywordname\vspace{-.5em}\vspace{\z@}}%
\end{center}%
\quotation
\fi}
{\if@twocolumn\else\endquotation\fi}
\newcommand\keywordname{Stichworte} % --> translate Stichworte - keywords
\reversemarginpar
%% \long\def\@footnotetext#1{\insert\footins{%
%% \linespread{\J@FootnoteSpread}\reset@font\footnotesize
%% \interlinepenalty\interfootnotelinepenalty
%% \splittopskip\footnotesep
%% \splitmaxdepth \dp\strutbox \floatingpenalty \@MM
%% \hsize\columnwidth \@parboxrestore
%% \protected@edef\@currentlabel{%
%% \csname p@footnote\endcsname\@thefnmark
%% }%
%% \color@begingroup
%% \@makefntext{%
%% \rule\z@\footnotesep\ignorespaces#1\@finalstrut\strutbox}%
%% \color@endgroup}}%
%% \let\footnotesize\small\let\footnoterule\relax\let\footnote\thanks
%% \setcounter{footnote}{0}\global\let\thanks\relax
\newcommand{\CapListEntry}[1]{\def\@CapListEntryFlag{1}\def\@CapListEntryText{#1}}
\def\@CapListEntryFlag{0}
\def\caption#1{\refstepcounter\@captype%
\ifodd\@CapListEntryFlag%
\@dblarg{\@caption\@captype}[\@CapListEntryText]{#1}%
\def\@CapListEntryFlag{0}%
\else%
\@dblarg{\@caption\@captype}{#1}%
\fi}
%- clip all graphics (idea: Fred Hucht)
\def\includegraphics{\Gin@cliptrue\Gin@i}
%------------------------------
\newenvironment*{jurabibliography}
{\addchap{\bibname
\@mkboth{\bibname}{\bibname}}%
\begin{description}\sloppy}{\end{description}}
\def\jbibitem#1#2#3{\item[#1]\if@filesw
{\let\protect\noexpand\immediate
\write\@auxout{\string\bibcite{#3}{#2}}}\fi\ignorespaces}
\newenvironment{sachverhalt}
{\addchap{Sachverhalt}%
\@mkboth{Sachverhalt}{Sachverhalt}}{\clearpage}
\endinput
%%
%%
%% End of file `alfa.cls'.