From 32537b35fdf2209fd8e06a87710650476bc655a8 Mon Sep 17 00:00:00 2001 From: Karl Berry Date: Thu, 12 Jan 2006 23:57:24 +0000 Subject: juraabbrev git-svn-id: svn://tug.org/texlive/trunk@1009 c570f23f-e606-0410-a88d-b1316a301751 --- .../texmf-dist/tex/latex/juraabbrev/juraabbrev.sty | 215 +++++++++++++++++++++ 1 file changed, 215 insertions(+) create mode 100644 Master/texmf-dist/tex/latex/juraabbrev/juraabbrev.sty (limited to 'Master/texmf-dist') diff --git a/Master/texmf-dist/tex/latex/juraabbrev/juraabbrev.sty b/Master/texmf-dist/tex/latex/juraabbrev/juraabbrev.sty new file mode 100644 index 00000000000..2a8a92cbc57 --- /dev/null +++ b/Master/texmf-dist/tex/latex/juraabbrev/juraabbrev.sty @@ -0,0 +1,215 @@ +%% +%% This is file `juraabbrev.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% juraabbrev.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% For the copyright see the source file. +%% +%% Any modified versions of this file must be renamed +%% with new filenames distinct from juraabbrev.sty. +%% +%% For distribution of the original source see the terms +%% for copying and modification in the file juraabbrev.dtx. +%% +%% This generated file may be distributed as long as the +%% original source files, as listed above, are part of the +%% same distribution. (The sources need not necessarily be +%% in the same archive or directory.) +%% Written by Lucas Wartenburger +%% +%% +%% \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 \~} +%% +\NeedsTeXFormat{LaTeX2e}[1995/12/01] +\ProvidesPackage{juraabbrev}[2004/09/15 v0.51] +\RequirePackage{ifthen} +\newif\ifabb@force +\newif\ifabbrev@long\abbrev@longfalse +\newif\ifcitepar@out +\newcount\abb@space +\abb@space=\the\sfcode`a%should be 1000 +\newcommand*{\abbrevname}{Abk\"urzungsverzeichnis} +\newtoks\tok@bbsign +\newtoks\tok@bbshort +\newtoks\tok@bblong +\let\char@bblong=+ +\let\char@bbend=> +\let\char@bbmaj=< +\let\char@bbbib=* +\newif\if@bblong +\newif\if@bbend +\newif\if@bbmaj +\newif\if@bbrepeat +\newenvironment{abbreviations} + {\section*{% + \abbrevname + \@mkboth{\MakeUppercase\abbrevname}{\MakeUppercase\abbrevname}}% +\begingroup +\newdimen\leftsize +\newdimen\middistance +\newdimen\rightsize +\leftskip=0pt% +\rightskip=0pt% +\middistance=1pc% +\leftsize=.1\hsize +\advance\leftsize by1cm% +\rightsize=\hsize +\advance\rightsize by-\leftsize +\advance\rightsize by-\leftskip +\advance\rightsize by-\middistance +\advance\rightsize by-\rightskip} + {\par\endgroup} +\newenvironment{longabbreviations} + {\abbrev@longtrue} + {\abbrev@longfalse} +\providecommand\hyper@linkstart[2]{}% +\providecommand\hyper@linkend{}% +\providecommand\hyper@anchorstart[1]{}% +\providecommand\hyper@anchorend{}% +\def\hyper@abblinkstart#1{\hyper@linkstart{link}{link.#1}} +\def\hyper@abblinkend{\hyper@linkend} +\def\hyper@abbanchorstart#1{\hyper@anchorstart{link.#1}} +\def\hyper@abbanchorend{\hyper@anchorend} +\let\protectab=\relax +\def\abbrev{\@ifstar{\abb@forcetrue\@abbrev}{\abb@forcefalse\@abbrev}}% +\def\@abbrev#1#2#3{% + \begingroup\let\protectab=\string + \if@filesw\immediate\write\@abbout{% + \string\abbrevdef{#1}{#2}{#3}}\fi% + \endgroup + \ifabb@force\@abbentry{#1}{#2}{#3}% + \else\@ifundefined{uabb#1}{}{\@abbentry{#1}{#2}{#3}}\fi +\ignorespaces}% +\def\@abbentry#1#2#3{\hyper@abbanchorstart{% + #1}\par\noindent\hskip\leftskip% + \hbox to \leftsize{\strut#2\hss}\hskip\middistance% + \hbox to \rightsize{#3\hss\strut}\hyper@abbanchorend} +\def\abb #1 {% + \@ifundefined{abb#1}{\PackageWarning{juraabbrev}% + {Abbreviation '#1' undefined}}% + {\csname abb#1\endcsname}} +\def\babb #1 {% + \@ifundefined{abb#1}{\PackageWarning{juraabbrev}% + {Abbreviation '#1' undefined}}% + {\csname abb#1\endcsname\char@bbbib}} +\def\labb #1 {% + \@ifundefined{abb#1}{\PackageWarning{juraabbrev}% + {Abbreviation '#1' undefined}}% + {\csname abb#1\endcsname\char@bblong}} +\def\abbrevdef#1#2#3{% +\expandafter\DeclareRobustCommand\csname abb#1\endcsname{% + \tok@bbsign={#1}% + \tok@bbshort={#2}% + \tok@bblong={#3}% + \@bblongfalse\@bbendfalse\@bbmajfalse + \futurelet\tok@next\conf@bb}} +\long\def\nextconf@bb#1{\futurelet\tok@next\conf@bb} +\def\conf@bb{%\let\tok@next=#1% + \@bbrepeattrue + \ifx\tok@next\char@bblong\@bblongtrue\else + \ifx\tok@next\char@bbend\@bbendtrue\else + \ifx\tok@next\char@bbmaj\@bbmajtrue\else + \ifx\tok@next\char@bbbib + \ifabbrev@long\@bblongtrue\fi + \else + \@bbrepeatfalse%other token + \fi + \fi + \fi + \fi + \if@bbrepeat\let\next@bb=\nextconf@bb\else + \let\next@bb=\make@bb% + \fi\next@bb} +\def\make@bb{\begingroup + \if@bbend\abb@space=\the\sfcode`.\fi + \if@bblong + \if@bbmaj\expandafter\abb@major\the\tok@bblong\else + \the\tok@bblong + \fi + \else + \if@filesw\immediate\write + \@abbout{\string\abbrevuse{\the\tok@bbsign}}\fi + \hyper@abblinkstart{\the\tok@bbsign}% + \if@bbmaj\expandafter\abb@major\the\tok@bbshort\else + \the\tok@bbshort\fi + \hyper@abblinkend\spacefactor\abb@space + \fi + \make@bbspace\endgroup} +\def\abb@major#1{\MakeUppercase{#1}} +\def\make@bbspace{% + \ifx\tok@next\bgroup\else + \ifx\tok@next\egroup\else + \ifx\tok@next\/\else + \ifx\tok@next\ \else + \ifx\tok@next~\else + \ifx\tok@next.\else + \ifx\tok@next!\else + \ifx\tok@next,\else + \ifx\tok@next:\else + \ifx\tok@next;\else + \ifx\tok@next?\else + \ifx\tok@next/\else + \ifx\tok@next'\else + \ifx\tok@next)\else + \ifx\tok@next-\else + \ifx\tok@next\@xobeysp\else + \ifx\tok@next\space\else + \ifx\tok@next\@sptoken\else + \space + \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} +\def\abbrevuse#1{\global\@namedef{uabb#1}{true}}% +\@ifpackageloaded{index}{% +\def\citelaw{\@ifstar{% + \citepar@outfalse\cite@law}{% + \citepar@outtrue\cite@law}}% mit Output? +\def\cite@law{\@ifnextchar[{% + \cite@@law}{% + \cite@@law[\S~]}} % Default § verwenden? +\def\cite@@law[#1]#2{\@ifnextchar[{% + \cite@@@law[#1]#2}{% + \cite@@@law[#1]#2[]}}% mit Absatz? +\def\cite@@@law[#1]#2[#3]{\@ifnextchar[{% + \cite@@@@law[#1]#2[#3]}{% + \cite@@@@law[#1]#2[#3][]}} % mit Satz? +\def\cite@@@@law[#1]#2[#3][#4]#5{% + \ifthenelse{\equal{#3}{}}{%ohne Absatz + \index[laws]{#5@\csname abb#5\endcsname*!#1#2}% + \ifcitepar@out #1#2#4 \csname abb#5\endcsname\fi}{%mit Absatz + \index[laws]{#5@\csname abb#5\endcsname*!#1#2!#3}% + \ifcitepar@out #1#2 #3 #4 \csname abb#5\endcsname\fi}} +\def\citeart{\@ifstar{% + \citepar@outfalse\cite@@law[Art.~]}{% + \citepar@outtrue\cite@@law[Art.~]}} +\def\citepar{\@ifstar{% + \citepar@outfalse\cite@@law[\S~]}{% + \citepar@outtrue\cite@@law[\S~]}} +}{\relax}% +\AtBeginDocument{ + \newwrite\@abbout + \@input{\jobname.abb}% + \if@filesw + \immediate\openout\@abbout\jobname.abb + \immediate\write\@abbout{\relax}% + \fi} +\endinput +%% +%% End of file `juraabbrev.sty'. -- cgit v1.2.3