diff options
author | Karl Berry <karl@freefriends.org> | 2010-06-18 00:16:31 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2010-06-18 00:16:31 +0000 |
commit | d9bd4cc7bc00bbe2637957dc1a44d9c949a6dbdc (patch) | |
tree | 0c8c9198b304f16b1b46962eef236c6bd290815a /Master/texmf-dist/tex/latex/koma-script/scrjura.sty | |
parent | 643866a0f27297875ee40ee641aa090114b87e51 (diff) |
koma-script update (17jun10)
git-svn-id: svn://tug.org/texlive/trunk@19027 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/koma-script/scrjura.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/koma-script/scrjura.sty | 132 |
1 files changed, 80 insertions, 52 deletions
diff --git a/Master/texmf-dist/tex/latex/koma-script/scrjura.sty b/Master/texmf-dist/tex/latex/koma-script/scrjura.sty index 4d686e1e5fb..d0910e57f80 100644 --- a/Master/texmf-dist/tex/latex/koma-script/scrjura.sty +++ b/Master/texmf-dist/tex/latex/koma-script/scrjura.sty @@ -41,7 +41,7 @@ %%% From File: scrjura.dtx \NeedsTeXFormat{LaTeX2e}[1995/06/01] \ProvidesPackage{scrjura} - [2009/03/24 v0.5a beta + [2010/06/07 v0.5d KOMA-Script for jurists (package)% ] \@ifpackageloaded{hyperref}{% @@ -58,6 +58,7 @@ \g@addto@macro\document\contract% } \KOMA@ifkey{juratotoc}{@juratotoc} +\KOMA@ifkey{juratitlepagebreak}{@juratitlepagebreak} \newcommand*{\Paragraphmark}[1]{} \KOMA@key{paragraphmark}{% \begingroup @@ -98,12 +99,15 @@ {parlong}{1},{longpar}{1},{ParL}{1},% {parshort}{2},{shortpar}{2},{ParS}{2},% {parnumeric}{3},{numericpar}{3},{ParN}{3},% + {paroff}{4},{nopar}{4},% {sentencelong}{10},{longsentence}{10},{SentenceL}{10},% {sentenceshort}{20},{shortsentence}{20},{SentenceS}{20},% {sentencenumeric}{30},{numericsentence}{30},{SentenceN}{30},% + {sentenceoff}{40},{nosentence}{40},% {long}{11},% {short}{22},% - {numeric}{33}% + {numeric}{33},% + {paragraphonly}{44},{ParagraphOnly}{44},{OnlyParagraph}{44}% }{#1}% \@tempcnta=\@tempa\relax \@tempcntb=\z@ @@ -121,6 +125,9 @@ \or \aftergroup\def\aftergroup\parcite@format \aftergroup{\aftergroup2\aftergroup}% + \or + \aftergroup\def\aftergroup\parcite@format + \aftergroup{\aftergroup-\aftergroup1\aftergroup}% \fi \ifcase \@tempcntb \or @@ -132,25 +139,34 @@ \or \aftergroup\def\aftergroup\sentencecite@format \aftergroup{\aftergroup2\aftergroup}% + \or + \aftergroup\def\aftergroup\sentencecite@format + \aftergroup{\aftergroup-\aftergroup1\aftergroup}% \fi \endgroup } \KOMA@DeclareDeprecatedOption[scrjura]{parcitename}{ref=parlong} \KOMA@DeclareDeprecatedOption[scrjura]{sentencecitename}{ref=sentencelong} \KOMAProcessOptions\relax +\newcommand*{\jura@env@type}{} \newcommand*{\contract}{% - \renewcommand*{\contract}{% - \contract@nest@error{contract}% - }% - \let\@doendpe\contract@doendpe - \let\Paragraph\contract@paragraph - \let\c@Paragraph\c@contractParagraph - \edef\cl@Paragraph{\cl@Paragraph\cl@contractParagraph}% - \let\SubParagraph\contract@subparagraph - \let\c@SubParagraph\c@contractSubParagraph - \edef\cl@SubParagraph{\cl@SubParagraph\cl@contractSubParagraph}% - \let\Par\contract@everypar - \let\Sentence\contract@sentence + \ifx\jura@env@type\@empty + \let\@doendpe\contract@doendpe + \let\Paragraph\contract@paragraph + \let\c@Paragraph\c@contractParagraph + \edef\cl@Paragraph{\cl@Paragraph\cl@contractParagraph}% + \let\SubParagraph\contract@subparagraph + \let\c@SubParagraph\c@contractSubParagraph + \edef\cl@SubParagraph{\cl@SubParagraph\cl@contractSubParagraph}% + \let\Par\contract@everypar + \let\Sentence\contract@sentence + \renewcommand*{\jura@env@type}{contract}% + \else + \PackageError{contract}{nested `contract' detected}{% + You may not use a `contract' environment inside\MessageBreak + a `\jura@env@type' environment or after loading\MessageBreak + package `scrjura' with option `\jura@env@type'!}% + \fi } \let\if@jura@skiphyperref\iftrue \let\cl@Paragraph\@empty @@ -223,22 +239,23 @@ \let\theSubParagraph\theParagraph \ifcontract@dummy\else \begingroup + \if@juratitlepagebreak\else\interlinepenalty\@M\fi \contract@paragraph@font \theParagraph \ifx\contract@title\relax\else\enskip\contract@title\fi - \endgroup - \ifx\contract@entry\relax\else - \addcontentsline{toc}{cpar}{% - \protect\numberline{\theParagraph}\contract@entry - }% - \addcontentsline{cpa}{cpar}{% - \protect\numberline{\theParagraph}\contract@entry - }% - \fi - \ifx\contract@head\relax\else - \expandafter\Paragraphmark\expandafter{% - \expandafter\theSubParagraph\expandafter\enskip\contract@head}% - \fi - \par\nobreak\vskip\contract@postskip + \ifx\contract@entry\relax\else + \addcontentsline{toc}{cpar}{% + \protect\numberline{\theParagraph}\contract@entry + }% + \addcontentsline{cpa}{cpar}{% + \protect\numberline{\theParagraph}\contract@entry + }% + \fi + \ifx\contract@head\relax\else + \expandafter\Paragraphmark\expandafter{% + \expandafter\theSubParagraph\expandafter\enskip\contract@head}% + \fi + \par + \endgroup\nobreak\vskip\contract@postskip \jura@afterheading{contract}% \fi } @@ -279,22 +296,24 @@ \fi \ifcontract@dummy\else \begingroup + \if@juratitlepagebreak\else\interlinepenalty\@M\fi \contract@paragraph@font \theSubParagraph \ifx\contract@title\relax\else\enskip\contract@title\fi + \ifx\contract@entry\relax\else + \addcontentsline{toc}{cpar}{% + \protect\numberline{\theSubParagraph}\contract@entry + }% + \addcontentsline{cpa}{cpar}{% + \protect\numberline{\theSubParagraph}\contract@entry + }% + \fi + \ifx\contract@head\relax\else + \expandafter\Paragraphmark\expandafter{% + \expandafter\theSubParagraph\expandafter\enskip\contract@head}% + \fi + \par \endgroup - \ifx\contract@entry\relax\else - \addcontentsline{toc}{cpar}{% - \protect\numberline{\theSubParagraph}\contract@entry - }% - \addcontentsline{cpa}{cpar}{% - \protect\numberline{\theSubParagraph}\contract@entry - }% - \fi - \ifx\contract@head\relax\else - \expandafter\Paragraphmark\expandafter{% - \expandafter\theSubParagraph\expandafter\enskip\contract@head}% - \fi - \par\nobreak\vskip\contract@postskip + \nobreak\vskip\contract@postskip \jura@afterheading{contract}% \fi } @@ -352,12 +371,14 @@ \newcounter{juratoclevel} \setcounter{juratoclevel}{2}% \DeclareRobustCommand*{\jura@separator}[1]{#1} +\DeclareRobustCommand*{\jura@usetype}[1]{\jura@@usetype{#1}} +\newcommand*{\jura@@usetype}[1]{} \newif\ifparnumber \newcounter{par} \renewcommand*{\thepar}{\arabic{par}} \newcommand*{\theHpar}{\theH@AbsParagraph-\Roman{par}} \newcommand*{\parformat}{(\thepar)} -\renewcommand*\p@par{{\theSubParagraph\jura@separator{\nobreakspace}}} +\renewcommand*\p@par{{\jura@usetype{\jura@env@type}\theSubParagraph\jura@separator{\nobreakspace}}} \@addtoreset{par}{Paragraph} \@addtoreset{par}{SubParagraph} \newcommand*{\contract@everypar}{% @@ -365,9 +386,9 @@ \refstepcounter{par}% \refstepcounter{sentence}% \begingroup - \protected@write\@auxout{}{% - \string\newmaxpar{contractpars}{\theSubParagraph}{\arabic{par}}}% - \getmaxpar\@tempa{contractpars}{\theSubParagraph}% + \protected@write\@auxout{\let\contract@Paragraphformat\@firstofone}{% + \string\newmaxpar{contract}{\theSubParagraph}{\arabic{par}}}% + \getmaxpar\@tempa{contract}{\theSubParagraph}% \typeout{Stored max is \@tempa}% \ifnum \@tempa>\@ne \parformat\nobreakspace @@ -568,22 +589,28 @@ \DeclareRobustCommand*{\par@cite}[1]{\parciteformat{#1}} \newcommand*{\parciteformat}[1]{% \ifcase \parcite@format - \parlongformat{#1}% + \expandafter\parlongformat \or - \parshortformat{#1}% + \expandafter\parshortformat \or - \parnumericformat{#1}% + \expandafter\parnumericformat + \else + \unskip\expandafter\@gobble \fi + {#1}% } \DeclareRobustCommand*{\sentence@cite}[1]{\sentenceciteformat{#1}} \newcommand*{\sentenceciteformat}[1]{% \ifcase \sentencecite@format - \sentencelongformat{#1}% + \expandafter\sentencelongformat \or - \sentenceshortformat{#1}% + \expandafter\sentenceshortformat \or - \sentencenumericformat{#1}% + \expandafter\sentencenumericformat + \else + \unskip\expandafter\@gobble \fi + {#1}% } \newcommand*{\parlongformat}[1]{\parname~#1} \newcommand*{\parshortformat}[1]{\parshortname~#1} @@ -628,7 +655,8 @@ } \newcommand*{\getmaxpar}[3]{% \begingroup - \protected@edef\@tempa{#3}% + \expandafter\let\csname #2@Paragraphformat\endcsname\@firstofone + \edef\@tempa{#3}% \@onelevel@sanitize\@tempa \expandafter\ifx \csname max@#2@\@tempa\endcsname\relax \edef\@tempa{\endgroup\edef\noexpand#1{\expandafter\the\value{par}}}% |