summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/ncclatex/nccbook.clo
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-13 00:00:27 +0000
committerKarl Berry <karl@freefriends.org>2006-01-13 00:00:27 +0000
commite9351f8ac4f8603d6020be78e092e939e24d89d0 (patch)
tree8685ab79522a6950137c99cb014279dedf34e334 /Master/texmf-dist/tex/latex/ncclatex/nccbook.clo
parent1fa165c67ca6c4bade32ffbec3cfcc8ea860507c (diff)
ncclatex
git-svn-id: svn://tug.org/texlive/trunk@1131 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/ncclatex/nccbook.clo')
-rw-r--r--Master/texmf-dist/tex/latex/ncclatex/nccbook.clo172
1 files changed, 172 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/ncclatex/nccbook.clo b/Master/texmf-dist/tex/latex/ncclatex/nccbook.clo
new file mode 100644
index 00000000000..d3c98ad83fc
--- /dev/null
+++ b/Master/texmf-dist/tex/latex/ncclatex/nccbook.clo
@@ -0,0 +1,172 @@
+\ProvidesFile{nccbook.clo}
+ [2005/06/19 v1.05 Book subclass (NCC)]
+%
+% \changes{v1.00}{2002/03/24}{This version is uploaded to CTAN}
+% \changes{v1.01}{2003/01/12}{Bug in \ChapterPrefixStyle{toc} fixed}
+% \changes{v1.02}{2004/12/06}{Replace \NCC@null with \StartFromTextArea}
+% \changes{v1.03}{2004/12/12}{Modify part generation commands}
+% \changes{v1.04}{2005/03/23}{Remove \skipwritingtoaux in index head}
+% \changes{v1.04}{2005/06/08}{Introduce the \DeclarePart command}
+% \changes{v1.04}{2005/06/08}{Introduce the \DeclareTOCPart command}
+% \changes{v1.05}{2005/06/19}{Page break after \l@part is forbidden}
+% \changes{v1.05}{2005/06/19}{New optional parameter in \DeclareTOCPart}
+%
+\@addtoreset{footnote}{chapter}
+\setcounter{tocdepth}{2}
+\setcounter{secnumdepth}{2}
+\def\NCC@tochead#1{\noheadingtag\skipwritingtoaux\chapter{#1}}
+\def\NCC@idxhead#1{%
+ \twocolumn \noheadingtag\chapter{#1}%
+}
+%
+% \frontmatter, \mainmatter, \backmatter
+%
+\newif\if@mainmatter \@mainmattertrue
+\newcommand\frontmatter{%
+ \@mainmatterfalse\pagenumbering{roman}%
+}
+\newcommand\mainmatter{%
+ {\@openrighttrue\openrightorany}%
+ \@mainmattertrue
+ \pagenumbering{arabic}%
+}
+\newcommand\backmatter{%
+ \openrightorany \@mainmatterfalse
+}
+%
+% Control of appearance chapter name in header and toc:
+%
+% \ChapterPrefixStyle{header,toc}
+%
+% The parameter list can contain two words: header and/or toc.
+% Using them you set prefix style for header and/or toc respectively.
+%
+\newcommand{\@chapapp}{\chaptername}
+\newcommand*{\ChapterPrefixStyle}[1]{%
+ \def\NCC@thetocchapter{\thechapter}%
+ \def\NCC@theheadchapter{\thechapter}%
+ \@for\@tempa:=#1\do
+ {\csname NCC@chapin@\@tempa\endcsname}%
+}
+\def\NCC@chapin@toc{\def\NCC@thetocchapter{\@chapapp\ \thechapter}}
+\def\NCC@chapin@header{\def\NCC@theheadchapter{\@chapapp\ \thechapter}}
+\@onlypreamble\ChapterPrefixStyle
+\@onlypreamble\NCC@chapin@toc
+\@onlypreamble\NCC@chapin@header
+\ChapterPrefixStyle{} % no prefix by default
+%
+% \ps@headings, \ps@myheadings
+%
+\def\ps@headings{\NCC@setpsheading
+ \def\partmark##1{%
+ \NCC@firstmark{\ifnum \c@secnumdepth>-2\relax
+ \partname\ \thepart.\enskip \fi
+ \ignorespaces##1}}%
+ \def\chaptermark##1{%
+ \NCC@firstmark{\ifnum \c@secnumdepth>\m@ne
+ \if@mainmatter \NCC@theheadchapter.\enskip \fi \fi
+ \ignorespaces##1}}%
+ \def\sectionmark##1{%
+ \NCC@secondmark{\ifnum\c@secnumdepth>\z@\thesection.\enskip\fi
+ \ignorespaces##1}}%
+}
+\def\ps@myheadings{\NCC@setpsheading
+ \let\partmark \@gobble
+ \let\chaptermark\@gobble
+ \let\sectionmark\@gobble
+}
+%
+% \appendix
+%
+\newcommand{\appendix}{\par
+ \setcounter{chapter}{-1}\stepcounter{chapter}%
+ \gdef\@chapapp{\appendixname}%
+ \gdef\thechapter{\@Alph\c@chapter}%
+}
+%
+% thebibliography
+%
+\newenvironment{thebibliography}{%
+ \noheadingtag \chapter{\bibname}\biblist[0]%
+}{\endbiblist}
+%
+% Redefine start chapter hook
+%
+\def\NCC@startchap{%
+ \openrightorany
+ \thispageheading{}%
+ \global\@topnum\z@
+}
+%
+% \DeclarePart{BEFORE}{AFTER}{PREFIX}{STYLE}
+%
+\newcommand\DeclarePart[4]{%
+ \def\part{%
+ \openrightorany
+ \thispageheading{}%
+ \def\NCC@makesectag####1{\leavevmode#3\partname\nobreakspace####1}%
+ \secdef\@part\@spart
+ }%
+ \def\NCC@makepart##1##2{%
+ \if@twocolumn \onecolumn \@tempswatrue \else \@tempswafalse \fi
+ \begingroup\normalfont
+ #1%
+ \ifx\@svsec\@empty \else {\@svsec\par}\nobreak \fi
+ \interlinepenalty \@M
+ #4{##1}\par
+ \endgroup
+ ##2#2%
+ \if@tempswa \twocolumn \fi
+ }
+}
+\@onlypreamble\DeclarePart
+\def\@spart#1{%
+ \let\@svsec\@empty
+ \NCC@makepart{#1}{}%
+ \NCC@sec@reset@controls
+ \NCC@defaultsectag
+}
+\def\@part[#1]#2{%
+ \def\NCC@make{\NCC@makepart{#2}}%
+ \NCC@makesection{part}{\m@ne}{#1}{%
+ \addcontentsline{toc}{part}{%
+ \ifnum \c@secnumdepth>-2
+ \protect\numberline{\partname\ \thepart}\fi
+ #1%
+ }%
+ }%
+ \NCC@defaultsectag
+}
+%
+% \DeclareTOCPart{ACTION}[AFTERSKIP]{PREFIX}{PROTOTYPE}{STYLE}
+%
+\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}{%
+ \setlength\@tempdimb\@tocrmarg
+ \edef\@tocrmarg{\the\@tempdimb plus 1fil}%
+ \addpenalty{-\@highpenalty}#1%
+ }{#3}{#4}{#5}{##1}{\hss##2}%
+ \nobreak \vskip #2\relax
+ \@nobreaktrue
+ \everypar{\@nobreakfalse\everypar{}}%
+ }%
+}
+\@onlypreamble\DeclareTOCPart
+\@onlypreamble\NCC@dtocpart
+%
+% Defaults
+%
+\ifNCC@small
+ \DeclarePart{\StartFromTextArea\vspace{\stretch{.5}}\centering}
+ {\vfill\newpage}{\vspace{1.5em}\Large\bff}{\huge\bff}
+\else
+ \DeclarePart{\StartFromTextArea\vspace{\stretch{.5}}\centering}
+ {\vfill\newpage}{\vspace{2em}\LARGE\bff}{\Huge\bff}
+\fi
+\DeclareTOCPart{\NCC@secskip{4ex \@plus .2ex}\def\@dotsep{1000}}
+ {}{\partname\ II}{\large\bff}
+\endinput