summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/nostarch
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2008-06-11 13:43:39 +0000
committerKarl Berry <karl@freefriends.org>2008-06-11 13:43:39 +0000
commitb09c424184745e1400fb9fd0978a0622ae94b8a4 (patch)
treeb992d3ff95617e4b13c093d1cce11029f3ab6109 /Master/texmf-dist/tex/latex/nostarch
parente470e032d162d488eb329c579dcf4d042883b898 (diff)
nostarch 1.3 (10jun08)
git-svn-id: svn://tug.org/texlive/trunk@8674 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/nostarch')
-rw-r--r--Master/texmf-dist/tex/latex/nostarch/nostarch.cls89
-rw-r--r--Master/texmf-dist/tex/latex/nostarch/nshyper.sty2
2 files changed, 55 insertions, 36 deletions
diff --git a/Master/texmf-dist/tex/latex/nostarch/nostarch.cls b/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
index 93ba27d9b3f..2bfbe9cb046 100644
--- a/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
+++ b/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
@@ -37,7 +37,7 @@
%% Right brace \} Tilde \~}
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{nostarch}
-[2008/04/07 v1.0 Typesetting books for No Starch Press]
+[2008/06/06 v1.3 Typesetting books for No Starch Press]
\newif\ifnostarch@cfonts
\nostarch@cfontstrue
\DeclareOption{cfonts}{\nostarch@cfontstrue}
@@ -59,7 +59,7 @@
\ProcessOptions\relax
\LoadClass[10pt]{book}
\RequirePackage{ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
- caption, makeidx}
+ listings, caption, makeidx, upquote}
\RequirePackage{ragged2e}
\setlength\RaggedRightParindent{\parindent}
\RaggedRight
@@ -86,7 +86,7 @@
\addtolength\topmargin{-1in}
\addtolength\topmargin{-12pt}
\setlength\textheight{8in}
-\addtolength{\textheight}{-0.14in}
+\addtolength{\textheight}{-0.207in}
\addtolength\textheight{\topskip}
\setlength\evensidemargin{0.687in}
\addtolength{\evensidemargin}{-1in}
@@ -210,7 +210,7 @@
{\pagestyle{empty}\cleardoublepage}%
\bgroup
\thispagestyle{empty}%
- \markboth{}{\briefcontentsname}%
+ \markboth{\briefcontentsname}{\briefcontentsname}%
\null\vskip0.925in%
\list{}{\leftmargin-1.0in\rightmargin0.4in\labelwidth\z@%
\labelsep\z@\listparindent\z@\parsep\z@\itemsep\z@%
@@ -227,7 +227,7 @@
{\pagestyle{empty}\cleardoublepage}%
\bgroup
\thispagestyle{empty}%
- \markboth{}{\contentsname}%
+ \markboth{\contentsname}{\contentsname}%
\null\vskip0.175in%
\list{}{\leftmargin-1.0in\rightmargin0.6in\labelwidth\z@%
\labelsep\z@\listparindent\z@\parsep\z@\itemsep\z@%
@@ -269,12 +269,22 @@
\vskip4\p@\penalty\@highpenalty
\endgroup
\fi}
-\renewcommand{\l@section}[2]{\@dottedtocline{1}{\z@}{0.25in}{%
-\fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#1}{%
-\fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#2}}
-\renewcommand{\l@subsection}[2]{\@dottedtocline{2}{0.5in}{0.25in}{%
-\fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#1}{%
-\fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#2}}
+\newlength{\sectionnumberwidth}
+\settowidth{\sectionnumberwidth}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+ 99.99}
+\newlength{\subsectionnumberwidth}
+\settowidth{\subsectionnumberwidth}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+ 99.99.99}
+\renewcommand{\l@section}[2]{\@dottedtocline{1}{\z@}{%
+ \sectionnumberwidth}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#1}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#2}}
+\renewcommand{\l@subsection}[2]{\@dottedtocline{2}{0.5in}%
+ {\subsectionnumberwidth}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#1}{%
+ \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont#2}}
\newcommand*\l@bpart[2]{%
\ifnum \c@tocdepth >-2\relax
\addpenalty{-\@highpenalty}%
@@ -375,29 +385,31 @@
\secdef\@chapter\@schapter}
\def\@chapter[#1]#2{%
\vspace*{0.622in}
+ \ifnum \c@secnumdepth > \m@ne
+ \refstepcounter{chapter}%
+ \typeout{Chapter:\thechapter\space\@currentlabel}%
+ \markboth{\@chapapp~\thechapter}{#1}%
+ \typeout{\@chapapp\space\thechapter.}%
+ \addcontentsline{toc}{chapter}{\thechapter%
+ \protect\linebreak\penalty\@highpenalty
+ \MakeUppercase{#1}}%
+ \addcontentsline{tbc}{bchapter}{%
+ \chaptername~\thechapter:~#1}%
{\centering
- \ifnum \c@secnumdepth > \m@ne
- \refstepcounter{chapter}%
- \markboth{\@chapapp~\thechapter}{#1}%
- \typeout{\@chapapp\space\thechapter.}%
- \addcontentsline{toc}{chapter}{\thechapter%
- \protect\linebreak\penalty\@highpenalty
- \MakeUppercase{#1}}%
- \addcontentsline{tbc}{bchapter}{%
- \chaptername~\thechapter:~#1}%
- {\fontfamily{\sfdefault}\fontseries{bc}\fontsize{120pt}{120pt}
- \selectfont
- \thechapter\par\nobreak\vskip27pt}%
- \else
- \addcontentsline{toc}{chapter}{%
- \MakeUppercase{#1}}%
- \addcontentsline{tbc}{bchapter}{#1}%
- \markboth{#1}{#1}%
- \fi
- {\fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
- \MakeUppercase{#2}\par}}\nobreak\vskip25pt\relax%
- \@firstparatrue
- \@afterheading}%
+ \fontfamily{\sfdefault}\fontseries{bc}\fontsize{120pt}{120pt}
+ \selectfont
+ \thechapter\par\nobreak\vskip27pt}%
+ \else
+ \addcontentsline{toc}{chapter}{%
+ \MakeUppercase{#1}}%
+ \addcontentsline{tbc}{bchapter}{#1}%
+ \markboth{#1}{#1}%
+ \fi
+ {\centering
+ \fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
+ \MakeUppercase{#2}\par}\nobreak\vskip25pt\relax%
+ \@firstparatrue
+ \@afterheading}%
\def\@schapter[#1]#2{%
\vspace*{2.747in}
{\centering
@@ -541,7 +553,7 @@
\renewcommand\footnoterule{%
\kern6\p@
\hrule height 0.25pt depth 0pt width 1in
- \kern0\p@}
+ \kern2\p@}
\long\def\@footnotetext#1{\insert\footins{%
\reset@font\footnotesize
\interlinepenalty\interfootnotelinepenalty
@@ -560,11 +572,13 @@
\parindent 0\p@%
\RaggedRightParindent0\p@%
\noindent
- \@makefnmark#1}
+ \@makefnmark\space#1}
\renewcommand \thefigure
{\ifnum \c@chapter>\z@ \thechapter-\fi \@arabic\c@figure}
\renewcommand \thetable
{\ifnum \c@chapter>\z@ \thechapter-\fi \@arabic\c@table}
+\renewcommand \thelstlisting
+ {\ifnum \c@chapter>\z@ \thechapter-\fi \@arabic\c@lstlisting}
\DeclareCaptionFormat{nostarchfigfmt}{\fontfamily{\sfdefault}%
\fontshape{it}\fontsize{8.5pt}{9pt}\fontseries{k}\selectfont\unskip#1#2#3}
\DeclareCaptionFormat{nostarchtabfmt}{\fontfamily{\sfdefault}%
@@ -572,6 +586,8 @@
\fontseries{k}\selectfont#3}
\captionsetup[figure]{format=nostarchfigfmt,singlelinecheck=off,
aboveskip=8pt,belowskip=8pt}
+\captionsetup[lstlisting]{format=nostarchfigfmt,singlelinecheck=off,
+ aboveskip=8pt,belowskip=8pt}
\captionsetup[table]{format=nostarchtabfmt,singlelinecheck=off,
aboveskip=0pt,belowskip=4pt}
\def\tbfont{%
@@ -592,6 +608,9 @@
\abovetopsep=0.65pt
\DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt}
\FV@AddToHook\FV@ListParameterHook{\vspace{-6pt}}
+\VerbatimFootnotes
+\lstset{captionpos=b}
+\lstset{basicstyle=\ttfamily,columns=fullflexible}
\AtBeginDocument{
\def\bibsection{%
\clearpage
diff --git a/Master/texmf-dist/tex/latex/nostarch/nshyper.sty b/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
index 05170592637..8f32f4b9339 100644
--- a/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
+++ b/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
@@ -36,7 +36,7 @@
%% Grave accent \` Left brace \{ Vertical bar \|
%% Right brace \} Tilde \~}
\ProvidesPackage{nshyper}
-[2008/04/07 v1.0 Typesetting books for No Starch Press]
+[2008/06/06 v1.3 Typesetting books for No Starch Press]
\RequirePackage[breaklinks,colorlinks,linkcolor=black,
citecolor=black,pagecolor=black,urlcolor=black,hyperindex,
bookmarks=false]{hyperref}