diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-13 00:00:29 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-13 00:00:29 +0000 |
commit | 8b8fbae5990dee3b8ab739df0de8b7c365e4d227 (patch) | |
tree | 824392c1bb07fe8c8b620efd3992cc0daa3e433a /Master/texmf-dist/tex/latex/ncctools/nccsect.sty | |
parent | e9351f8ac4f8603d6020be78e092e939e24d89d0 (diff) |
ncctools
git-svn-id: svn://tug.org/texlive/trunk@1132 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ncctools/nccsect.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/nccsect.sty | 675 |
1 files changed, 675 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ncctools/nccsect.sty b/Master/texmf-dist/tex/latex/ncctools/nccsect.sty new file mode 100644 index 00000000000..bc8c6349896 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ncctools/nccsect.sty @@ -0,0 +1,675 @@ +%% +%% This is file `nccsect.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% nccsect.dtx (with options: `package') +%% +%% IMPORTANT NOTICE: +%% +%% This file is a generated file from the sources of the `ncctools' +%% bundle. +%% +%% You are not allowed to modify this file. +%% +%% You are allowed to distribute this file if and only if +%% it is distributed with the corresponding source files in +%% the `ncctools' bundle. +%% +%% For the copying and distribution conditions of the source files, +%% see the README file distributed with the ncctools bundle. +%% +%% File: nccsect.dtx Copyright (C) 2002--2005 by Alexander I. Rozhenko +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{nccsect} + [2005/06/15 v1.3 Extended Section, Caption, and TOC Handling (NCC)] +\@ifpackageloaded{nccthm}{}{% + \def\NCC@secskip#1{% + \if@noskipsec \leavevmode \fi \par + \if@nobreak \everypar{}\else + \addpenalty\@secpenalty + \addvspace{#1}% + \fi + } + \def\NCC@runskip{2.75ex \@plus 1ex \@minus .2ex} +} +\newcommand{\runinsectionskip}{\NCC@secskip{\NCC@runskip}} +\newif\ifNCC@nosectag +\newif\ifNCC@secstartag +\newif\ifNCC@nosecmark +\newif\ifNCC@noaux +\let\NCC@global\global +\def\NCC@sec@reset@controls{% + \NCC@global\NCC@nosectagfalse + \NCC@global\NCC@secstartagfalse + \NCC@global\let\NCC@sectag\relax + \NCC@global\NCC@nosecmarkfalse + \NCC@global\let\NCC@secmark\relax + \NCC@global\NCC@noauxfalse +} +\NCC@sec@reset@controls +\newcommand{\norunninghead}{\NCC@global\NCC@nosecmarktrue} +\newcommand*{\runninghead}[1]{\NCC@global\def\NCC@secmark##1{##1{#1}}} +\newcommand{\noheadingtag}{\NCC@global\NCC@nosectagtrue} +\newcommand{\headingtag}{% + \@ifstar{\NCC@global\NCC@secstartagtrue\NCC@setsectag}{\NCC@setsectag}% +} +\def\NCC@setsectag#1{\NCC@global\def\NCC@sectag{#1}} +\newcommand{\skipwritingtoaux}{\NCC@global\NCC@noauxtrue} +\def\NCC@makesection#1#2#3#4{% + \ifNCC@secstartag + \let\@svsec\NCC@sectag + \NCC@make{}% + \else + \ifx\NCC@sectag\relax + \ifNCC@nosectag + \edef\NCC@restsec{% + \noexpand\c@secnumdepth \the\c@secnumdepth\relax + }% + \c@secnumdepth -1000 + \else + \let\NCC@restsec\relax + \ifnum#2>\c@secnumdepth \else\refstepcounter{#1}\fi + \fi + \else + \expandafter\let\expandafter\NCC@thesec\csname the#1\endcsname + \def\NCC@restsec{% + \expandafter\let\csname the#1\endcsname\NCC@thesec + }% + \expandafter\let\csname the#1\endcsname\NCC@sectag + \protected@edef\@currentlabel{\NCC@sectag}% + \fi + \ifnum #2>\c@secnumdepth + \let\@svsec\@empty + \else + \protected@edef\@svsec{% + \protect\NCC@makesectag{\csname the#1\endcsname}% + }% + \fi + \let\NCC@makemark\@empty + \@ifundefined{#1mark}{}{% + \ifx\NCC@secmark\relax + \ifNCC@nosecmark \else + \def\NCC@makemark{\csname #1mark\endcsname{#3}}% + \fi + \else + \let\NCC@savesecmark\NCC@secmark + \def\NCC@makemark{% + \NCC@savesecmark{\csname #1mark\endcsname}% + \let\NCC@savesecmark\relax + }% + \fi + }% + \ifNCC@noaux + \NCC@make{\NCC@makemark \NCC@restsec}% + \else + \NCC@make{\NCC@makemark #4\NCC@restsec}% + \fi + \fi + \NCC@sec@reset@controls +} +\newcommand{\indentaftersection}{\@afterindenttrue} +\newcommand{\noindentaftersection}{\@afterindentfalse} +\newcommand*{\SectionTagSuffix}[1]{\def\NCC@asecnum{#1}} +\@onlypreamble\SectionTagSuffix +\def\NCC@makesectag@default#1{#1\NCC@asecnum} +\def\NCC@defaultsectag{\let\NCC@makesectag\NCC@makesectag@default} +\NCC@defaultsectag +\def\NCC@secname#1{% + \ifcase#1\relax \or section\or subsection\or subsubsection\or + paragraph\or subparagraph\else section@\romannumeral#1\fi +} +\def\@startsection#1#2#3#4#5#6{% + \@tempskipa #4\relax + \ifdim \@tempskipa <\z@ \@temskipa -\@tempskipa \fi + \NCC@secskip \@tempskipa + \secdef{\@sect{#1}{#2}{#3}{#4}{#5}{#6}}{\@ssect{#3}{#4}{#5}{#6}}% +} +\def\@ssect#1#2#3#4#5{% + \let\@svsec\@empty + \NCC@makesec{#1}{#4}{#5}{#3}{}% + \NCC@sec@reset@controls + \let\NCC@makesec\NCC@makesect + \NCC@defaultsectag +} +\def\@sect#1#2#3#4#5#6[#7]#8{% + \def\NCC@make{\NCC@makesec{#3}{#6}{#8}{#5}}% + \NCC@makesection{#1}{#2}{#7}{% + \addcontentsline{toc}{\NCC@secname{#2}}{% + \ifnum #2>\c@secnumdepth \else + \protect\numberline{\csname the#1\endcsname}% + \fi + #7% + }% + }% + \let\NCC@makesec\NCC@makesect + \NCC@defaultsectag +} +\def\NCC@makesect#1#2#3#4#5{% + \@tempskipa #4\relax + \ifdim \@tempskipa>\z@ + \begingroup \normalfont + #2{\@hangfrom{\hskip #1\relax\@svsec}% + \interlinepenalty \@M\ignorespaces #3\@@par}% + \endgroup + #5% + \else + \def\@svsechd{{\normalfont #2{\hskip #1\relax + \@svsec\ignorespaces #3}}#5}% + \fi + \@xsect{#4}% +} +\let\NCC@makesec\NCC@makesect +\newcommand*{\sectionstyle}[1]{% + \@ifundefined{NCC@sec@#1}% + {\PackageError{nccsect}{Unknown section style `#1'}{}}% + {\csname NCC@sec@#1\endcsname}% +} +\def\NCC@sec@hangindent{\def\NCC@sec##1{\@hangfrom{##1}}} +\@namedef{NCC@sec@hangindent*}{% + \def\NCC@sec##1{\@hangfrom{##1}\rightskip\@flushglue}% +} +\def\NCC@sec@parindent{\def\NCC@sec##1{\@hangfrom\indent##1}} +\@namedef{NCC@sec@parindent*}{% + \def\NCC@sec##1{\@hangfrom\indent\rightskip\@flushglue##1}% +} +\def\NCC@sec@center{\def\NCC@sec##1{\centering##1}} +\def\NCC@makesecx#1#2#3#4#5{% + \begingroup\normalfont + #2{\NCC@sec{\@svsec}\interlinepenalty \@M\ignorespaces #3\@@par}% + \endgroup #5% + \par \nobreak \vskip #4\relax \@afterheading \ignorespaces +} +\@ifundefined{chapter}{% + \def\NCC@startmainsec#1#2#3#4#5{% + \def\NCC@makesectag##1{\leavevmode#2\partname\nobreakspace##1}% + \NCC@secskip{#3}% + \secdef{\@part{#1}{#4}{#5}}{\@spart{#1}{#4}{#5}}% + } + \def\@spart#1#2#3#4{% + \let\@svsec\@empty + \NCC@makepart{#1}{#3}{#4}{#2}{}% + \NCC@sec@reset@controls + \NCC@defaultsectag + } + \def\@part#1#2#3[#4]#5{% + \def\NCC@make{\NCC@makepart{#1}{#3}{#5}{#2}}% + \NCC@makesection{part}{\z@}{#4}{% + \addcontentsline{toc}{part}{% + \ifnum \c@secnumdepth>\m@ne \protect\numberline{\thepart}\fi + #4% + }% + }% + \NCC@defaultsectag + } + \def\NCC@makepart#1#2#3#4#5{% + \begingroup \normalfont + \ifx\@svsec\@empty \else #1{\@svsec\@@par}\nobreak \fi + \interlinepenalty \@M #1{#2{#3}\@@par}% + \endgroup + #5% + \par\nobreak \vskip #4\relax \@afterheading \ignorespaces + } + \providecommand*\partmark[1]{\markboth{}{}} +}{ + \def\NCC@startmainsec#1#2#3#4#5{% + \NCC@startchap + \def\NCC@makesectag##1{\leavevmode#2\@chapapp\nobreakspace##1}% + \secdef{\@chapter{#1}{#3}{#4}{#5}}{\@schapter{#1}{#3}{#4}{#5}}% + } + \newcommand\beforechapter[1]{\gdef\NCC@beforechapter{#1}} + \beforechapter{} + \def\@schapter#1#2#3#4#5{% + \let\@svsec\@empty + \NCC@makechapter{#1}{#2}{#4}{#5}{#3}{}% + \NCC@sec@reset@controls + \NCC@defaultsectag + } + \def\@chapter#1#2#3#4[#5]#6{% + \@ifundefined{if@mainmatter}{}{\if@mainmatter\else\noheadingtag\fi}% + \def\NCC@make{\NCC@makechapter{#1}{#2}{#4}{#6}{#3}}% + \NCC@makesection{chapter}{\z@}{#5}{% + \typeout{\@chapapp\space\thechapter.}% + \addcontentsline{toc}{chapter}{% + \ifnum \c@secnumdepth>\m@ne + \protect\numberline{\NCC@thetocchapter}\fi + #5% + }% + \NCC@infloats{\addtocontents{\@nameuse{ext@\@captype}}% + {\protect\runinsectionskip}}% + }% + \NCC@defaultsectag + } + \def\NCC@startchap{% + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}\global\@topnum\z@ + } + \def\NCC@thetocchapter{\thechapter} + \def\NCC@makechapter#1#2#3#4#5#6{% + \if@twocolumn + \@topnewpage[\NCC@makechaphead{#1}{#2}{#3}{#4}{#5}]% + \else + \NCC@makechaphead{#1}{#2}{#3}{#4}{#5}% + \fi + #6% + \@afterheading + \ignorespaces + } + \def\NCC@makechaphead#1#2#3#4#5{% + \ifx\NCC@beforechapter\@empty + \StartFromTextArea \vspace{#2}% + \else + \begingroup + \@twocolumnfalse + \let\NCC@global\@empty + \NCC@sec@reset@controls + \normalfont \NCC@beforechapter \par + \endgroup + \beforechapter{}% + \fi + \begingroup \normalfont + \ifx\@svsec\@empty \else #1{\@svsec\@@par}\fi + \interlinepenalty \@M #1{#3{#4}\@@par}% + \endgroup + \par\nobreak \vskip #5\relax + } + \newcommand*\epigraph[1][\NCC@epigraphwidth]{\NCC@epigraph{#1}} + \newcommand*\epigraphparameters[5]{% + \def\NCC@epigraphwidth{#2}% + \long\def\NCC@epigraph##1##2##3{ + \beforechapter{\def\epigraphwidth{##1}% + #1\par + \NCC@makeepigraph{#3}{##2}{#4{##3}}\par + #5% + }% + }% + } + \long\def\NCC@makeepigraph#1#2#3{% + \@begin@tempboxa\vtop{\setlength{\hsize}{\epigraphwidth}% + \@parboxrestore{#2\@@par}#3\@@par + }% + \setlength\@tempdima{#1}\advance\@tempdima -\totalheight + \ifdim\@tempdima>\z@ + \advance\@tempdima\depth + \dp\@tempboxa\@tempdima + \fi + \leavevmode\box\@tempboxa + \@end@tempboxa + } +} +\newcommand*{\CaptionTagSuffix}[1]{\def\NCC@acapnum{#1}} +\@onlypreamble\CaptionTagSuffix +\newcommand*\captionstyle[1][]{% + \NCC@set@capkey{style}{style}{#1}% +} +\newcommand*\captiontagstyle[1][]{% + \NCC@set@capkey{tag}{tag style}{#1}% +} +\newcommand*\captionwidth[2][]{% + \NCC@prepare@capkey{width}{#1}{\setlength{\hsize}{#2}}% +} +\def\NCC@set@capkey#1#2#3#4{% + \@ifundefined{NCC@makecap#1@#4} + {\PackageError{nccsect}{Unknown caption #2 `#4'}{}% + }{% + \edef\@tempa{\noexpand\NCC@prepare@capkey{#1}{#3}{% + \expandafter\noexpand\csname NCC@makecap#1@#4\endcsname + }% + }% + \@tempa + }% +} +\def\NCC@prepare@capkey#1#2{% + \def\@tempa{#2}% + \ifx\@tempa\@empty + \ifx\@captype\@undefined \else \let\@tempa\@captype \fi + \fi + \expandafter\def\csname NCC@cap#1@\@tempa\endcsname +} +\def\NCC@apply@cap#1{% + \@ifundefined{NCC@cap#1@\@captype}% + {\let\@tempa\@empty}{\let\@tempa\@captype}% + \csname NCC@cap#1@\@tempa\endcsname +} +\def\NCC@startcaption#1#2#3{% + \secdef{\NCC@caption{#1}{#2}{#3}}{\NCC@scaption{#1}{#2}{#3}}% +} +\long\def\NCC@scaption#1#2#3#4{% + \let\@svsec\@empty + \NCC@makecaption{#3}{#1}{#4}{#2}{}% + \NCC@sec@reset@controls + \NCC@defaultsectag +} +\long\def\NCC@caption#1#2#3[#4]#5{% + \def\NCC@make{\NCC@makecaption{#3}{#1}{#5}{#2}}% + \NCC@makesection{\@captype}{\z@}{#4}{% + \begingroup + \let\centering\@empty + \addcontentsline{\@nameuse{ext@\@captype}}{\@captype}{% + \ifnum \c@secnumdepth>\m@ne + \protect\numberline{\@nameuse{the\@captype}}\fi + #4% + }% + \endgroup + }% + \NCC@defaultsectag +} +\long\def\NCC@makecaption#1#2#3#4#5{% + \begingroup\par\normalfont + #1{}\addvspace{#2}\noindent + \ifx\@svsec\@empty \@tempcnta\z@ \else \@tempcnta\@ne \fi + \def\@tempa{#3}% + \ifx\@tempa\@empty \else \advance\@tempcnta\tw@ \fi + \ifnum\@tempcnta=\z@ \else + \vtop{\NCC@apply@cap{width}\@parboxrestore + \NCC@apply@cap{tag}{#3}\@@par}\par + \setlength\@tempskipa{#4}% + \ifdim\@tempskipa=\z@ \else \vskip \@tempskipa\fi + \fi + \endgroup + #5% +} +\long\def\NCC@makecaptag@para#1{% + \ifnum\@tempcnta<\thr@@ \let\NCC@acapnum\@empty\fi + \NCC@apply@cap{style}{{\@svsec}\ignorespaces#1}% +} +\def\NCC@makecaptag@left{\NCC@separate@captag\raggedright} +\def\NCC@makecaptag@center{\NCC@separate@captag\centering} +\def\NCC@makecaptag@right{\NCC@separate@captag\raggedleft} +\long\def\NCC@separate@captag#1#2{% + \ifodd\@tempcnta + {\let\NCC@acapnum\@empty #1\@svsec\@@par}% + \fi + \ifnum\@tempcnta>\@ne + \ifnum\@tempcnta=\thr@@ \vskip .5ex\fi + \NCC@apply@cap{style}{#2}% + \fi +} +\long\def\NCC@makecapstyle@default#1{% + \setbox\@tempboxa\vtop{\hsize\linewidth\@parboxrestore#1\@@par}% + \ifdim\dp\@tempboxa<\baselineskip \centering#1% + \else \box\@tempboxa \fi +} +\long\def\NCC@makecapstyle@para#1{#1} +\long\def\NCC@makecapstyle@left#1{\raggedright#1} +\long\def\NCC@makecapstyle@right#1{\raggedleft#1} +\long\def\NCC@makecapstyle@center#1{\centering#1} +\long\def\NCC@makecapstyle@centerlast#1{% + \leftskip\z@\@plus 1fil% + \rightskip\z@\@plus -1fil% + \parfillskip\z@\@plus 2fil\relax#1% +} +\newcommand*{\RegisterFloatType}[1]{% + \edef\NCC@floatlist{\NCC@floatlist{#1}}% +} +\let\NCC@floatlist\@empty +\@onlypreamble\RegisterFloatType +\def\NCC@infloats#1{% + \@tempcnta\z@ + \let\NCC@temp \@captype + \expandafter \@tfor \expandafter \@captype + \expandafter :\expandafter =\NCC@floatlist \do + {\advance\@tempcnta\@ne #1}% + \let\@captype\NCC@temp +} +\newcommand{\DeclareSection}{\@ifstar{\NCC@dsecx}{\NCC@dsec}} +\def\NCC@dsec#1#2{% + \@ifnextchar[{\NCC@dsect{#1}{#2}}{\NCC@dsect{#1}{#2}[\z@skip]}% +} +\@onlypreamble\DeclareSection +\@onlypreamble\NCC@dsec +\def\NCC@dsect#1#2[#3]#4#5#6#7{% + \ifnum#1>\z@ + \expandafter\def\csname NCC@section\romannumeral#1\endcsname{% + \def\NCC@makesectag####1{#4####1\NCC@asecnum}% + \let\NCC@makesec\NCC@makesect + \@startsection{#2}{#1}{#3}{#5}{#6}{#7}}% + \else + \ifnum#1=\z@ + \def\NCC@mainsection{% + \NCC@startmainsec{\@hangfrom{\hskip #3}\rightskip\@flushglue}% + {#4}{#5}{#6}{#7}% + }% + \else + \NCC@dsecf{#2}{#4}{#5}{#6}{#7}% + \fi + \fi +} +\@onlypreamble\NCC@dsect +\def\NCC@dsecx#1#2#3#4#5#6{% + \ifnum#1>\z@ + \expandafter\def\csname NCC@section\romannumeral#1\endcsname{% + \def\NCC@makesectag####1{#3####1\NCC@asecnum}% + \let\NCC@makesec\NCC@makesecx + \@startsection{#2}{#1}{\z@}{#4}{#5}{#6}}% + \else + \ifnum#1=\z@ + \def\NCC@mainsection{% + \NCC@startmainsec{\NCC@sec{}\rightskip\@flushglue}% + {#3}{#4}{#5}{#6}% + }% + \else + \NCC@dsecf{#2}{#3}{#4}{#5}{#6}% + \fi + \fi +} +\@onlypreamble\NCC@dsecx +\def\NCC@dsecf#1#2#3#4#5{% + \expandafter\def\csname NCC@cap@#1\endcsname{% + \def\NCC@makesectag####1{#2{\csname #1name\endcsname}% + \nobreakspace####1\NCC@acapnum}% + \NCC@startcaption{#3}{#4}{#5}% + }% +} +\@onlypreamble\NCC@dsectf +\long\def\@makecaption#1#2{% + \begingroup + \skipwritingtoaux + \addtocounter\@captype\m@ne + \csname NCC@cap@\@captype\endcsname[]{#2}% + \endgroup +} +\AtBeginDocument{% + \@ifpackageloaded{supertabular}{% + \long\def\ST@caption#1[#2]#3{\par% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\protect\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \def\@captype{#1}% + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + }% + }{}% + \@ifpackageloaded{longtable}{% + \def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss + \parbox[t]\LTcapwidth{\def\@captype{table}% + \ifx#1\@gobble \NCC@cap@table*{#3}% + \else \@makecaption{\fnum@table}{#3}% + \fi + }% + \hss + }}% + }% + }{}% +} +\newcommand*{\DeclareTOCEntry}[5]{% + \@ifnextchar[{\NCC@dtoc{#1}{#2}{#3}{#4}{#5}}% + {\NCC@dtoc{#1}{#2}{#3}{#4}{#5}% + [{#3#4\let\NCC@do\@firstoftwo\NCC@atocnum}]}% +} +\def\NCC@dtoc#1#2#3#4#5[#6]{% + \ifnum#1<\z@ + \@tempswatrue + \NCC@infloats{% + \ifnum#1=-\@tempcnta + \expandafter\def\csname l@\@captype\endcsname + {\NCC@tocentry\z@{#2}{#3}{#4}{#5}}% + \@tempswafalse + \@break@tfor + \fi + }% + \if@tempswa + \@tempcnta#1\relax + \@tempcnta -\@tempcnta + \PackageError{nccsect} + {Float type registration number \the\@tempcnta\space + is out of range}{}% + \fi + \else + \ifnum#1>\z@ + \edef\@tempa{\noexpand\def\expandafter\noexpand + \csname l@\NCC@secname{#1}\endcsname}% + \else + \@ifundefined{chapter}{\def\@tempa{\def\l@part}}% + {\def\@tempa{\def\l@chapter}}% + \fi + \@tempa{\NCC@tocentry{#1}{#2}{#3}{#4}{#5}}% + \@tempcnta #1\relax \advance\@tempcnta\@ne + \expandafter\def\csname l@tocskip@\romannumeral\@tempcnta + \endcsname{\NCC@tocadj{#5{#6}}}% + \fi +} +\@onlypreamble\DeclareTOCEntry +\@onlypreamble\NCC@dtoc +\def\NCC@tocentry#1#2#3#4#5#6#7{% + \ifnum #1>\c@tocdepth \else + \par\begingroup\normalfont #2% + \let\applystyle\@firstoftwo + \@tempdimb\z@ \@tempcnta #1\relax + \@whilenum \@tempcnta >\z@\do + {\@nameuse{l@tocskip@\romannumeral \@tempcnta}% + \advance\@tempcnta\m@ne}% + \def\NCC@maketocnum##1{\NCC@do{#5}{}{#3##1\NCC@atocnum}}% + \settowidth\@tempdima{\let\NCC@do\@firstoftwo\NCC@maketocnum{#4}}% + \@dottedtocline{#1}{\@tempdimb}{\@tempdima}% + {\let\NCC@do\@secondoftwo#5{\ignorespaces#6\unskip}}% + {\let\applystyle\@secondoftwo#5{#7}}% + \@nobreakfalse + \endgroup + \fi +} +\def\NCC@tocadj#1{\settowidth\@tempdima{#1}\advance\@tempdimb\@tempdima} +\def\numberline#1{% + \setbox\@tempboxa\hbox{\NCC@maketocnum{#1}}% + \ifdim \wd\@tempboxa > \@tempdima + \box\@tempboxa + \else + \hb@xt@\@tempdima{\unhbox\@tempboxa\hfil}% + \fi + \ignorespaces +} +\def\NCC@maketocnum#1{#1\let\NCC@do\@secondoftwo\NCC@atocnum} +\newcommand*{\NumberlineSuffix}[2]{\def\NCC@atocnum{\NCC@do{#1}{#2}}} +\@onlypreamble\NumberlineSuffix +\newcommand*\TOCMarginDrift[1]{% + \def\@tempa{#1}% + \ifx\@tempa\@empty \let\NCC@tocdrift\@empty + \else \def\NCC@tocdrift{\@plus #1\relax}\fi +} +\TOCMarginDrift{} +\newcommand*{\PnumPrototype}[1]{\def\NCC@pnum{#1}\NCC@setpnum} +\@onlypreamble\PnumPrototype +\def\NCC@setpnum{% + \settowidth\@tempdima{\NCC@pnum}% + \edef\@pnumwidth{\the\@tempdima}% + \advance\@tempdima 1em + \edef\@tocrmarg{\the\@tempdima \noexpand\NCC@tocdrift}% +} +\newcommand\StartFromTextArea{\par + {\parskip\z@ \strut\par}\vskip -\baselineskip +} +\newcommand\StartFromHeaderArea{% + \StartFromTextArea + \vskip -\headsep \vskip -\ht\strutbox +} +\newcommand{\bff}{\normalfont\bfseries\mathversion{bold}} +\newcommand*{\startsection}[1]{% + \ifnum#1>\z@ + \def\@tempa{\csname NCC@section\romannumeral#1\endcsname}% + \else + \ifnum#1=\z@ + \def\@tempa{\NCC@mainsection}% + \else + \def\@tempa{\part}% + \fi + \fi + \@tempa +} +\def\section{\startsection\@ne} +\def\subsection{\startsection\tw@} +\def\subsubsection{\startsection\thr@@} +\def\paragraph{\startsection4} +\def\subparagraph{\startsection5} +\AtBeginDocument{% + \def\caption{% + \ifx\@captype\@undefined + \@latex@error{\noexpand\caption outside float}\@ehd + \expandafter\@gobble + \else + \expandafter\@firstofone + \fi + {\csname NCC@cap@\@captype\endcsname}% + }% + \@ifundefined{abovecaptionskip}{\def\abovecaptionskip{\z@}}% + {\abovecaptionskip\z@}% + \@ifundefined{belowcaptionskip}{\def\belowcaptionskip{\z@}}% + {\belowcaptionskip\z@}% +} +\RegisterFloatType{figure} +\RegisterFloatType{table} +\DeclareSection{-2}{table}{}{\z@}{10pt}{} +\DeclareSection{-1}{figure}{}{10pt}{\z@}{} +\DeclareSection*1{section}{}% + {3.5ex \@plus 1ex \@minus .2ex}% + {2.3ex \@plus .2ex}{\Large\bff} +\DeclareSection*2{subsection}{}% + {3.25ex \@plus 1ex \@minus .2ex}% + {1.5ex \@plus .2ex}{\large\bff} +\DeclareSection*3{subsubsection}{}% + {3ex \@plus 1ex \@minus .2ex}% + {1.5ex \@plus .2ex}{\normalsize\bff} +\DeclareSection4{paragraph}{}% + {\NCC@runskip}{-1em}{\normalsize\bff} +\DeclareSection5{subparagraph}[\parindent]{}% + {\NCC@runskip}{-1em}{\normalsize\bff} +\@ifundefined{chapter}{ + \def\part{\startsection\z@} + \DeclareSection*0{part}{\Large\bff}% + {5ex \@plus 1ex \@minus .2ex}% + {4ex \@plus .2ex}{\huge\bff} + \DeclareTOCEntry{-2}{}{}{9}{}% table + \DeclareTOCEntry{-1}{}{}{9}{}% figure + \DeclareTOCEntry0{\runinsectionskip\def\@dotsep{1000}}{}{III}{\bff}[] + \DeclareTOCEntry1{\runinsectionskip}{}{9}{} + \DeclareTOCEntry2{}{}{9.9}{} + \DeclareTOCEntry3{}{}{9.9.9}{} +}{ + \def\chapter{\startsection\z@} + \DeclareSection*0{chapter}{\vspace{3ex}\huge\bff}{10ex}% + {8ex \@plus .2ex}{\Huge\bff} + \DeclareTOCEntry{-2}{}{}{9.9}{}% table + \DeclareTOCEntry{-1}{}{}{9.9}{}% figure + \DeclareTOCEntry0{\runinsectionskip\def\@dotsep{1000}% + \aftergroup\penalty\aftergroup\@highpenalty}{}{9}{\bff} + \DeclareTOCEntry1{}{}{9.9}{}[9.9] + \DeclareTOCEntry2{}{}{9.9.9}{}[9.9.9] + \DeclareTOCEntry3{}{}{}{}[\qquad] + \epigraphparameters{\StartFromHeaderArea\small\raggedleft}% + {.45\linewidth}{5\baselineskip}% + {\raggedleft\itshape}{\vspace{2ex}} +} +\DeclareTOCEntry4{}{}{}{}[\qquad] +\DeclareTOCEntry5{}{}{}{}[\qquad] +\noindentaftersection +\sectionstyle{hangindent} +\SectionTagSuffix{\quad} +\captionwidth{\linewidth} +\captionstyle{default} +\captiontagstyle{para} +\CaptionTagSuffix{:\hskip .7em \@plus .2em \@minus .1em} +\NumberlineSuffix{\quad}{\enskip} +\PnumPrototype{99} +\endinput +%% +%% End of file `nccsect.sty'. |