diff options
author | Norbert Preining <preining@logic.at> | 2006-10-04 08:43:01 +0000 |
---|---|---|
committer | Norbert Preining <preining@logic.at> | 2006-10-04 08:43:01 +0000 |
commit | ba9472aebfed07843bc4faa00c7b96bc86194691 (patch) | |
tree | 4a952a012e2f1663beaac6384dec265fb50dd361 /Master/texmf-dist/tex/latex/ncctools | |
parent | a88bdfe70c672cfced299babf0a54881a916bcca (diff) |
Fix ctan2tds for pgf installation
comment powerdot-doc-vn in tpm-ctan-check, it always breaks
Update of the following packages:
labelcas pstricks-add sectionbox ltxmisc frenchle flowfram verse emulateapj
pst-pdf poemscol babelbib dk-bib breakurl screenplay ncctools xkeyval bibleref
muthesis pst-labo pgf ncclatex active-conf xcolor commath lineno dottex makeplo
git-svn-id: svn://tug.org/texlive/trunk@2240 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ncctools')
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/afterpackage.sty | 60 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/nccfloats.sty | 68 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/nccsect.sty | 520 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/textarea.sty | 112 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/ncctools/topsection.sty | 58 |
5 files changed, 682 insertions, 136 deletions
diff --git a/Master/texmf-dist/tex/latex/ncctools/afterpackage.sty b/Master/texmf-dist/tex/latex/ncctools/afterpackage.sty new file mode 100644 index 00000000000..459f0664d12 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ncctools/afterpackage.sty @@ -0,0 +1,60 @@ +%% +%% This is file `afterpackage.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% afterpackage.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: afterpackage.dtx Copyright (C) 2005, 2006 by Alexander I. Rozhenko +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{afterpackage} + [2006/01/17 v1.1 Apply Commands After Package (NCC)] +\newcommand*\AfterPackage[1]{% + \expandafter\ifx\csname ver@#1.\@pkgextension\endcsname\relax + \@ifundefined{#1.\@pkgextension-@dd}{% + \expandafter\let\csname#1.\@pkgextension-@dd\endcsname\@empty + \expandafter\@onlypreamble\csname#1.\@pkgextension-@dd\endcsname + }{}% + \wlog{After Package Info: Collect commands for #1\on@line}% + \def\@tempa{% + \expandafter\g@addto@macro\csname#1.\@pkgextension-@dd\endcsname}% + \else + \ATP@apply@info{#1}% + \let\@tempa\@firstofone + \fi + \@tempa +} +\@onlypreamble\AfterPackage +\let\ATP@popfilename\@popfilename +\@onlypreamble\ATP@popfilename +\def\@popfilename{% + \@ifundefined{\@currname.\@currext-@dd}{}{% + \ATP@apply@info{\@currname}% + \csname\@currname.\@currext-@dd\endcsname + \expandafter\let\csname\@currname.\@currext-@dd\endcsname\relax + }% + \ATP@popfilename +} +\def\ATP@apply@info#1{% + \wlog{After Package Info: Apply commands to #1\on@line}% +} +\@onlypreamble\ATP@apply@info +\endinput +%% +%% End of file `afterpackage.sty'. diff --git a/Master/texmf-dist/tex/latex/ncctools/nccfloats.sty b/Master/texmf-dist/tex/latex/ncctools/nccfloats.sty index 0f32a39859e..039bf65aa9a 100644 --- a/Master/texmf-dist/tex/latex/ncctools/nccfloats.sty +++ b/Master/texmf-dist/tex/latex/ncctools/nccfloats.sty @@ -20,23 +20,32 @@ %% For the copying and distribution conditions of the source files, %% see the README file distributed with the ncctools bundle. %% -%% File: nccfloats.dtx Copyright (C) 2002--2004 by Alexander I. Rozhenko +%% File: nccfloats.dtx Copyright (C) 2002--2006 by Alexander I. Rozhenko %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{nccfloats} - [2004/12/05 v1.1 More Float Management (NCC)] + [2006/01/07 v1.2 More Float Management (NCC)] \RequirePackage{nccboxes}[2002/03/20] -\newcommand*{\FloatStyle}[1]{\def\NCC@fltstyle{#1}} +\newcommand*{\FloatStyle}[2][]{% + \expandafter\def\csname NCC@fltstyle@#1\endcsname{#2}} \@onlypreamble\FloatStyle -\newcommand{\minifig}{\begingroup\def\@captype{figure}\NCC@minifloat} -\newcommand{\minitabl}{\begingroup\def\@captype{table}\NCC@minifloat} +\def\NCC@setfltstyle#1{% + \edef\@tempa{NCC@fltstyle@#1\@captype}% + \@ifundefined{\@tempa}{\NCC@fltstyle@}{\csname\@tempa\endcsname}% +} +\g@addto@macro\@floatboxreset{\NCC@setfltstyle{}} +\newcommand\normalfloatstyle{% + \leftskip\z@skip \rightskip\z@skip \@rightskip\z@skip + \parfillskip\@flushglue \let\\\@normalcr + \reset@font \normalsize +} \newcommand*\NCC@minifloat[1][c]{% \@ifnextchar[{\NCC@mflt{#1}}{\NCC@@mflt{#1}\relax[s]}} \def\NCC@mflt#1[#2]{% \@ifnextchar[{\NCC@@mflt{#1}{#2}}{\NCC@mflt{#1}{#2}[#1]}} \long\def\NCC@@mflt#1#2[#3]#4#5{% - \@iiiminipage{#1}{#2}[#3]{#4}\normalfont - \NCC@fltstyle #5\endminipage\endgroup + \@iiiminipage{#1}{#2}[#3]{#4}\normalfloatstyle + \NCC@setfltstyle{mini}#5\endminipage\endgroup } \def\NCC@pair#1#2#3#4{\setlength\@tempdimc{#3}% \@ifstar{\NCC@pair@{#2}{#4}}{\NCC@pair@{#1}{#4}}} @@ -45,10 +54,7 @@ \@ifnextchar({\NCC@pair@@@}{\NCC@@pair()()}} \def\NCC@pair@@@(#1){\@ifnextchar({\NCC@@pair(#1)}{\NCC@@pair(#1)()}} \def\NCC@@pair(#1)(#2){\@tempa{#1}{#2}} -\def\NCC@setwidth#1#2{% - \afterassignment\NCC@setwidth@#1#2\unitlength\relax -} -\def\NCC@setwidth@#1\relax{} +\def\NCC@setwidth#1#2{\@defaultunits#1#2\unitlength\relax\@nnil} \def\NCC@wcalc#1#2{% \if!#1!\@tempdima .5\linewidth \advance\@tempdima -.5\@tempdimc \else \NCC@setwidth\@tempdima{#1}% @@ -68,8 +74,6 @@ \expandafter\@secondoftwo \fi } -\newcommand{\sidefig}{\NCC@sidemfloat{\minifig}} -\newcommand{\sidetabl}{\NCC@sidemfloat{\minitabl}} \def\NCC@sidemfloat#1{% \NCC@smfltleftfalse \if@twocolumn \else @@ -115,29 +119,45 @@ \@tempdima\ht\@tempboxa \advance\@tempdima -\ht\strutbox \noindent \raise-\@tempdima\box\@tempboxa } -\newcommand{\fig}{\NCC@float{figure}} -\newcommand{\tabl}{\NCC@float{table}} -\def\NCC@float#1{\@ifstar{\NCC@flt{#1*}}{\NCC@flt{#1}}} -\def\NCC@flt#1{\@ifnextchar[{\NCC@flt@{#1}}{\NCC@flt@{#1}[ht]}} -\def\NCC@flt@#1[#2]{\begin{#1}[#2]\centering +\def\NCC@float#1#2{\@ifstar{\NCC@flt{#1*}{#2}}{\NCC@flt{#1}{#2}}} +\def\NCC@flt#1#2{\@ifnextchar[{\NCC@flt@{#1}}{\NCC@flt@{#1}[#2]}} +\def\NCC@flt@#1[#2]{\begin{#1}[#2]\normalfloatstyle\centering \@ifnextchar({\NCC@@flt{#1}}{\NCC@@flt{#1}()}} \long\def\NCC@@flt#1(#2)#3{% \if!#2!\@tempdima\linewidth \else \NCC@setwidth\@tempdima{#2}\fi \begingroup\NCC@minifloat[c]\@tempdima{#3}% \end{#1}% } -\newcommand{\figs}{\NCC@floats{figure}b} -\newcommand{\tabls}{\NCC@floats{table}t} -\def\NCC@floats#1#2{% - \NCC@pair{\NCC@@flts{#1}{#2}}{\NCC@@flts{#1*}{#2}}{1em}{ht}} +\def\NCC@floats#1#2#3{% + \NCC@pair{\NCC@@flts{#1}{#2}}{\NCC@@flts{#1*}{#2}}{1em}{#3}} \long\def\NCC@@flts#1#2#3#4#5#6#7{% - \begin{#1}[#3]\NCC@wcalc{#4}{#5}% + \begin{#1}[#3]\normalfloatstyle\NCC@wcalc{#4}{#5}% \begingroup\NCC@minifloat[#2]\@tempdima{#6}% \nobreak\hskip\@tempdimc \begingroup\NCC@minifloat[#2]\@tempdimb{#7}% \end{#1}% } -\FloatStyle{\footnotesize\centering} +\newcommand*\newminifloat[4]{% + \edef\@tempa{% + \noexpand\newcommand\expandafter\noexpand\csname mini#1\endcsname{% + \noexpand\begingroup\noexpand\def\noexpand\@captype{#2}% + \noexpand\NCC@minifloat}% + \noexpand\newcommand\expandafter\noexpand\csname side#1\endcsname{% + \noexpand\NCC@sidemfloat{% + \expandafter\noexpand\csname mini#1\endcsname}}% + \noexpand\newcommand\expandafter\noexpand\csname #1\endcsname{% + \noexpand\NCC@float{#2}{#3}}% + \noexpand\newcommand\expandafter\noexpand\csname #1s\endcsname{% + \noexpand\NCC@floats{#2}{#4}{#3}}% + }% + \@tempa +} +\@onlypreamble\newminifloat +\newminifloat{fig}{figure}{ht}{b} +\newminifloat{tabl}{table}{ht}{t} +\FloatStyle{} +\FloatStyle[minifigure]{\footnotesize\centering} +\FloatStyle[minitable]{\footnotesize\centering} \endinput %% %% End of file `nccfloats.sty'. diff --git a/Master/texmf-dist/tex/latex/ncctools/nccsect.sty b/Master/texmf-dist/tex/latex/ncctools/nccsect.sty index bc8c6349896..413a5394627 100644 --- a/Master/texmf-dist/tex/latex/ncctools/nccsect.sty +++ b/Master/texmf-dist/tex/latex/ncctools/nccsect.sty @@ -20,11 +20,12 @@ %% 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 +%% File: nccsect.dtx Copyright (C) 2002--2006 by Alexander I. Rozhenko %% \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{nccsect} - [2005/06/15 v1.3 Extended Section, Caption, and TOC Handling (NCC)] + [2006/01/19 v1.5 Extended Section, Caption, and TOC Handling (NCC)] +\RequirePackage{afterpackage} \@ifpackageloaded{nccthm}{}{% \def\NCC@secskip#1{% \if@noskipsec \leavevmode \fi \par @@ -114,138 +115,234 @@ \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 +\newcommand*\sectiontagsuffix[2][]{% + \expandafter\def\csname NCC@asecnum@#1\endcsname{\def\NCC@asecnum{#2}}% +} +\let\NCC@asecnum@\@empty +\def\NCC@setsectionsuffix#1{% + \edef\@tempa{NCC@asecnum@\NCC@secname{#1}}% + \@ifundefined{\@tempa}{% + \let\NCC@asecnumset\NCC@asecnum@ + }{% + \expandafter\let\expandafter\NCC@asecnumset\csname\@tempa\endcsname + }% +} +\newcommand*{\RunningSectionSuffix}[1]{\def\NCC@asectitle{\unskip#1}} +\@onlypreamble\RunningSectionSuffix +\def\NCC@preparesectag#1#2{\def\NCC@makesectag##1{#1#2##1\NCC@asecnum}} \def\NCC@secname#1{% - \ifcase#1\relax \or section\or subsection\or subsubsection\or + \ifcase#1main\or section\or subsection\or subsubsection\or paragraph\or subparagraph\else section@\romannumeral#1\fi } -\def\@startsection#1#2#3#4#5#6{% +\def\NCC@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}}% + \secdef{\NCC@sect{#1}{#2}{#3}{#4}{#5}{#6}}{\NCC@ssect{#3}{#4}{#5}{#6}}% } -\def\@ssect#1#2#3#4#5{% +\def\NCC@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@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}% + \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}% + \NCC@asecnumset + \NCC@secttitle{#2}{\NCC@hangfrom{\hskip #1\relax\@svsec}}% + {\interlinepenalty \@M\ignorespaces #3\@@par} \endgroup #5% \else - \def\@svsechd{{\normalfont #2{\hskip #1\relax - \@svsec\ignorespaces #3}}#5}% + \def\@svsechd{{\normalfont + \NCC@asecnumset + \def\norunningsuffix{\protect\NCC@nosecsuffix}% + \NCC@secptitle{#2}{\hskip #1\relax{\@svsec}}% + {\ignorespaces #3\NCC@asectitle}#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@secttitle#1#2#3{#1{#2#3}} +\def\NCC@secptitle#1#2#3{#1{#2#3}} +\newcommand*\norunningsuffix{} +\def\NCC@nosecsuffix{\let\NCC@asectitle\@empty} +\def\NCC@hangfrom{% + \NCC@setsecmargins{\z@skip}{\z@skip}\NCC@hangsecstyle{\z@}{}% +} +\def\NCC@setsecmargins#1#2{% + \leftskip\z@skip \rightskip\z@skip + \parfillskip\@flushglue + \let\\\@normalcr + \NCC@adjsecmargins{#1}{#2}% + \NCC@secmarginshook +} +\def\NCC@adjsecmargins#1#2{% + \setlength\@tempskipa{#1}\advance\leftskip\@tempskipa + \setlength\@tempskipb{#2}\advance\rightskip\@tempskipb + \advance\@tempskipa -1\@tempskipa \advance\@tempskipb -1\@tempskipb + \advance\@tempskipa -\@tempskipb \advance\parfillskip\@tempskipa +} +\def\NCC@hangsecstyle#1#2#3{% + \setlength\@tempdima{#1}% + \setbox\@tempboxa\hbox{#3}% + \ifdim \wd\@tempboxa > \@tempdima + \hangindent\wd\@tempboxa \noindent \box\@tempboxa + \else + \hangindent\@tempdima + \noindent \makebox[\@tempdima][#2]{\unhbox\@tempboxa}% + \fi +} +\newcommand*\adjustsectionmargins[2]{% + \NCC@global\def\NCC@secmarginshook{\NCC@adjsecmargins{#1}{#2}} } -\def\NCC@sec@hangindent{\def\NCC@sec##1{\@hangfrom{##1}}} -\@namedef{NCC@sec@hangindent*}{% - \def\NCC@sec##1{\@hangfrom{##1}\rightskip\@flushglue}% +\g@addto@macro\NCC@sec@reset@controls{% + \NCC@global\let\NCC@secmarginshook\@empty } -\def\NCC@sec@parindent{\def\NCC@sec##1{\@hangfrom\indent##1}} -\@namedef{NCC@sec@parindent*}{% - \def\NCC@sec##1{\@hangfrom\indent\rightskip\@flushglue##1}% +\let\NCC@secmarginshook\@empty +\newcommand*\newplainsectionstyle[2]{% + \@ifnextchar[{\NCC@newplainsec{#1}{#2}}{\NCC@newplainsec{#1}{#2}[l]}% +} +\def\NCC@newplainsec#1#2[#3]#4#5{% + \def\@tempa{#3}\def\@tempb{c}% + \ifx\@tempa\@tempb + \expandafter\newcommand\csname NCC@sec@#1\endcsname + {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}% + \let\\\@centercr \advance\parfillskip -\@flushglue + \setlength\parindent{#2}}}% + \else + \def\@tempb{r}% + \ifx\@tempa\@tempb + \expandafter\newcommand\csname NCC@sec@#1\endcsname + {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}% + \let\\\@centercr \advance\parfillskip -\@flushglue + \advance\parfillskip -\@flushglue + \setlength\parindent{#2}}}% + \else + \expandafter\newcommand\csname NCC@sec@#1\endcsname + {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}\setlength\parindent{#2}}}% + \fi + \fi +} +\@onlypreamble\newplainsectionstyle +\@onlypreamble\NCC@newplainsec +\newcommand*\newhangsectionstyle[2]{% + \@ifnextchar[{\NCC@newhangsec{#1}{#2}}{\NCC@newhangsec{#1}{#2}[l]}% +} +\def\NCC@newhangsec#1#2[#3]#4#5{% + \expandafter\newcommand\csname NCC@sec@#1\endcsname + {\def\NCC@sec{\NCC@setsecmargins{#4}{#5}\NCC@hangsecstyle{#2}{#3}}}% +} +\@onlypreamble\newhangsectionstyle +\@onlypreamble\NCC@newhangsec +\newhangsectionstyle{hangindent}{\z@}{\z@skip}{\z@skip} +\newhangsectionstyle{hangindent*}{\z@}{\z@skip}{\@flushglue} +\newhangsectionstyle{hangparindent}{\z@}{\parindent}{\z@skip} +\newhangsectionstyle{hangparindent*}{\z@}{\parindent}{\@flushglue} +\newplainsectionstyle{parindent}{\z@}{\parindent}{\z@skip} +\newplainsectionstyle{parindent*}{\z@}{\parindent}{\@flushglue} +\newplainsectionstyle{center}{\z@}[c]{\@flushglue}{\@flushglue} +\newplainsectionstyle{centerlast}{\z@}[c]{\@flushglue}{-\@flushglue} +\newcommand*{\sectionstyle}[2][]{% + \@ifundefined{NCC@sec@#2}{% + \PackageError{nccsect}{Unknown section style `#2'}{}% + }{% + \expandafter\def\csname NCC@secstyle@#1\endcsname{% + \csname NCC@sec@#2\endcsname + }% + }% +} +\def\NCC@setsectionstyle#1{% + \edef\@tempa{NCC@secstyle@\NCC@secname{#1}}% + \@ifundefined{\@tempa}{\NCC@secstyle@}{\csname\@tempa\endcsname}% } -\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}% + \NCC@asecnumset + \NCC@secxtitle{#2}{\protect\NCC@sec{\@svsec}} + {\interlinepenalty \@M\ignorespaces #3\@@par}% \endgroup #5% \par \nobreak \vskip #4\relax \@afterheading \ignorespaces } +\def\NCC@secxtitle#1#2#3{#1{#2#3}} +\providecommand*\partmark[1]{\markboth{}{}} \@ifundefined{chapter}{% \def\NCC@startmainsec#1#2#3#4#5{% - \def\NCC@makesectag##1{\leavevmode#2\partname\nobreakspace##1}% + \NCC@preparesectag{\leavevmode#2}{\partname\nobreakspace}% \NCC@secskip{#3}% - \secdef{\@part{#1}{#4}{#5}}{\@spart{#1}{#4}{#5}}% + \secdef{\NCC@part{#1}{#4}{#5}}{\NCC@spart{#1}{#4}{#5}}% } - \def\@spart#1#2#3#4{% + \def\NCC@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@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 + \ifnum \c@secnumdepth>\m@ne \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}% + \NCC@asecnumset + \NCC@makeparttitle{#1}{#2}{#3}% \endgroup #5% \par\nobreak \vskip #4\relax \@afterheading \ignorespaces } - \providecommand*\partmark[1]{\markboth{}{}} + \def\NCC@makeparttitle#1#2#3{% + \ifx\@svsec\@empty \else + \NCC@secmain#1{\let\NCC@asecnum\@empty\@svsec\@@par}\nobreak + \fi + \interlinepenalty \@M \NCC@secmain#1{#2{#3\@@par}}% + } + \def\NCC@partsection{\NCC@mainsection} }{ \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}}% + \NCC@preparesectag{\leavevmode#2}{\@chapapp\nobreakspace}% + \secdef{\NCC@chapter{#1}{#3}{#4}{#5}}{\NCC@schapter{#1}{#3}{#4}{#5}}% } - \newcommand\beforechapter[1]{\gdef\NCC@beforechapter{#1}} - \beforechapter{} - \def\@schapter#1#2#3#4#5{% + \def\NCC@startchap{% + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}\global\@topnum\z@ + } + \def\NCC@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{% + \def\NCC@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 + \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@ } + \newcommand\beforechapter[1]{\gdef\NCC@beforechapter{#1}} + \beforechapter{} \def\NCC@thetocchapter{\thechapter} \def\NCC@makechapter#1#2#3#4#5#6{% \if@twocolumn @@ -253,13 +350,25 @@ \else \NCC@makechaphead{#1}{#2}{#3}{#4}{#5}% \fi - #6% + \NCC@makechapfinal{#6}% \@afterheading \ignorespaces } + \let\NCC@makechapfinal\@firstofone + \def\NCC@makechapfinalgobble#1{% + \let\NCC@makechapmark\NCC@makemark + \def\NCC@makemark{% + \let\NCC@temp\@chapapp + \let\@chapapp\@gobble + \NCC@makechapmark + \let\@chapapp\NCC@temp + }% + #1% + } + \@onlypreamble\NCC@makechapfinalgobble \def\NCC@makechaphead#1#2#3#4#5{% \ifx\NCC@beforechapter\@empty - \StartFromTextArea \vspace{#2}% + \StartFromTextArea \vskip #2% \else \begingroup \@twocolumnfalse @@ -270,11 +379,17 @@ \beforechapter{}% \fi \begingroup \normalfont - \ifx\@svsec\@empty \else #1{\@svsec\@@par}\fi - \interlinepenalty \@M #1{#3{#4}\@@par}% + \NCC@asecnumset + \NCC@makechaptitle{#1}{#3}{#4}% \endgroup \par\nobreak \vskip #5\relax } + \def\NCC@makechaptitle#1#2#3{% + \ifx\@svsec\@empty \else + \NCC@secmain#1{\let\NCC@asecnum\@empty\@svsec\@@par}% + \fi + \interlinepenalty \@M \NCC@secmain#1{#2{#3\@@par}}% + } \newcommand*\epigraph[1][\NCC@epigraphwidth]{\NCC@epigraph{#1}} \newcommand*\epigraphparameters[5]{% \def\NCC@epigraphwidth{#2}% @@ -298,9 +413,60 @@ \leavevmode\box\@tempboxa \@end@tempboxa } + \def\NCC@startpart{% + \if@openright\cleardoublepage\else\clearpage\fi + \thispagestyle{plain}% + } + \def\NCC@spart#1#2#3#4{% + \let\@svsec\@empty + \NCC@makepart{#1}{#3}{#4}{#2}{}% + \NCC@sec@reset@controls + } + \def\NCC@part#1#2#3[#4]#5{% + \def\NCC@make{\NCC@makepart{#1}{#3}{#5}{#2}}% + \NCC@makesection{part}{\m@ne}{#4}{% + \addcontentsline{toc}{part}{% + \ifnum \c@secnumdepth>-2 + \numberline{\NCC@thetocpart}\fi + #4% + }% + }% + } + \def\NCC@thetocpart{\thepart} + \def\NCC@makepart#1#2#3#4#5{% + \if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi + \begingroup\normalfont + \NCC@asecnum@ + \NCC@makeparttitle{#1}{#2}{#3}% + \endgroup + \NCC@makepartfinal{#5}#4% + \if@tempswa \twocolumn \fi + } + \let\NCC@makepartfinal\@firstofone + \def\NCC@makepartfinalgobble#1{% + \let\NCC@makepartmark\NCC@makemark + \def\NCC@makemark{% + \let\NCC@temp\partname + \let\partname\@gobble + \NCC@makepartmark + \let\partname\NCC@temp + }% + #1% + } + \@onlypreamble\NCC@makepartfinalgobble + \def\NCC@makeparttitle#1#2#3{#1% + \ifx\@svsec\@empty \else + {\let\NCC@asecnum\@empty\@svsec\@@par}\nobreak \fi + \interlinepenalty \@M #2{#3\@@par} + } } \newcommand*{\CaptionTagSuffix}[1]{\def\NCC@acapnum{#1}} \@onlypreamble\CaptionTagSuffix +\newcommand*\captiontagsuffix[2][]{% + \NCC@prepare@capkey{suffix}{#1}{\def\NCC@acapnum{#2}}% +} +\let\NCC@capsuffix@\@empty + \newcommand*\captionstyle[1][]{% \NCC@set@capkey{style}{style}{#1}% } @@ -308,7 +474,7 @@ \NCC@set@capkey{tag}{tag style}{#1}% } \newcommand*\captionwidth[2][]{% - \NCC@prepare@capkey{width}{#1}{\setlength{\hsize}{#2}}% + \NCC@prepare@capkey{width}{#1}{\setlength{\@tempdima}{#2}}% } \def\NCC@set@capkey#1#2#3#4{% \@ifundefined{NCC@makecap#1@#4} @@ -340,7 +506,6 @@ \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}}% @@ -349,12 +514,11 @@ \let\centering\@empty \addcontentsline{\@nameuse{ext@\@captype}}{\@captype}{% \ifnum \c@secnumdepth>\m@ne - \protect\numberline{\@nameuse{the\@captype}}\fi + \numberline{\@nameuse{the\@captype}}\fi #4% }% \endgroup }% - \NCC@defaultsectag } \long\def\NCC@makecaption#1#2#3#4#5{% \begingroup\par\normalfont @@ -363,14 +527,37 @@ \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 + \NCC@apply@cap{suffix}% + \NCC@apply@cap{width}% + \NCC@vtopcap{\@parboxrestore\NCC@apply@cap{tag}{#3}\@@par}\par \setlength\@tempskipa{#4}% \ifdim\@tempskipa=\z@ \else \vskip \@tempskipa\fi \fi \endgroup #5% } +\def\NCC@vtopcap#1{% + \ifdim\@tempdima>\linewidth + \@tempskipa \leftskip \advance\@tempskipa -1\@tempskipa + \@tempskipb \rightskip \advance\@tempskipb \parfillskip + \advance\@tempskipb -1\@tempskipb + \vtop{\hb@xt@\linewidth{% + \NCC@ifzeroskip\@tempskipa{}{\hss}% + \vtop{\hsize\@tempdima#1}% + \NCC@ifzeroskip\@tempskipb{}{\hss}% + }}% + \else + \vtop{\hsize\@tempdima#1}% + \fi +} +\def\NCC@ifzeroskip#1{% + \edef\@tempa{\the#1}\edef\@tempb{\the\z@skip}% + \ifx\@tempa\@tempb + \expandafter\@firstoftwo + \else + \expandafter\@secondoftwo + \fi +} \long\def\NCC@makecaptag@para#1{% \ifnum\@tempcnta<\thr@@ \let\NCC@acapnum\@empty\fi \NCC@apply@cap{style}{{\@svsec}\ignorespaces#1}% @@ -397,8 +584,7 @@ \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% + \leftskip\@flushglue \rightskip -\@flushglue \parfillskip\z@\@plus 2fil\relax#1% } \newcommand*{\RegisterFloatType}[1]{% @@ -423,13 +609,18 @@ \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}% + \NCC@setsectionsuffix{#1}% + \NCC@preparesectag{#4}{}% \let\NCC@makesec\NCC@makesect - \@startsection{#2}{#1}{#3}{#5}{#6}{#7}}% + \NCC@startsection{#2}{#1}{#3}{#5}{#6}{#7}}% \else \ifnum#1=\z@ \def\NCC@mainsection{% - \NCC@startmainsec{\@hangfrom{\hskip #3}\rightskip\@flushglue}% + \NCC@setsectionsuffix\z@ + \let\NCC@secmain\@empty + \NCC@startmainsec{% + \NCC@hangfrom{\hskip #3}\NCC@adjsecmargins{}\@flushglue + \ignorespaces}% {#4}{#5}{#6}{#7}% }% \else @@ -441,14 +632,19 @@ \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}% + \NCC@setsectionsuffix{#1}% + \NCC@setsectionstyle{#1}% + \NCC@preparesectag{#3}{}% \let\NCC@makesec\NCC@makesecx - \@startsection{#2}{#1}{\z@}{#4}{#5}{#6}}% + \NCC@startsection{#2}{#1}{\z@}{#4}{#5}{#6}}% \else \ifnum#1=\z@ \def\NCC@mainsection{% - \NCC@startmainsec{\NCC@sec{}\rightskip\@flushglue}% - {#3}{#4}{#5}{#6}% + \NCC@setsectionsuffix\z@ + \NCC@setsectionstyle\z@ + \let\NCC@secsave\NCC@sec \let\NCC@sec\NCC@secflush + \def\NCC@secmain{\protect\NCC@sec{}}% + \NCC@startmainsec{}{#3}{#4}{#5}{#6}% }% \else \NCC@dsecf{#2}{#3}{#4}{#5}{#6}% @@ -456,6 +652,17 @@ \fi } \@onlypreamble\NCC@dsecx +\def\NCC@secflush#1{\NCC@secsave{#1}% + \@tempskipa\leftskip \advance\@tempskipa\rightskip + \advance\@tempskipa -1\@tempskipa + \NCC@ifzeroskip\@tempskipa{% + \@tempskipa 1\rightskip \advance\@tempskipa -\rightskip + \advance\@tempskipa \@flushglue + \advance\rightskip \@tempskipa + \advance\parfillskip -\@tempskipa + }{}% + \ignorespaces +} \def\NCC@dsecf#1#2#3#4#5{% \expandafter\def\csname NCC@cap@#1\endcsname{% \def\NCC@makesectag####1{#2{\csname #1name\endcsname}% @@ -464,6 +671,16 @@ }% } \@onlypreamble\NCC@dsectf +\@ifundefined{chapter}{}{% + \newcommand\DeclarePart[4]{% + \def\NCC@partsection{% + \NCC@startpart + \NCC@preparesectag{\leavevmode#3}{\partname\nobreakspace}% + \secdef{\NCC@part{#1}{#2}{#4}}{\NCC@spart{#1}{#2}{#4}}% + }% + } + \@onlypreamble\DeclarePart +} \long\def\@makecaption#1#2{% \begingroup \skipwritingtoaux @@ -471,32 +688,44 @@ \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}}% +\AfterPackage{supertabular}{% + \long\def\ST@caption#1[#2]#3{\par% + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup\centering \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 - }}% - }% - }{}% + \endgroup + } +} +\AfterPackage{xtab}{% + \long\def\ST@caption#1[#2]#3{\par% + \@initisotab + \addcontentsline{\csname ext@#1\endcsname}{#1}% + {\numberline{\csname the#1\endcsname}{\ignorespaces #2}}% + \begingroup\centering + \def\@captype{#1}% + \@makecaption{\csname fnum@#1\endcsname}{\ignorespaces #3}\par + \endgroup + \global\advance\ST@pageleft -\PWSTcapht + \ST@trace\tw@{Added caption. Space left for xtabular: \the\ST@pageleft}% + } +} +\AfterPackage{longtable}{% + \def\LT@makecaption#1#2#3{% + \LT@mcol\LT@cols c{\hbox to\z@{\hss + \parbox[t]\LTcapwidth{\centering\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}]}% + {\NCC@dtoc{#1}{#2}{#3}{#4}{#5}[\NCC@nexttocnum{#3}{#4}]}% } \def\NCC@dtoc#1#2#3#4#5[#6]{% \ifnum#1<\z@ @@ -512,7 +741,7 @@ \if@tempswa \@tempcnta#1\relax \@tempcnta -\@tempcnta - \PackageError{nccsect} + \PackageError{nccsect}% {Float type registration number \the\@tempcnta\space is out of range}{}% \fi @@ -527,11 +756,35 @@ \@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}}}% + \endcsname{\NCC@tocadj{\NCC@tocnumprototype{#5}{#6}}}% \fi } \@onlypreamble\DeclareTOCEntry \@onlypreamble\NCC@dtoc +\def\NCC@nexttocnum#1#2{#1#2\NCC@atocnum} +\def\NCC@tocnumprototype#1#2{\let\applystyle\@firstoftwo#1{#2}} +\def\NCC@tocadj#1{% + \settowidth\@tempdima{\let\NCC@atocdo\@firstoftwo#1}% + \advance\@tempdimb\@tempdima +} +\@ifundefined{chapter}{}{% + \newcommand*\DeclareTOCPart[1]{% + \@ifnextchar[{\NCC@dtocpart{#1}}{\NCC@dtocpart{#1}[\NCC@runskip]}% + } + \def\NCC@dtocpart#1[#2]#3#4#5{% + \def\l@part##1##2{% + \NCC@tocentry{-1}{% + \TOCMarginDrift{1fil}% + \addpenalty{-\@highpenalty}#1% + }{#3}{#4}{#5}{##1}{\hss##2}% + \nobreak \vskip #2\relax + \@nobreaktrue + \everypar{\@nobreakfalse\everypar{}}% + }% + } + \@onlypreamble\DeclareTOCPart + \@onlypreamble\NCC@dtocpart +} \def\NCC@tocentry#1#2#3#4#5#6#7{% \ifnum #1>\c@tocdepth \else \par\begingroup\normalfont #2% @@ -540,17 +793,20 @@ \@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}}% + \NCC@preparetocnum{#5}{#3}% + \settowidth\@tempdima{\let\NCC@atocdo\@firstoftwo\NCC@maketocnum{#4}}% \@dottedtocline{#1}{\@tempdimb}{\@tempdima}% - {\let\NCC@do\@secondoftwo#5{\ignorespaces#6\unskip}}% + {\let\NCC@atocdo\@secondoftwo\NCC@tocentrytitle{#5}{#6\unskip}}% {\let\applystyle\@secondoftwo#5{#7}}% \@nobreakfalse \endgroup \fi } -\def\NCC@tocadj#1{\settowidth\@tempdima{#1}\advance\@tempdimb\@tempdima} -\def\numberline#1{% +\def\NCC@preparetocnum#1#2{% + \def\NCC@maketocnum##1{\NCC@atocdo{#1}{}{#2##1\NCC@atocnum}}% +} +\def\NCC@tocentrytitle#1#2{#1{\ignorespaces#2}} +\DeclareRobustCommand*\numberline[1]{% \setbox\@tempboxa\hbox{\NCC@maketocnum{#1}}% \ifdim \wd\@tempboxa > \@tempdima \box\@tempboxa @@ -559,15 +815,15 @@ \fi \ignorespaces } -\def\NCC@maketocnum#1{#1\let\NCC@do\@secondoftwo\NCC@atocnum} -\newcommand*{\NumberlineSuffix}[2]{\def\NCC@atocnum{\NCC@do{#1}{#2}}} +\def\NCC@maketocnum#1{#1\NCC@atocnum} +\let\NCC@atocdo\@secondoftwo +\newcommand*{\NumberlineSuffix}[2]{\def\NCC@atocnum{\NCC@atocdo{#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{% @@ -576,14 +832,30 @@ \advance\@tempdima 1em \edef\@tocrmarg{\the\@tempdima \noexpand\NCC@tocdrift}% } -\newcommand\StartFromTextArea{\par - {\parskip\z@ \strut\par}\vskip -\baselineskip +\newcommand*{\SetTOCStyle}[1]{\def\NCC@tocstyle{#1}} +\@onlypreamble\SetTOCStyle +\let\NCC@latexstarttoc\@starttoc +\def\@starttoc#1{% + \begingroup + \normalfont \NCC@tocstyle \NCC@setpnum + \NCC@latexstarttoc{#1}% + \endgroup } -\newcommand\StartFromHeaderArea{% - \StartFromTextArea - \vskip -\headsep \vskip -\ht\strutbox +\@ifpackageloaded{textarea}{}{% + \newcommand\StartFromTextArea{\par + {\parskip\z@ \strut\par}\vskip -\baselineskip + } + \newcommand\StartFromHeaderArea{% + \StartFromTextArea + \vskip -\headsep \vskip -\ht\strutbox + } } \newcommand{\bff}{\normalfont\bfseries\mathversion{bold}} +\newcommand*\aftersectionvspace[1]{% + \ifvmode \if@nobreak + \vskip -\lastskip \vskip #1\relax + \fi \fi +} \newcommand*{\startsection}[1]{% \ifnum#1>\z@ \def\@tempa{\csname NCC@section\romannumeral#1\endcsname}% @@ -591,11 +863,12 @@ \ifnum#1=\z@ \def\@tempa{\NCC@mainsection}% \else - \def\@tempa{\part}% + \def\@tempa{\NCC@partsection}% \fi \fi \@tempa } +\def\part{\startsection\m@ne} \def\section{\startsection\@ne} \def\subsection{\startsection\tw@} \def\subsubsection{\startsection\thr@@} @@ -634,7 +907,6 @@ \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} @@ -645,11 +917,32 @@ \DeclareTOCEntry2{}{}{9.9}{} \DeclareTOCEntry3{}{}{9.9.9}{} }{ + \newcommand*{\ChapterPrefixStyle}[1]{% + \def\NCC@thetocchapter{\thechapter}% + \let\NCC@makechapfinal\NCC@makechapfinalgobble + \@for\@tempa:=#1\do{% + \@ifundefined{NCC@chapin@\@tempa}{% + \PackageError{nccsect}{Unknown style `\@tempa'\MessageBreak + Only the `toc' and `header' styles are allowed}{}% + }{\csname NCC@chapin@\@tempa\endcsname}% + }% + } + \def\NCC@chapin@toc{\def\NCC@thetocchapter{\@chapapp\ \thechapter}} + \def\NCC@chapin@header{\let\NCC@makechapfinal\@firstofone} + \@onlypreamble\ChapterPrefixStyle + \@onlypreamble\NCC@chapin@toc + \@onlypreamble\NCC@chapin@header \def\chapter{\startsection\z@} + \DeclarePart{\StartFromTextArea\vfil\centering}% + {\vfil\newpage \if@twoside\if@openright + \mbox{}\thispagestyle{empty}\newpage\fi\fi}% + {\vspace{4ex}\huge\bff}{\Huge\bff} \DeclareSection*0{chapter}{\vspace{3ex}\huge\bff}{10ex}% {8ex \@plus .2ex}{\Huge\bff} \DeclareTOCEntry{-2}{}{}{9.9}{}% table \DeclareTOCEntry{-1}{}{}{9.9}{}% figure + \DeclareTOCPart{\NCC@secskip{4ex \@plus .2ex}\def\@dotsep{1000}} + {}{II}{\large\bff} \DeclareTOCEntry0{\runinsectionskip\def\@dotsep{1000}% \aftergroup\penalty\aftergroup\@highpenalty}{}{9}{\bff} \DeclareTOCEntry1{}{}{9.9}{}[9.9] @@ -664,12 +957,15 @@ \noindentaftersection \sectionstyle{hangindent} \SectionTagSuffix{\quad} +\RunningSectionSuffix{} \captionwidth{\linewidth} \captionstyle{default} \captiontagstyle{para} \CaptionTagSuffix{:\hskip .7em \@plus .2em \@minus .1em} \NumberlineSuffix{\quad}{\enskip} \PnumPrototype{99} +\TOCMarginDrift{} +\SetTOCStyle{} \endinput %% %% End of file `nccsect.sty'. diff --git a/Master/texmf-dist/tex/latex/ncctools/textarea.sty b/Master/texmf-dist/tex/latex/ncctools/textarea.sty new file mode 100644 index 00000000000..18ce2ae91c8 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ncctools/textarea.sty @@ -0,0 +1,112 @@ +%% +%% This is file `textarea.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% textarea.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: textarea.dtx Copyright (C) 2005 by Alexander I. Rozhenko +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{textarea} + [2005/12/26 v1.0 Text area control (NCC)] +\@ifpackageloaded{nccsect}{}{% + \newcommand\StartFromTextArea{\par + {\parskip\z@ \strut\par}\vskip -\baselineskip + } + \newcommand\StartFromHeaderArea{% + \StartFromTextArea + \vskip -\headsep \vskip -\ht\strutbox + } +} +\newcommand*\RestoreTextArea{} +\newcommand*\ExpandTextArea[1][*]{% + \if@twocolumn + \PackageError{textarea}% + {The \string\ExpandTextArea\space command\MessageBreak + cannot work in two-column mode}{}% + \else + \def\@tempa{*}\edef\@tempb{#1}% + \ifx\@tempa\@tempb + \StartFromHeaderArea + \else + \ifx\RestoreTextArea\@empty + \let\NCC@h\@empty \global\let\NCC@restore@h\@empty + \let\NCC@f\@empty \global\let\NCC@restore@f\@empty + \let\NCC@m\@empty \global\let\NCC@restore@m\@empty + \expandafter\@tfor\expandafter\@tempa\expandafter:\expandafter=#1\do{% + \if h\@tempa + \def\NCC@h{\NCC@adjusttoheader{}}% + \gdef\NCC@restore@h{\NCC@adjusttoheader-}% + \else + \if f\@tempa + \def\NCC@f{\NCC@adjusttofooter{}}% + \gdef\NCC@restore@f{\NCC@adjusttofooter-}% + \else + \if m\@tempa + \if@reversemargin \@tempcnta\@ne \else \@tempcnta\tw@ \fi + \edef\NCC@m{\noexpand\NCC@adjusttomargin{}{\the\@tempcnta}}% + \xdef\NCC@restore@m{\noexpand\NCC@adjusttomargin-{\the\@tempcnta}}% + \fi + \fi + \fi + }% + \NCC@h\NCC@f\NCC@m + \StartFromTextArea + \gdef\RestoreTextArea{% + \NCC@restore@h\NCC@restore@f\NCC@restore@m + \global\let\RestoreTextArea\@empty + }% + \def\NCC@restoretextarea{\RestoreTextArea}% + \fi + \fi + \fi +} +\def\NCC@adjusttoheader#1{% + \@tempdima #1\headheight + \advance\@tempdima #1\headsep + \global\advance\textheight\@tempdima + \global\advance\topmargin-\@tempdima + \global\@colht\textheight + \global\@colroom\textheight + \global\vsize\textheight +} +\def\NCC@adjusttofooter#1{% + \global\advance\textheight#1\footskip + \global\@colht\textheight + \global\@colroom\textheight + \global\vsize\textheight +} +\def\NCC@adjusttomargin#1#2{% + \@tempdima #1\marginparwidth + \advance\@tempdima #1\marginparsep + \@tempcnta#2% + \ifodd\@tempcnta + \global\advance\oddsidemargin -\@tempdima + \else + \global\advance\evensidemargin -\@tempdima + \fi + \global\advance\textwidth\@tempdima + \global\columnwidth\textwidth + \global\linewidth\textwidth + \global\hsize\textwidth +} +\let\NCC@restoretextarea\@empty +\endinput +%% +%% End of file `textarea.sty'. diff --git a/Master/texmf-dist/tex/latex/ncctools/topsection.sty b/Master/texmf-dist/tex/latex/ncctools/topsection.sty new file mode 100644 index 00000000000..5f041ab50f1 --- /dev/null +++ b/Master/texmf-dist/tex/latex/ncctools/topsection.sty @@ -0,0 +1,58 @@ +%% +%% This is file `topsection.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% topsection.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: topsection.dtx Copyright (C) 2005 by Alexander I. Rozhenko +%% +\NeedsTeXFormat{LaTeX2e} +\ProvidesPackage{topsection} + [2005/12/24 v1.0 Top section definition (NCC)] +\providecommand\@mkboth[2]{} +\newcommand\@iftopchapter[2]{} +\@ifundefined{chapter}{% + \def\NCC@topsection{\section}% + \let\@iftopchapter\@secondoftwo +}{% + \def\NCC@topsection{\chapter}% + \let\@iftopchapter\@firstoftwo +} +\newcommand*\topsection[1]{} +\AtBeginDocument{% + \@ifpackageloaded{nccsect}{% + \renewcommand*\topsection[1]{% + \ifx\@mkboth\@gobbletwo + \noheadingtag \NCC@topsection{#1}% + \else + \norunninghead + \noheadingtag \NCC@topsection{#1}% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}% + \fi + }% + }{% + \renewcommand*\topsection[1]{% + \NCC@topsection*{#1}% + \@mkboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}% + }% + }% +} +\endinput +%% +%% End of file `topsection.sty'. |