texlive[66812] Master: nostarch (9apr23)

commits+karl at tug.org commits+karl at tug.org
Sun Apr 9 21:44:00 CEST 2023


Revision: 66812
          http://tug.org/svn/texlive?view=revision&revision=66812
Author:   karl
Date:     2023-04-09 21:44:00 +0200 (Sun, 09 Apr 2023)
Log Message:
-----------
nostarch (9apr23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/nostarch/README
    trunk/Master/texmf-dist/doc/latex/nostarch/nostarch.pdf
    trunk/Master/texmf-dist/doc/latex/nostarch/nssample.pdf
    trunk/Master/texmf-dist/doc/latex/nostarch/nssample.tex
    trunk/Master/texmf-dist/source/latex/nostarch/Makefile
    trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx
    trunk/Master/texmf-dist/source/latex/nostarch/nostarch.ins
    trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
    trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
    trunk/Master/tlpkg/libexec/ctan2tds

Modified: trunk/Master/texmf-dist/doc/latex/nostarch/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/README	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/README	2023-04-09 19:44:00 UTC (rev 66812)
@@ -1,6 +1,6 @@
 		   LaTeX Style For No Starch Press
-			Version 1.3 2008/06/06
 
+
 This is the ``official'' LaTeX style for No Starch Press,
 http://www.nostarch.com.  The class is intended to typeset books for
 this publisher---both hard copies and electronic books.
@@ -10,6 +10,10 @@
 
 CHANGES:
 
+Version 2.0:
+    Incorporated the changes by Alex Freed and other members of
+    the NoStarch team over the years.
+
 Version 1.1:  
 
     Added interface to listings package
@@ -24,3 +28,7 @@
 
     Bug fixes
     Added user-settable parameters for the table of contents
+
+Version 1.4
+
+    Updated to keep with listings package
\ No newline at end of file

Modified: trunk/Master/texmf-dist/doc/latex/nostarch/nostarch.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/nostarch/nssample.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/nostarch/nssample.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/nssample.tex	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/nssample.tex	2023-04-09 19:44:00 UTC (rev 66812)
@@ -1,4 +1,4 @@
-\documentclass[cfonts]{nostarch}
+\documentclass[cfonts,nofontsdir]{nostarch}
 \usepackage{lipsum}
 \hyphenation{ve-sti-bu-lum sene-c-tus rut-rum con-sec-te-tu-er
   elei-fend no-num-my li-be-ro}

Modified: trunk/Master/texmf-dist/source/latex/nostarch/Makefile
===================================================================
--- trunk/Master/texmf-dist/source/latex/nostarch/Makefile	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/source/latex/nostarch/Makefile	2023-04-09 19:44:00 UTC (rev 66812)
@@ -3,7 +3,7 @@
 #
 # This file is in public domain
 #
-# $Id: Makefile,v 1.6 2008-05-25 18:06:28 boris Exp $
+# $Id$
 #
 
 PACKAGE=nostarch
@@ -17,28 +17,28 @@
 
 
 %.pdf:  %.dtx   $(PACKAGE).cls
-	pdflatex $<
+	xelatex $<
 	- bibtex $*
-	pdflatex $<
+	xelatex $<
 	- makeindex -s gind.ist -o $*.ind $*.idx
 	- makeindex -s gglo.ist -o $*.gls $*.glo
-	pdflatex $<
+	xelatex $<
 	while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
-	do pdflatex $<; done
+	do xelatex $<; done
 
 
 %.cls:   %.ins %.dtx  
-	pdflatex $<
+	xelatex $<
 
 %.pdf:  %.tex   $(PACKAGE).cls
-	pdflatex $<
+	xelatex $<
 	- bibtex $*
 	- makeindex -s $(PACKAGE).ist -o $*.ind $*.idx
-	pdflatex $<
-	pdflatex $<
+	xelatex $<
+	xelatex $<
 	- makeindex -s $(PACKAGE).ist -o $*.ind $*.idx
 	while ( grep -q '^LaTeX Warning: Label(s) may have changed' $*.log) \
-	do pdflatex $<; done
+	do xelatex $<; done
 
 
 
@@ -47,7 +47,7 @@
 
 clean:
 	$(RM)  $(PACKAGE).cls *.log *.aux \
-	*.glo *.idx *.toc *.tbc \
+	*.glo *.idx *.toc *.tbc *.hd \
 	*.ilg *.ind *.out *.lof \
 	*.lot *.bbl *.blg *.gls *.sty *.ist \
 	*.dvi *.ps *.thm *.tgz *.zip
@@ -59,10 +59,9 @@
 # Archive for the distribution. Includes typeset documentation
 #
 archive:  all clean
-	tar -czvf $(PACKAGE).tgz  --exclude 'debug*' \
-	--exclude '*~' --exclude '*.tgz' --exclude '*.zip'  --exclude CVS .
+	COPYFILE_DISABLE=1 tar -C .. -czvf ../$(PACKAGE).tgz --exclude '*~' --exclude '*.tgz' --exclude '*.zip'  --exclude CVS --exclude '.git*' $(PACKAGE); mv ../$(PACKAGE).tgz .
 
 
 zip:  all clean
 	zip -r  $(PACKAGE).zip * \
-	-x 'debug*' -x '*~' -x '*.tgz' -x '*.zip' -x CVS -x 'CVS/*'
\ No newline at end of file
+	-x 'debug*' -x '*~' -x '*.tgz' -x '*.zip' -x .git* -x '.git/*'

Modified: trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx	2023-04-09 19:44:00 UTC (rev 66812)
@@ -1,7 +1,6 @@
 % \iffalse
-% $Id: nostarch.dtx,v 1.49 2008-06-07 03:05:29 boris Exp $
 %
-% Copyright 2008, Boris Veytsman
+% Copyright 2008-2023, Boris Veytsman
 % This work may be distributed and/or modified under the
 % conditions of the LaTeX Project Public License, either
 % version 1.3 of this license or (at your option) any 
@@ -63,7 +62,7 @@
 % \GetFileInfo{nostarch.dtx}
 % \newcommand{\progname}[1]{\textsf{#1}}
 % \title{\LaTeX{} Style For \emph{No Starch Press}
-%   \thanks{\copyright 2008, Boris Veytsman}}
+%   \thanks{\copyright 2008--2023, Boris Veytsman}}
 % \author{Boris Veytsman\thanks{%
 % \href{mailto:borisv at lk.net}{\texttt{borisv at lk.net}},
 % \href{mailto:boris at varphi.com}{\texttt{boris at varphi.com}}}} 
@@ -83,6 +82,9 @@
 % \changes{v1.0}{2008/04/07}{First public release} 
 % \changes{v1.1}{2008/05/24}{Added interface to listings package and
 % upquote package.  Updated documentation} 
+% \changes{v1.4}{2020/04/29}{Updated interface with listings package}
+% \changes{v2.0}{2023/03/30}{Incorporated in-house changes by No
+% Starch Press} 
 %
 %
 %\section{Introduction}
@@ -95,6 +97,11 @@
 % The suite provides main class, |nostarch.cls|, hyperref interface
 % |nshyper.sty| and MakeIndex style |nostarch.ist|.
 %
+% The initial version of this class was written in 2008.  Since then a
+% number of changes was made for in-house processing by the \emph{No
+% Starch} team, with special thanks to Alex Freed.  In 2023 these
+% changes were incorporated back to the publicly released version. 
+%
 %\section{User's Guide}
 %\label{sec:manual}
 %
@@ -127,36 +134,76 @@
 % To typeset the books in the distinctive \emph{No Starch Press} style
 % you will need the fonts used by them.  Unfortunately these fonts
 % (New Baskerville, Futura, The Sans Mono Condensed and Dogma) are not
-% free.  You may buy them from the vendor or license from the
-% publisher to typeset your book.  Please contact \emph{No Starch
-% Press} directly for the arrangements.
-%
-% The class uses some other \LaTeX{} classes or packages.  Most
-% probably, some of them they are already installed on your system.
-% If not (or if their versions are very old), you need to download and
-% install them.  Here is the list:
+% free.  You have the following options:
 % \begin{enumerate}
-% \item Font support packages \progname{nbaskerv}~\cite{NbaskervFont},
-% \progname{futurans}~\cite{FuturansFont},
-% \progname{dogma}~\cite{DogmaFont} and
-% \progname{thsmc}~\cite{ThsmcFont}.
-% \item \progname{booktabs} package~\cite{Fear05:Booktabs}.
-% \item \progname{caption} package~\cite{Sommerfeldt07:Caption}.
-% \item \progname{fancyhdr} package~\cite{Oostrum04:Fancyhdr}.
-% \item \progname{fancyvrb} package~\cite{VanZandt98:Fancyvrb}.
-% \item \progname{graphics} package~\cite{Carlisle05:Graphics}.
-% \item \progname{ifpdf} package~\cite{Oberdiek06:Ifpdf}.
-% \item \progname{listings} package~\cite{Heinz07:Listings}.
-% \item \progname{ragged2e} package~\cite{Schroeder03:Ragged2e}.
-% \item \progname{upquote} package~\cite{Covington03:Upquote}.
+% \item Typeset your book using only free fonts (the option |nocfonts|
+% discussed below).
+% \item Buy the fonts and install them.
+% \item Arrange with \emph{No Starch Press} for the use of these fonts
+% for your book.
 % \end{enumerate}
-% These packages are called internally by |nostarch.cls|;  you do not
-% need to explicitly call them from your document.
+% The details of the installation are discussed below in
+% Section~\ref{sec:ug_fonts}. 
 %
 %
-% 
 %
+%\subsection{Fonts installation}
+%\label{sec:ug_fonts}
 %
+% If you wish to try \progname{nostarch} class without bothering to
+% typeset camera-ready copy, you may use the option |nocfonts| for
+% \emph{no commercial fonts,} and the class will use only the free
+% fonts available in \TeX\ distributions.
+%
+% If you work with \emph{No Starch Press} on your book, you might be
+% provided with the fonts.  Today \emph{No Starch Press} typically
+% uses \progname{xelatex} and expects the fonts in True~Type format.
+% If this is the case, use the option |cfonts|.  \emph{No Starch
+% Press} recommends the authors to put the font files in the
+% subdirectory \path{fonts} of their main directory.  This is where
+% \progname{nostarch} expects them.  This is also the layout of
+% directories in the \emph{No Starch Press} \emph{Overleaf}
+% templates.  However, if you prefer to put the fonts in another
+% directory, searcheable by \progname{xelatex}, use the option
+% |nofontsdir| in the invocation.
+%
+% These options are summarized in Figure~\ref{fig:fonts}.
+%
+% \begin{figure}
+%   \centering
+%   \begin{tikzpicture}
+%     \node[draw, circle, radius=0.1] (start) {};
+%     \node[draw, align=center, below=of start]
+%     (haveFonts) {Do you have \\commercial fonts?};
+%     \node[draw, left=of haveFonts, align=center] (nocfonts)
+%     {Use |nocfonts|\\ option};
+%     \node[draw, below=of nocfonts, rounded corners]
+%     (any) {Use any engine};
+%     \node[draw, right=of haveFonts, align=center] (cfonts)
+%     {Use |cfonts|\\option};
+%     \node[draw, below=of cfonts, align=center] (haveSubdir) {Are the fonts
+%     \\in |fonts| \\subdirectory?};
+%     \node[draw, left=of haveSubdir, align=center]
+%     (nofontsdir) {Use |nofontsdir|\\option};
+%     \node[draw, below=of haveSubdir, align=center] (fontsdir)
+%     {Use |fontsdir|\\option};
+%     \node[draw, below=of fontsdir, rounded corners] (xelatex)
+%     {Use \progname{xelatex} engine};
+%     \draw[-latex] (start) -- (haveFonts);
+%     \draw[-latex] (haveFonts) -- node[above] {No} (nocfonts);
+%     \draw[-latex] (haveFonts) -- node[above] {Yes} (cfonts);
+%     \draw[-latex] (nocfonts) --  (any);
+%     \draw[-latex] (cfonts) --  (haveSubdir);
+%     \draw[-latex] (haveSubdir) -- node[above] {No} (nofontsdir);
+%     \draw[-latex] (haveSubdir) -- node[right] {Yes} (fontsdir);
+%     \draw[-latex] (nofontsdir) |- (xelatex);
+%     \draw[-latex] (fontsdir) -- (xelatex);
+%   \end{tikzpicture}
+%   \caption{Flowchart for font-related options}
+%   \label{fig:fonts}
+% \end{figure}
+%
+%
 %\subsection{Invocation}
 %\label{sec:invocation}
 %
@@ -165,7 +212,7 @@
 % |\documentclass[|\meta{options}|]{nostarch}|
 % \end{flushleft}
 %
-% \DescribeOptions{cfonts,nocfonts} 
+% \DescribeOptions{cfonts,nocfonts}%
 % As discussed above, \emph{No  Starch Press} uses a number of
 % commercial fonts to typeset their  books.  
 % The option |cfonts| (default) tells \LaTeX{} that you do have these
@@ -174,22 +221,16 @@
 % to use freely available fonts for typesetting.  Of course in this
 % case the result will not look like a \emph{No Starch Press} Book.
 %
-% 
-% \DescribeOptions{8pt,9pt,10pt,11pt,12pt}
-% The fontsize changing options (|8pt|, |9pt|, \dots, |12pt|) have no
-% effect other than producing a warning in the log.
+% \DescribeOptions{fontsdir,nofontsdir}%
+% If you use commercial fonts \emph{and} \progname{xelatex}, the
+% latter usually expects them in the subdirectory \path{fonts} of the
+% main directory (see Section~\ref{sec:ug_fonts}).  The options
+% |fontsdir| (default) sets up this behavior.  Use the option
+% |nofontsdir| to tell \progname{xelatex} to search standard font
+% directories insted.
 %
+% Figure~\ref{fig:fonts} may help to choose the right options.  
 %
-%
-% \emph{No Starch Press} uses a special paper size.  If you process the
-% manuscript with \progname{pdflatex} to produce PDF output, the paper
-% dimensions will be automatically set up by the class.  However, if
-% you use \progname{latex} and \progname{dvips}, you need to tell
-% \progname{dvips} what paper size to choose.  One way to do this is
-% to add to the \progname{dvips} options the following:
-% \begin{verbatim}
-%   -T 7in,9.25in
-% \end{verbatim}
 % 
 %\subsection{Use of \progname{hyperref} Package}
 %\label{sec:guide:hyperref}
@@ -210,8 +251,8 @@
 % \progname{hyperref} by |\usepackage{hyperref}| will not work since
 % \progname{nshyper} patches hyperref to work with our class.
 % 
+% 
 %
-%
 %\subsection{Front Matter}
 %\label{sec:guide:frontmatter}
 %
@@ -542,6 +583,7 @@
 % example, in quote characters.
 %
 %
+%
 %\subsection{Back Matter}
 %\label{sec:guide:backmatter}
 %  
@@ -644,7 +686,7 @@
 %<class>\ProvidesClass{nostarch}
 %<nshyper>\ProvidesPackage{nshyper}
 %<*!ist>
-[2008/06/06 v1.3 Typesetting books for No Starch Press]
+[2023/03/30 v2.0 Typesetting books for No Starch Press]
 %</!ist>
 %    \end{macrocode}
 %
@@ -653,9 +695,10 @@
 %<*gobble>
 \documentclass{ltxdoc}
 \usepackage{array}
-\usepackage{url,amsfonts}
+\usepackage{url,amsfonts, tikz}
 \usepackage[breaklinks,colorlinks,linkcolor=black,citecolor=black,
-            pagecolor=black,urlcolor=black,hyperindex=false]{hyperref}
+pagecolor=black,urlcolor=black,hyperindex=false]{hyperref}
+\usetikzlibrary{positioning}
 \PageIndex
 \CodelineIndex
 \RecordChanges
@@ -671,7 +714,7 @@
 %\subsection{Options}
 %\label{sec:options}
 %
-%
+%\begin{macro}{\ifnostarch at cfonts}
 % First, let us decide whether we have non-free fonts:
 %    \begin{macrocode}
 \newif\ifnostarch at cfonts
@@ -678,7 +721,20 @@
 \nostarch at cfontstrue
 \DeclareOption{cfonts}{\nostarch at cfontstrue}
 \DeclareOption{nocfonts}{\nostarch at cfontsfalse}
+%    \end{macrocode} 
+% \end{macro}
+%
+% \begin{macro}{\ifnostarch at fontsdir}
+% \changes{v2.0}{2023/03/31}{Introduced macro} 
+% We also need to check whether we want to use \emph{No Starch} in
+% house |fonts| directory
+%    \begin{macrocode}
+\newif\ifnostarch at fontsdir
+\nostarch at fontsdirtrue
+\DeclareOption{fontsdir}{\nostarch at fontsdirtrue}
+\DeclareOption{nofontsdir}{\nostarch at fontsdirfalse}
 %    \end{macrocode}
+% \end{macro}
 %
 % The size-changing options produce a warning:
 %    \begin{macrocode}
@@ -726,8 +782,15 @@
 %
 % A bunch of packages:
 %    \begin{macrocode}
-\RequirePackage{ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
-  listings, caption, makeidx, upquote}
+\RequirePackage[table]{xcolor}  
+\RequirePackage{iftex, ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
+  listings, caption, makeidx, upquote, pifont,
+  textcomp, xcolor, lmodern, nameref, float, amssymb, etoolbox,
+  setspace, marginnote}
+\RequirePackage[framemethod=TikZ]{mdframed}
+\RequirePackage{soul}
+\RequirePackage[T1]{fontenc}  
+\RequirePackage{ragged2e}
 %    \end{macrocode}
 %
 % We do not want the option |document| with \progname{ragged2e}: this
@@ -752,17 +815,103 @@
 %\subsection{Fonts}
 %\label{sec:fonts}
 %
-% If we have commercial fonts, we load them.  Note that the body text
-% has roman font at 10pt, and typewriter at 8.5pt.
-% Therefore we will load |thsmc| scaled.  We also add |dgdefault| for
-% dogma family
+% \begin{macro}{\nostarch at fontspath}
+% \changes{v2.0}{2023/03/31}{Introduced macro} 
+% The path to load fonts
 %    \begin{macrocode}
+\ifnostarch at fontsdir
+  \def\nostarch at fontspath#1{Path=fonts/#1/,}
+\else
+  \def\nostarch at fontspath#1{Path,}
+\fi
+%    \end{macrocode}
+% \end{macro}
+%
+% If we have commercial fonts, we load them.  
+%    \begin{macrocode}
 \ifnostarch at cfonts
-  \RequirePackage{nbaskerv}%
-  \RequirePackage{futurans}%
-  \RequirePackage[scaled=0.85]{thsmc}%
-  \RequirePackage{dogma}%
-  \newcommand{\dgdefault}{fdg}%
+  \ifpdftex
+    \ClassWarning{nostarch}{Commercial fonts usually require xelatex engine}
+    \RequirePackage{nbaskerv}%
+    \RequirePackage{futurans}%
+    \RequirePackage[scaled=0.85]{thsmc}%
+    \RequirePackage{dogma}%
+    \newcommand{\dogma}{\fontfamily{fdg}\selectfont}%
+  \else %XeTeX or LuaTeX
+    \RequirePackage{fontspec}  
+    \newfontface\dogma[
+    \nostarch at fontspath{dogma}
+    UprightFont=dogmab01.ttf,
+    Ligatures=TeX
+    ]{dogma}  % Font used for chapter titles
+    
+    \newfontface\timesnewroman[
+    \nostarch at fontspath{tnr}
+    UprightFont=times.ttf,
+    BoldFont=timesbd.ttf,
+    ItalicFont=timesi.ttf,
+    BoldItalicFont=timesbi.ttf,
+    Ligatures=TeX
+    ]{timesnewroman}
+    
+    \newfontface\futurabook[
+    \nostarch at fontspath{futurans}
+    UprightFont=FuturB37.ttf,
+    BoldFont=FuturH79.ttf,
+    ItalicFont=FutuBO08.ttf,
+    BoldItalicFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futurabook}
+
+    \newfontface\futuraheavy[
+    \nostarch at fontspath{futurans}
+    UprightFont=FuturH79.ttf,
+    Ligatures=TeX
+    ]{futuraheavy}
+    
+    \newfontface\futuraboldc[
+    \nostarch at fontspath{futurans}
+    UprightFont=futucb18.ttf,
+    Ligatures=TeX
+    ]{futuraboldc}
+    
+    \newfontface\futuraboldcoblique[
+    \nostarch at fontspath{futurans}
+    UprightFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futuraboldcoblique}
+
+    \newfontface\futuraoblique[
+    \nostarch at fontspath{futurans}
+    UprightFont=FutuBO08.ttf,
+    Ligatures=TeX
+    ]{futuraoblique}
+    
+    \setmainfont{nbaskerv}[
+    \nostarch at fontspath{nbaskerv}
+    UprightFont=NewBaskervilleEF-Roman.ttf,
+    BoldFont=NewBaskervilleEF-Bold.ttf,
+    ItalicFont=NewBaskervilleEF-RomanIta.ttf,
+    BoldItalicFont=NewBaskervilleEF-BoldIta.ttf,
+    Ligatures=TeX]
+    
+    \setmonofont[Scale=0.85,
+    \nostarch at fontspath{thsmc}
+    UprightFont=ThSMCP25.ttf,
+    BoldFont=ThSMCB02.ttf,
+    ItalicFont=ThSMCI29.ttf,
+    BoldItalicFont=TSMCBI56.ttf]{thsmc}
+    
+    \setsansfont[
+    \nostarch at fontspath{futurans}
+    UprightFont=futura.ttf,
+    BoldFont=FuturB41.ttf,
+    ItalicFont=FutuBO08.ttf,
+    BoldItalicFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futurans}
+    
+  \fi  
 %    \end{macrocode}
 % Otherwise we just use sans serif font for dogma.
 %    \begin{macrocode}
@@ -771,6 +920,19 @@
 \fi
 %    \end{macrocode}
 %
+% A number of commands to provide font defaults in case we use
+% non-commercial fonts
+%    \begin{macrocode}
+\providecommand{\dogma}{\fontfamily{dgdefault}\selectfont}
+\providecommand{\futuraboldc}{\fontfamily{\sfdefault}\fontseries{bc}%
+  \selectfont}
+\providecommand{\futuraboldcoblique}{\fontfamily{\sfdefault}\fontseries{bc}%
+  \itshape\selectfont}
+\providecommand{\futuraheavy}{\fontfamily{\sfdefault}\fontseries{hq}%
+  \selectfont}
+\providecommand{\futurabook}{\fontfamily{\sfdefault}\fontseries{k}%
+  \selectfont}
+%    \end{macrocode}
 %
 % And switch to normal size---just in case
 %    \begin{macrocode}
@@ -777,8 +939,81 @@
 \normalsize
 %    \end{macrocode}
 % 
+% Special commands for number balls
+% \begin{macro}{\wingding}
+% \changes{v2.0}{2023/03/31}{Introduced macro} 
+% The number ball
+%    \begin{macrocode}
+\newcommand{\wingding}[1]{\ding{\the\numexpr #1 + 181 \relax}} 
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\codewingding}
+% \changes{v2.0}{2023/03/31}{Introduced macro} 
+% The number ball inside code
+%    \begin{macrocode}
+\newcommand{\codewingding}[1]{\vbox{\llap{\wingding{#1}\hskip 0.5em}}}
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{\menuarrow}
+% \changes{v2.0}{2023/04/08}{Introduced macro}
+%    \begin{macrocode}
+\newcommand\menuarrow{\raisebox{.2ex}{\small $\blacktriangleright$}}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\bettertilde}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% A tilde uses for some texts
+%    \begin{macrocode}
+\newcommand{\bettertilde}{\raisebox{-1ex}{\textasciitilde}}
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{\slashslash}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% The special slash
+%    \begin{macrocode}
+\newcommand{\slashslash}{%
+  \raisebox{.53ex}{%
+    \scalebox{.5}{%
+      \rotatebox[origin=c]{18}{$\mathbf{/}$}%
+    }%
+  }%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\neq}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% A better $\neq$
+%    \begin{macrocode}
+\renewcommand{\neq}{\mathrel
+  {%
+   \vphantom{=}%
+   \ooalign{\kern.05em\smash{\slashslash}\hidewidth\cr$=$\cr}%
+  }%
+}
+
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\keycap}
+% Taken from:
+% \url{https://tex.stackexchange.com/questions/55664/fake-small-caps-with-xetex-fontspec/225078} 
+%    \begin{macrocode}
+\newcommand\keycap[1]{\fauxschelper#1 \relax\relax}
+\def\fauxschelper#1 #2\relax{%
+  \fauxschelphelp#1\relax\relax%
+  \if\relax#2\relax\else\ \fauxschelper#2\relax\fi%
+}
+\def\Hscale{.83}\def\Vscale{.72}\def\Cscale{1.00}
+\def\fauxschelphelp#1#2\relax{%
+  \ifnum`#1>``\ifnum`#1<`\{\scalebox{\Hscale}[\Vscale]{\uppercase{#1}}\else%
+    \scalebox{\Cscale}[1]{#1}\fi\else\scalebox{\Cscale}[1]{#1}\fi%
+  \ifx\relax#2\relax\else\fauxschelphelp#2\relax\fi}
+%    \end{macrocode}
+% \end{macro}
+%
 %\subsection{Page Dimensions and Paragraphing}
 %\label{sec:page}
 %
@@ -902,7 +1137,25 @@
 % \end{macro}
 % \end{macro}
 % 
-% 
+% \begin{macro}{\sochapter}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% \begin{macro}{\sotitle}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% \begin{macro}{\sobox}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% \begin{macro}{\sonote}
+% \changes{v2.0}{2023/04/04}{Introduced macro}
+% Some spacing commands.
+%    \begin{macrocode}
+\sodef\sochapter{}{.150em}{.5em}{1em}
+\sodef\sotitle{}{.125em}{.5em}{1em}
+\sodef\sobox{}{.075em}{.5em}{1em}
+\sodef\sonote{}{.200em}{.5em}{1em}
+%    \end{macrocode}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+% \end{macro}
 %
 %\subsection{Headers and Footers}
 %\label{sec:headers}
@@ -934,9 +1187,9 @@
 %
 % On even pages we put page number and chapter title in footer. 
 %    \begin{macrocode}
-\fancyfoot[RO]{\fontfamily{\sfdefault}\fontsize{6pt}{6pt}%
+\fancyfoot[RO]{\sffamily \fontsize{6pt}{6pt}%
   \fontseries{lq}\selectfont\rightmark%
-  \hspace{2em}\fontseries{bc}\fontsize{9pt}{6pt}\selectfont\thepage}
+  \hspace{2em} \futuraboldc \fontsize{9pt}{6pt}\selectfont\thepage}
 \fancyfoot[LO]{}
 \fancyfoot[CO]{}
 %    \end{macrocode}
@@ -943,10 +1196,10 @@
 % 
 % On even pages we put page number and chapter number in footer:
 %    \begin{macrocode}
-\fancyfoot[LE]{\fontfamily{\sfdefault}\fontseries{bc}\fontsize{9pt}{6pt}%
-  \selectfont\thepage\hspace{2em}%
-  \fontseries{lq}\fontsize{6pt}{6pt}\selectfont%
-  \leftmark}
+\fancyfoot[LE]{\futuraboldc \fontsize{9pt}{6pt}%
+  \selectfont\thepage%
+  \fontseries{lq}\sffamily \fontsize{6pt}{6pt}\selectfont%
+  \hspace{2em}\leftmark}
 \fancyfoot[RE]{}
 \fancyfoot[CE]{}
 %    \end{macrocode}
@@ -1012,12 +1265,11 @@
   \clearpage
   {\pagestyle{empty}\cleardoublepage}%
   \thispagestyle{empty}%
-  \null\vskip1.025in%
+  \null%\vskip1.025in%
   \leavevmode\noindent\hspace{1.66in}%
     \begin{minipage}[t]{2.5625in}%
     \flushright 
-    \fontfamily{\sfdefault}\fontseries{b}%
-    \fontsize{12\p@}{13\p@}\selectfont
+    \sffamily\bfseries\fontsize{12\p@}{13\p@}\selectfont
     \MakeUppercase{\@title}%
   \end{minipage}}
 %    \end{macrocode}
@@ -1041,18 +1293,18 @@
   \item\relax
   \centering
   \null\vskip0.855in%
-  {\fontfamily{\dgdefault}\fontseries{bk}\fontsize{36\p@}{37\p@}\selectfont
-    \MakeUppercase{\@title}\par}%
+  {\dogma \fontsize{36\p@}{37\p@}\selectfont
+    \MakeUppercase{\sotitle{\@title}}\par}%
   \if\@subtitle\@empty\relax\else
      {\null\vskip25\p@%
-     \fontfamily{\dgdefault}\fontseries{bq}\fontsize{24\p@}{25\p@}\selectfont
+    \dogma \fontsize{24\p@}{25\p@}\selectfont
     \@subtitle\par}%
   \fi
-  \vspace{1.7in}%
+  \vspace{2.15in}%
   \vspace{-\baselineskip}%
-  {\fontfamily{\sfdefault}\fontseries{hq}\fontsize{18\p@}{22\p@}\selectfont
+  {\futuraheavy\fontsize{18\p@}{22\p@}\selectfont
     by \@author\par}%
-  \vspace{0.45in}%
+  \vspace{12\p@}%
   \vspace{\baselineskip}%
   \if\@nostarchlogo\@empty\relax\else
     \includegraphics[height=1.08in]{\@nostarchlogo}\par
@@ -1099,15 +1351,23 @@
 %
 %
 % \begin{macro}{dedicationpage}
-% \changes{v0.5}{2008/03/19}{Introduced the macro} 
+% \changes{v0.5}{2008/03/19}{Introduced the macro}
+% \changes{v2.0}{2023/04/04}{Rewritten} 
 %   Dedication is centered:
 %    \begin{macrocode}
 \newenvironment{dedicationpage}{%
   \clearpage
-  {\pagestyle{empty}\cleardoublepage}%
+  \bgroup
+  \list{}{\leftmargin-1in\rightmargin\z@\labelwidth\z@%
+    \labelsep\z@\listparindent\z@\parsep8\p@\itemsep\z@%
+    \topsep\z@\partopsep\z@}%
+  \item\relax
   \thispagestyle{empty}%
   \null\vskip1.175in%
-  \centering\normalfont}{\clearpage}
+  \centering\normalfont}{%
+  \endlist
+  \egroup
+  \clearpage}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1122,7 +1382,7 @@
 % \begin{macro}{\briefcontentsname}
 %   The name for brief contents
 %    \begin{macrocode}
-\def\briefcontentsname{Brief Contents}
+\def\briefcontentsname{{Brief Contents}}
 %    \end{macrocode}
 %   
 % \end{macro}
@@ -1142,6 +1402,13 @@
 %  
 % \end{macro}
 %
+% \begin{macro}{\apptoc}
+% \changes{v2.0}{2023/04/14}{Added macro}
+% Changing chapter names in appendix
+%    \begin{macrocode}
+\newcommand{\apptoc}{\renewcommand{\chaptername}{Appendix}}
+%    \end{macrocode}
+% \end{macro}
 %
 % \begin{macro}{\brieftableofcontents}
 % \changes{v0.5}{2008/03/19}{Introduced macro} 
@@ -1162,8 +1429,8 @@
     \topsep\z@\partopsep\z@}%
   \item\relax  
     {\centering
-      \fontfamily{\dgdefault}\fontseries{bs}\fontsize{16\p@}{18\p@}\selectfont
-      \MakeUppercase{\briefcontentsname}\par}\vskip40pt%
+     \dogma\fontsize{16\p@}{18\p@}\selectfont
+      \MakeUppercase{\sochapter{Brief Contents}}\par}\vskip40pt%
   \@starttoc{tbc}%
   \endlist
   \egroup}
@@ -1190,8 +1457,8 @@
     \topsep\z@\partopsep\z@}%
   \item\relax  
     {\centering
-      \fontfamily{\dgdefault}\fontseries{bs}\fontsize{16\p@}{18\p@}\selectfont
-      \MakeUppercase{\contentsname}\par}\vskip18pt%
+     \dogma\fontsize{16\p@}{18\p@}\selectfont
+      \MakeUppercase{\sochapter{Contents in Detail}}\par}\vskip18pt%
   \@starttoc{toc}%
   \endlist
   \egroup}
@@ -1221,7 +1488,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       {\leavevmode
-       \fontfamily{\sfdefault}\fontseries{bq}\fontsize{12\p@}{14\p@}\selectfont
+       \sffamily\bfseries\fontsize{12\p@}{14\p@}\selectfont
        #1}\par
        \nobreak
          \global\@nobreaktrue
@@ -1243,8 +1510,8 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       \leavevmode 
-      \fontfamily{\sfdefault}\fontseries{bq}\fontsize{10\p@}{12\p@}\selectfont
-      #1\nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
+      \sffamily \bfseries \fontsize{10\p@}{12\p@}\selectfont{#1}%
+      \nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
       \vskip4\p@\penalty\@highpenalty
     \endgroup
   \fi}
@@ -1257,10 +1524,20 @@
 %    \begin{macrocode}
 \newlength{\sectionnumberwidth}
 \settowidth{\sectionnumberwidth}{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+  \futurabook\fontsize{9\p@}{11\p@}\selectfont
   99.99}
 %    \end{macrocode}   
 % \end{macro}
+% \begin{macro}{\boldsectionnumberwidth}
+% \changes{v2.0}{2023/04/06}{Introduced the length} 
+%   The number width for bold sections.  Normally the width of |99.99|
+%    \begin{macrocode}
+\newlength{\boldsectionnumberwidth}
+\settowidth{\boldsectionnumberwidth}{%
+  \futuraheavy\fontsize{9\p@}{11\p@}\selectfont
+  99.99}
+%    \end{macrocode}   
+% \end{macro}
 % \begin{macro}{\subsectionnumberwidth}
 % \changes{v1.3}{2008/06/06}{Introduced the length} 
 %   The number width for subsections.  Normally the width of
@@ -1268,7 +1545,7 @@
 %    \begin{macrocode}
 \newlength{\subsectionnumberwidth}
 \settowidth{\subsectionnumberwidth}{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+  \futurabook\fontsize{9\p@}{11\p@}\selectfont
   99.99.99}
 %    \end{macrocode}   
 % \end{macro}
@@ -1280,8 +1557,8 @@
 %    \begin{macrocode}
 \renewcommand{\l at 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}}
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#2}}
 %    \end{macrocode}
 % \end{macro}
 %
@@ -1294,11 +1571,21 @@
 %    \begin{macrocode}
 \renewcommand{\l at 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}}
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#2}}
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\l at boldsection}
+% \changes{v2.0}{2023/04/06}{Introduced the macro} 
+%   This is how we typeset bold sections in the table of contents
+%    \begin{macrocode}
+\newcommand*\l at boldsection[2]{{\bfseries\@dottedtocline{1}{\z@}{%
+    \boldsectionnumberwidth}{%
+    \futuraheavy\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futuraheavy\fontsize{9\p@}{11\p@}\selectfont#2}}}
+%    \end{macrocode}
+% \end{macro}
 %
 %
 % \begin{macro}{\l at bpart}
@@ -1314,7 +1601,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       {\leavevmode
-       \fontfamily{\sfdefault}\fontseries{h}\fontsize{9\p@}{14\p@}\selectfont
+       \futuraheavy\fontsize{9\p@}{14\p@}\selectfont
        #1}\par\vskip7\p@%
        \nobreak
          \global\@nobreaktrue
@@ -1324,6 +1611,13 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\@pnumwidth}
+% \changes{v2.0}{2023/04/08}{Redefined macro}
+%    \begin{macrocode}
+\renewcommand{\@pnumwidth}{17pt}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\l at bchapter}
 % \changes{v0.6}{2008/03/21}{Introduced macro} 
 %   There is a special formatting of chapters in the brief table of
@@ -1337,7 +1631,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       \leavevmode 
-      \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{14\p@}\selectfont
+      \futurabook\fontsize{9\p@}{14\p@}\selectfont
       #1\nobreak\leaders\hbox{$\m at th
         \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
         mu$}\hfill
@@ -1414,6 +1708,14 @@
 %    \end{macrocode}   
 % \end{macro}
 %
+% \begin{macro}{\turnoffbigpara}
+% \changes{v2.0}{2023/04/01}{Introduced macro}
+% And the code to manually turn it off
+%    \begin{macrocode}
+\newcommand{\turnoffbigpara}{\@firstparafalse}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\@chapterart}
 %   We also keep track of the current artwork for chapter start:
 %    \begin{macrocode}
@@ -1460,22 +1762,22 @@
       \refstepcounter{part}%
       \addcontentsline{toc}{part}{\MakeUppercase{\partname} 
         \thepart\protect\linebreak\penalty\@highpenalty\MakeUppercase{#1}}%
-      \addcontentsline{tbc}{bpart}{\MakeUppercase{\partname~\thepart: #1}}%
+      \addcontentsline{tbc}{bpart}{\MakeUppercase{\partname~\thepart: \futuraheavy #1}}%
     \else
       \addcontentsline{toc}{part}{\MakeUppercase{#1}}%
-      \addcontentsline{tbc}{bpart}{\MakeUppercase{#1}}%
+      \addcontentsline{tbc}{bpart}{\MakeUppercase{\futuraheavy #1}}%
     \fi
     {\centering
      \interlinepenalty \@M
      \normalfont
      \ifnum \c at secnumdepth >-2\relax
-       \fontfamily{\sfdefault}\fontsize{80pt}{80pt}\fontseries{bc}\selectfont
+       \futuraboldc\fontsize{80pt}{80pt}\selectfont
        \MakeUppercase{\partname\nobreakspace\thepart}%
        \par
        \vskip 0.45in%
      \fi
-     \fontfamily{\dgdefault}\fontsize{16pt}{16pt}\fontseries{br}\selectfont
-     \MakeUppercase{#2}\par}%
+    \dogma \fontsize{16pt}{16pt}\selectfont
+     \MakeUppercase{\sochapter{#2}}\par}%
     \@endpart}
 %    \end{macrocode}
 % \end{macro}
@@ -1489,8 +1791,8 @@
   \addcontentsline{toc}{part}{\MakeUppercase{#1}}%
   \addcontentsline{tbc}{bpart}{\MakeUppercase{#1}}%
     {\centering
-      \fontfamily{\dgdefault}\fontsize{16pt}{16pt}\fontseries{br}\selectfont
-     \MakeUppercase{#2}\par}%
+     \dogma \fontsize{16pt}{16pt}\selectfont
+     \MakeUppercase{\sochapter{#2}}\par}%
     \@endpart}
 %    \end{macrocode}
 % \end{macro}
@@ -1547,7 +1849,7 @@
   \addcontentsline{tbc}{bchapter}{%
     \chaptername~\thechapter:~#1}%
   {\centering
-    \fontfamily{\sfdefault}\fontseries{bc}\fontsize{120pt}{120pt}
+    \futuraboldc\fontsize{120pt}{120pt}
     \selectfont
     \thechapter\par\nobreak\vskip27pt}%
   \else
@@ -1557,8 +1859,8 @@
   \markboth{#1}{#1}%
   \fi
   {\centering
-    \fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{#2}\par}\nobreak\vskip25pt\relax%
+   \dogma\fontsize{16pt}{18pt}\selectfont
+    \MakeUppercase{\sochapter{#2}}\par}\nobreak\vskip25pt\relax%
   \@firstparatrue
   \@afterheading}%
 %    \end{macrocode}
@@ -1572,12 +1874,13 @@
 \def\@schapter[#1]#2{%
   \vspace*{2.747in}
   {\centering
+    \phantomsection
     \addcontentsline{toc}{chapter}{%
       \MakeUppercase{#1}}%
     \addcontentsline{tbc}{bchapter}{#1}%
     \markboth{#1}{#1}%
-    {\fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-      \MakeUppercase{#2}\par}}\nobreak\vskip25pt\relax%
+    {\fontsize{16pt}{18pt}\selectfont
+      \MakeUppercase{\dogma \sochapter{#2}}\par}}\nobreak\vskip25pt\relax%
    \@firstparatrue
    \@afterheading}%
 %    \end{macrocode}
@@ -1629,6 +1932,53 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{\chapterwithquote}
+% \changes{v2.0}{2023/04/08}{Introduced the command}
+%    \begin{macrocode}
+\def\chapterwithquote{%
+  \clearpage
+  {\pagestyle{empty}\cleardoublepage}%
+  \everypar{}%
+  \thispagestyle{empty}%
+  \global\@topnum\z@
+  \@afterindentfalse
+  \gdef\@chapterart{}%
+  \secdef\@chapterwithquote\@schapter}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@chapterwithquote}
+% \changes{v2.0}{2023/04/08}{Introduced the command}
+%    \begin{macrocode}
+\def\@chapterwithquote[#1]#2#3#4{%
+  \vspace*{0.622in}
+  \ifnum \c at secnumdepth > \m at 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
+    \futuraboldc\fontsize{120pt}{120pt}
+    \selectfont
+    \thechapter\par\nobreak\vskip27pt}%
+  \else
+  \addcontentsline{toc}{chapter}{%
+    \MakeUppercase{#1}}%
+  \addcontentsline{tbc}{bchapter}{#1}%
+  \markboth{#1}{#1}%
+  \fi
+  {\centering
+    \dogma\fontsize{16pt}{18pt}\selectfont
+    \MakeUppercase{\sochapter{#2}}\par\vspace{.1in}\normalfont\fontsize{9pt}{11pt}\selectfont\textit{#3}\par\textit{\textemdash#4}\par}\nobreak\vskip25pt\relax%
+  \@firstparatrue
+  \@afterheading}%
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{\chapterart}
 % \changes{v0.6}{2008/03/21}{Introduced the command} 
 %   This creates the chapterart:
@@ -1655,7 +2005,7 @@
 %    \begin{macrocode}
 \renewcommand{\section}{\everypar{}%
   \@startsection{section}{1}{-0.75in}{16pt}{6pt}{%
-    \fontfamily{\sfdefault}\fontseries{b}\fontsize{12pt}{16pt}\selectfont}}%
+    \sffamily \bfseries \fontsize{12pt}{16pt}\selectfont}}%
 %    \end{macrocode}   
 % \end{macro}
 % 
@@ -1664,8 +2014,8 @@
 %    \begin{macrocode}
 \renewcommand{\subsection}{\everypar{}%
   \@startsection{subsection}{2}{0pt}{14pt}{4pt}{%
-    \fontfamily{\sfdefault}\fontshape{it}%
-    \fontseries{bc}\fontsize{12pt}{17pt}\selectfont}}%
+    \futuraboldcoblique
+    \fontsize{12pt}{17pt}\selectfont}}%
 %    \end{macrocode}   
 % \end{macro}
 %
@@ -1675,7 +2025,7 @@
 %    \begin{macrocode}
 \renewcommand{\subsubsection}{\everypar{}%
   \@startsection{subsubsection}{3}{0pt}{10pt}{2pt}{%
-  \fontfamily{\sfdefault}\fontseries{bp}\fontsize{10pt}{14pt}%
+  \futuraboldc \fontsize{10pt}{14pt}%
     \selectfont}}%
 %    \end{macrocode}   
 % \end{macro}
@@ -1722,7 +2072,7 @@
 %   This is the default list on the first level
 %    \begin{macrocode}
 \def\@listi{\leftmargin\leftmargini
-  \labelwidth\leftmargin\relax
+  \labelwidth\leftmargini\relax
   \advance\labelwidth-\labelsep\relax
   \parsep0\p@\relax
   \topsep6\p@\relax
@@ -1809,8 +2159,17 @@
 %    \end{macrocode}
 %   
 % \end{macro}
-% 
 %
+% \begin{macro}{description}
+% \changes{v2.0}{2023/04/08}{Redefined}
+%    \begin{macrocode}
+\renewenvironment{description}%
+  {\list{}{\labelwidth=0pt \leftmargin=18pt
+   \let\makelabel\descriptionlabel}}
+  {\endlist}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{quotation}
 %   In |quotation| environment the paragraphs are indented.  We use
 %   9pt Roman for quotations:
@@ -1841,10 +2200,9 @@
 %   Note is a special environment for asides.  It is in italics with
 %   the word ``NOTE'' on the margin:
 %    \begin{macrocode}
-\newenvironment{note}{%  
-  \list{\makebox[0pt][r]{\fontfamily{%
-          \dgdefault}\fontseries{b}\fontsize{9pt}{11pt}\selectfont 
-        NOTE\hspace{2em}}}{\listparindent0pt\relax
+\newenvironment{note}{%
+  \list{\makebox[0pt][r]{\dogma \fontsize{7.5pt}{12pt}
+      \colorbox{black}{\textcolor{white}{\sonote{NOTE}}}\hspace{2em}}}{\listparindent0pt\relax
     \topsep9\p@\relax
     \itemindent0\p@\relax
     \rightmargin0\p@\relax
@@ -1855,8 +2213,18 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% \begin{macro}{plainlist}
+% \changes{v2.0}{2023/04/08}{Added macro}
+\newenvironment{plainlist}{%
+  \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textbf{##1}} % Add em space to description label
+  \begin{description}%
+  }{%
+    \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textbf{##1 \quad}} % Add em space to description label
+  \end{description}%
+}
+
+% \end{macro}
 %
-%
 %\subsection{Footnotes}
 %\label{sec:footnotes}
 %
@@ -1898,7 +2266,7 @@
 % \changes{v0.3}{2008/03/11}{Changed LaTeX defaults} 
 %   We make some space between footnotes:
 %    \begin{macrocode}
-\setlength{\skip\footins}{16\p@ \@plus 4\p@ \@minus 0\p@}
+\setlength{\skip\footins}{20\p@ \@plus 4\p@ \@minus 0\p@}
 %    \end{macrocode}
 %   
 % \end{macro}
@@ -1909,15 +2277,17 @@
 % footnote text} 
 %   We do not indent the footnotes:
 %    \begin{macrocode}
+% \renewcommand\@makefntext[1]{%
+%     \parindent 0\p@%
+%     \RaggedRightParindent0\p@%
+%     \noindent
+%     \@makefnmark\space#1}
 \renewcommand\@makefntext[1]{%
-    \parindent 0\p@%
-    \RaggedRightParindent0\p@%
-    \noindent
-    \@makefnmark\space#1}
+\@thefnmark.~#1}  
 %    \end{macrocode}
 % \end{macro}
+% 
 %
-%
 %\subsection{Tables,  Figures and Listings}
 %\label{sec:tbl_fig}
 %
@@ -1938,49 +2308,103 @@
 %    \end{macrocode}
 % \end{macro}
 % \begin{macro}{\thelistings}
-%   And the same for listings:
+% \changes{v1.4}{2020/04/24}{Added \cs{AtBeginDocument}} 
+%   And the same for listings.  Note that listings package uses
+%   \cs{AtBeginDocument}, so we need to postpone this
 %    \begin{macrocode}
-\renewcommand \thelstlisting
-     {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at lstlisting}
+\AtBeginDocument{%
+  \renewcommand \thelstlisting
+  {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at lstlisting}%
+}
 %    \end{macrocode}
 % \end{macro}
-% 
 %
-% \begin{macro}{nostarchfigfmt}
-%   This is our captions format for figures and listings
-% \changes{v0.3}{2008/03/11}{Added style} 
+% Default listings settings
 %    \begin{macrocode}
-\DeclareCaptionFormat{nostarchfigfmt}{\fontfamily{\sfdefault}%
-  \fontshape{it}\fontsize{8.5pt}{9pt}\fontseries{k}\selectfont\unskip#1#2#3}
+\lstset{
+    frame = lines, 
+    showstringspaces=false,
+    tabsize=4,
+    title=\lstname,
+    numbers = none,
+    caption={},
+    literate={\ }{{\ }}1{"}{\textquotedbl}1,  
+    escapeinside={(@}{@)},
+    captionpos=b,
+    basicstyle=\ttfamily,
+    columns=fullflexible,
+    moredelim=[is][\bfseries]{***}{***},
+    moredelim=[is][\itshape]{___}{___},
+    moredelim=[is][\bfseries\itshape]{&&&}{&&&},
+    aboveskip=8pt,
+}
 %    \end{macrocode}
-% \end{macro}
-% \begin{macro}{nostarchtabfmt}
-% \changes{v0.3}{2008/03/11}{Added style} 
-%   This is our captions format for tables
+%
+% \begin{macro}{codewide}
+% \changes{v2.0}{2023/4/08}{Added environment}
 %    \begin{macrocode}
-\DeclareCaptionFormat{nostarchtabfmt}{\fontfamily{\sfdefault}%
-  \fontshape{rm}\fontsize{8.5pt}{9pt}\fontseries{h}\selectfont\unskip#1#2%
-  \fontseries{k}\selectfont#3}
+\lstnewenvironment
+    {codewide}[1][]
+    {
+    \renewcommand{\codewingding}[1]
+    {\ding{\the\numexpr ##1 + 181 \relax}} 
+   \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=-12pt, margin=-70pt}
+    \lstset{
+    frame = lines, 
+    showstringspaces=false,
+    tabsize=4,
+    title=\lstname,
+    numbers = none,
+    literate={\ }{{\ }}1{"}{\textquotedbl}1,  
+    escapeinside={(@}{@)},
+    captionpos=b,
+    caption={},
+    basicstyle=\ttfamily,
+    columns=fullflexible,
+    moredelim=[is][\bfseries]{***}{***},
+    moredelim=[is][\itshape]{___}{___},
+    moredelim=[is][\bfseries\itshape]{&&&}{&&&},
+    xleftmargin=-70pt,
+    aboveskip=8pt,
+    #1
+    }}
+    {
+    \renewcommand{\codewingding}[1]
+    {\vbox{\llap{\wingding{#1}\hskip 0.5em}}}
+    \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=0pt, margin=0pt}}
 %    \end{macrocode}
 % \end{macro}
-%  
 %
 %
-% The figure, listing and and table styles:
+% Fonts for captions
 %    \begin{macrocode}
-\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}
+\DeclareCaptionFont{nostarchfigfont}{\sffamily \itshape \fontsize{8.5pt}{9pt}\selectfont}
+\DeclareCaptionFont{nostarchtabfont}{\futurabook \fontsize{9pt}{9pt}\selectfont}
+\captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt}
+\captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=0pt}
+\captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf}
 %    \end{macrocode}
 %
+% \begin{macro}{\captionlst}
+% \begin{macro}{\boxlst}
+% \begin{macro}{\tablelst}
+\newcommand{\captionlst}[1]{{\ttfamily \itshape \fontsize{10pt}{9pt}\selectfont #1}}
+\newcommand{\boxlst}[1]{{\ttfamily \fontsize{10pt}{9pt}\selectfont #1}}
+\newcommand{\tablelst}[1]{{\ttfamily \fontsize{10pt}{9pt}\selectfont #1}}
+% \end{macro}
+% \end{macro}
+% \end{macro}
+%
 % \begin{macro}{\tbfont}
 %   This is the font used for table body:
 %    \begin{macrocode}
 \def\tbfont{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{8pt}{10pt}\selectfont}
+  \futurabook\fontsize{8.5pt}{10pt}\selectfont}
 %    \end{macrocode} 
 % \end{macro}
 %
@@ -1988,11 +2412,13 @@
 %   Font for table headers:
 %    \begin{macrocode}
 \def\thfont{%
-  \fontfamily{\sfdefault}\fontseries{h}\fontsize{8pt}{10pt}\selectfont}
+  \futuraheavy\fontsize{9pt}{10pt}\selectfont}
 %    \end{macrocode}
 % \end{macro}
+%    \begin{macrocode}
+\AtBeginEnvironment{tabular}{\tbfont}
+%    \end{macrocode}
 %
-%
 % \begin{macro}{\heawyrulewidth}
 % \begin{macro}{\lightrulewidth}
 % \begin{macro}{\cmidrulewidth}
@@ -1999,7 +2425,7 @@
 %   Changing \progname{booktabs} defaults:
 %    \begin{macrocode}
 \heavyrulewidth=3\p@
-\lightrulewidth=1.5\p@
+\lightrulewidth=1\p@
 \cmidrulewidth=1.5\p@
 %    \end{macrocode}
 % \end{macro}
@@ -2034,8 +2460,55 @@
 % \end{macro}
 % \end{macro}
 %  
+% \begin{macro}{tablewide}
+% Wide table
+%    \begin{macrocode}
+\newenvironment{tablewide}[1][]
+    {
+        \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, margin=-70pt}
+        \begin{table}[#1]
+    }
+    {
+        \end{table}
+        \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, margin=0pt}
+    }
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{tabularwide}
+% Wide tabular
+%    \begin{macrocode}
+\newenvironment{tabularwide}[1]
+    {
+        \hspace*{-72pt}
+        \begin{tabular}{#1}
+    }
+    {
+        \end{tabular}
+    }
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{figurewide}
+% Wide figure
+%    \begin{macrocode}
+    \newenvironment{figurewide}[1][]
+    {
+        \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt, margin=-70pt}
+        \begin{figure}[#1]
+        \hspace*{-70pt}
+    }
+    {
+        \end{figure}
+        \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt}
+    }
+%    \end{macrocode}
+% \end{macro}
+%
 %\subsection{Verbatim and Listings Customization}
 %\label{sec:verbatim}
 %
@@ -2042,7 +2515,7 @@
 % \begin{macro}{Code}
 %   This is for framed code:
 %    \begin{macrocode}
-\DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt}
+\DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt, commandchars=\\\{\}}
 %    \end{macrocode}   
 % \end{macro}
 %
@@ -2059,18 +2532,185 @@
 \VerbatimFootnotes
 %    \end{macrocode}
 % 
-% We set up captions with \progname{captions}:
+%
+%\subsection{Boxes and projects}
+%\label{sec:boxes}
+%
+% Various boxes.
+%
+% \begin{macro}{nspgray}
+% The color for boxes
 %    \begin{macrocode}
-\lstset{captionpos=b}
+\definecolor{nspgray}{cmyk}{0, 0, 0, 0.1}
 %    \end{macrocode}
-% 
-% And make the code to be in typewriter font:
+% \end{macro}
+%
+% And various mdframed styled boxes
 %    \begin{macrocode}
-\lstset{basicstyle=\ttfamily,columns=fullflexible}
+\mdfdefinestyle{nspbox}{%
+    linecolor=black,
+    outerlinewidth=1pt,
+    roundcorner=5pt,
+    innertopmargin=\baselineskip,
+    innerbottommargin=\baselineskip,
+    innerrightmargin=18pt,
+    innerleftmargin=18pt,
+    backgroundcolor=nspgray,
+    }
+    
+\mdfdefinestyle{custombox}{%
+    linecolor=black,
+    outerlinewidth=1pt,
+    roundcorner=5pt,
+    innertopmargin=\baselineskip,
+    innerbottommargin=\baselineskip,
+    innerrightmargin=18pt,
+    innerleftmargin=18pt,
+    }
+\newenvironment{nspbox}[1]
+{\begin{mdframed}[style=nspbox]
+    \begin{center} 
+    {\dogma \fontsize{9pt}{15pt} \MakeUppercase{\sobox{#1}}}
+    \end{center}
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{\end{flushleft}\end{flushright}
+\end{mdframed}}
+\newenvironment{nspboxcontinued}
+{\begin{mdframed}[style=nspbox]
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{
+\end{flushleft}
+\end{flushright}
+\end{mdframed}}
+\newenvironment{custombox}[1]
+{\begin{mdframed}[style=custombox]
+    \begin{center} 
+    {\dogma \fontsize{9pt}{15pt} \MakeUppercase{\sobox{#1}}}
+    \end{center}
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{\end{flushleft}\end{flushright}
+\end{mdframed}}
+
+\newenvironment{customboxcontinued}
+{\begin{mdframed}[style=custombox]
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{
+\end{flushleft}
+\end{flushright}
+\end{mdframed}}
+
+\newcommand{\continued}[0]{%
+    {\begin{flushright}%
+    \emph{(continued)}%
+    \end{flushright}}%
+}
 %    \end{macrocode}
-% 
 %
 %
+% Project stuff
+%    \begin{macrocode}
+\newcounter{project}
+\stepcounter{project}
+\newcommand{\projecthead}[1]{
+    \vspace{16pt}%
+    \noindent%
+    \hspace{-.75in}%
+    \addcontentsline{toc}{boldsection}{Project~\#\theproject: #1}%
+     {\sffamily\bfseries\fontsize{12pt}{16pt}\selectfont 
+        \colorbox{black}{\textcolor{white}{Project~\#\theproject: #1}}}%
+    \vspace{6pt}%
+    \@afterindentfalse\@afterheading%
+    \refstepcounter{project}%
+}
+%    \end{macrocode}
+%
+%
+%\subsection{Margin notes}
+%\label{sec:margins}
+%
+% Filenames on margins
+%    \begin{macrocode}
+\renewcommand*{\marginfont}{\sffamily\itshape\fontsize{8.5}{10}\selectfont}
+\renewcommand*{\marginnotevadjust}{-\baselineskip}
+\newcommand{\marginwingding}[1]{{\fontsize{10pt}{12pt}\selectfont \wingding{#1}}}
+%    \end{macrocode}
+%
+% Code below makes the margin note always on the left, taken from:
+% \url{https://tex.stackexchange.com/questions/472728/marginnote-always-on-left-side-of-the-page}
+%    \begin{macrocode}
+\long\def\@mn@@@marginnote[#1]#2[#3]{%
+  \begingroup
+    \ifmmode\mn at strut\let\@tempa\mn at vadjust\else
+      \if at inlabel\leavevmode\fi
+      \ifhmode\mn at strut\let\@tempa\mn at vadjust\else\let\@tempa\mn at vlap\fi
+    \fi
+    \@tempa{%
+      \vbox to\z@{%
+        \vss
+        \@mn at margintest
+        \if at reversemargin\if at tempswa
+            \@tempswafalse
+          \else
+            \@tempswatrue
+        \fi\fi
+
+          \llap{%
+            \vbox to\z@{\kern\marginnotevadjust\kern #3
+              \vbox to\z@{%
+                \hsize\marginparwidth
+                \linewidth\hsize
+                \kern-\parskip
+                %\mn at parboxrestore
+                \marginfont\raggedleftmarginnote\strut\hspace{\z@}%
+                \ignorespaces#1\endgraf
+                \vss
+              }%
+              \vss
+            }%
+            \if at mn@verbose
+              \PackageInfo{marginnote}{xpos seems to be \@mn at currxpos}%
+            \fi
+            \begingroup
+              \ifx\@mn at currxpos\relax\else\ifx\@mn at currpos\@empty\else
+                  \kern\@mn at currxpos
+              \fi\fi
+              \ifx\@mn at currpage\relax
+                \let\@mn at currpage\@ne
+              \fi
+              \if at twoside\ifodd\@mn at currpage\relax
+                  \kern-\oddsidemargin
+                \else
+                  \kern-\evensidemargin
+                \fi
+              \else
+                \kern-\oddsidemargin
+              \fi
+              \kern-1in
+            \endgroup
+            \kern\marginparsep
+          }%
+      }%
+    }%
+  \endgroup
+}
+%    \end{macrocode}
+%
 %\subsection{Bibliography}
 %\label{sec:biblio}
 %
@@ -2093,9 +2733,9 @@
     \addcontentsline{toc}{chapter}{\MakeUppercase{\bibname}}%
     \addcontentsline{tbc}{bchapter}{\bibname}%
     {\centering
-      {\fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-        \MakeUppercase{\bibname}\par}}\nobreak\vskip25pt\relax%
-    \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}}%
+      {\dogma\fontsize{16pt}{20pt}\selectfont
+        \MakeUppercase{\sochapter{\bibname}}\par}}\nobreak\vskip25pt\relax%
+    \@mkboth{\bibname}{\bibname}}}%
 %    \end{macrocode}
 %   
 % \end{macro}
@@ -2129,6 +2769,15 @@
 %
 %\subsection{Index}
 %\label{sec:index}
+%
+% \begin{macro}{\term}
+% \changes{v2.0}{2023/04/04}{Introduced the macro}
+% An indexed term
+%    \begin{macrocode}
+\newcommand{\term}[1]{\emph{#1}\index{#1}}
+%    \end{macrocode}
+% \end{macro}
+%
 % \begin{macro}{theindex}
 % \changes{v0.6}{2008/03/22}{Introduced the macro} 
 %  We want our index to be in the table of contents too:
@@ -2152,12 +2801,12 @@
   \addcontentsline{toc}{chapter}{\MakeUppercase{\indexname}}%
   \addcontentsline{tbc}{bchapter}{\indexname}%
   {\centering
-    {\fontfamily{\dgdefault}\fontseries{br}%
+    {\dogma%
       \fontsize{16pt}{20pt}\selectfont
-      \MakeUppercase{\indexname}\par}}%
+      \MakeUppercase{\sochapter{\indexname}}\par}}%
   \nobreak\vskip25pt\relax]%
-  \@mkboth{\MakeUppercase\indexname}%
-  {\MakeUppercase\indexname}%
+  \@mkboth{\indexname}%
+  {\indexname}%
   \parindent\z@
   \parskip\z@ \@plus .3\p@\relax
   \columnseprule \z@
@@ -2201,7 +2850,7 @@
 % \changes{v0.6}{2008/03/22}{Introduced the macro} 
 %   When an index starts a new letter, we call this macro:
 %    \begin{macrocode}
-\newcommand\indexgroup[1]{{\fontfamily{\sfdefault}%
+\newcommand\indexgroup[1]{{\futuraboldc
     \fontseries{bc}\fontsize{11\p@}{13\p@}\selectfont#1}\par\vskip4\p@}
 %    \end{macrocode}   
 % \end{macro}
@@ -2236,9 +2885,9 @@
   \gdef\@chapterart{}%
   \vspace*{1.875in}%
   {\centering
-    \fontfamily{\dgdefault}\fontseries{br}%
+   \dogma%
     \fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{\updatesname}\par\nobreak\vskip40\p@}%
+    \MakeUppercase{\sochapter{\updatesname}}\par\nobreak\vskip40\p@}%
   \@nobreaktrue
   \everypar{%
     \if at nobreak
@@ -2271,10 +2920,10 @@
   \global\@topnum\z@
   \gdef\@chapterart{}%
   \vspace*{0.875in}%
-  {\centering
-    \fontfamily{\dgdefault}\fontseries{br}%
-    \fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{\colophonname}\par\nobreak\vskip40\p@}%
+  %{\centering
+   %\dogma%
+   % \fontsize{16pt}{20pt}\selectfont
+    %\MakeUppercase{\sochapter{\colophonname}}\par\nobreak\vskip40\p@}%
   \@nobreaktrue
   \everypar{%
     \if at nobreak
@@ -2286,9 +2935,10 @@
     \everypar{}%
     \fi}\par
     The fonts used in \emph{\@title} are New Baskerville, Futura, The
-    Sans Mono Condensed and Dogma.  The book was typeset with
+    Sans Mono Condensed, and Dogma.  The book was typeset with
     \LaTeXe{} package 
-    \texttt{nostarch} by Boris Veytsman
+    \texttt{nostarch} by Boris Veytsman with many additions by Alex
+    Freed and other members of the \emph{No Starch Press} team
     \emph{(\csname ver at nostarch.cls\endcsname).}\par} 
 %    \end{macrocode}   
 % \end{macro}

Modified: trunk/Master/texmf-dist/source/latex/nostarch/nostarch.ins
===================================================================
--- trunk/Master/texmf-dist/source/latex/nostarch/nostarch.ins	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/source/latex/nostarch/nostarch.ins	2023-04-09 19:44:00 UTC (rev 66812)
@@ -1,7 +1,7 @@
 %
 % Doctrip file for nostarch
 % This file is in public domain
-% $Id: nostarch.ins,v 1.3 2008-03-23 21:48:10 boris Exp $
+% $Id$
 %
 \def\batchfile{nostarch.ins}
 \input docstrip

Modified: trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls	2023-04-09 19:44:00 UTC (rev 66812)
@@ -37,11 +37,15 @@
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{nostarch}
-[2008/06/06 v1.3 Typesetting books for No Starch Press]
+[2023/03/30 v2.0 Typesetting books for No Starch Press]
 \newif\ifnostarch at cfonts
 \nostarch at cfontstrue
 \DeclareOption{cfonts}{\nostarch at cfontstrue}
 \DeclareOption{nocfonts}{\nostarch at cfontsfalse}
+\newif\ifnostarch at fontsdir
+\nostarch at fontsdirtrue
+\DeclareOption{fontsdir}{\nostarch at fontsdirtrue}
+\DeclareOption{nofontsdir}{\nostarch at fontsdirfalse}
 \long\def\nostarch at size@warning#1{%
   \ClassWarning{nostarch}{Size-changing option #1 will not be
     honored}}%
@@ -58,22 +62,148 @@
     Configuration file nostarch.cfg is not found}}
 \ProcessOptions\relax
 \LoadClass[10pt]{book}
-\RequirePackage{ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
-  listings, caption, makeidx, upquote}
+\RequirePackage[table]{xcolor}
+\RequirePackage{iftex, ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
+  listings, caption, makeidx, upquote, pifont,
+  textcomp, xcolor, lmodern, nameref, float, amssymb, etoolbox,
+  setspace, marginnote}
+\RequirePackage[framemethod=TikZ]{mdframed}
+\RequirePackage{soul}
+\RequirePackage[T1]{fontenc}
 \RequirePackage{ragged2e}
+\RequirePackage{ragged2e}
 \setlength\RaggedRightParindent{\parindent}
 \RaggedRight
 \def\@nschapterpreamble{}
+\ifnostarch at fontsdir
+  \def\nostarch at fontspath#1{Path=fonts/#1/,}
+\else
+  \def\nostarch at fontspath#1{Path,}
+\fi
 \ifnostarch at cfonts
-  \RequirePackage{nbaskerv}%
-  \RequirePackage{futurans}%
-  \RequirePackage[scaled=0.85]{thsmc}%
-  \RequirePackage{dogma}%
-  \newcommand{\dgdefault}{fdg}%
+  \ifpdftex
+    \ClassWarning{nostarch}{Commercial fonts usually require xelatex engine}
+    \RequirePackage{nbaskerv}%
+    \RequirePackage{futurans}%
+    \RequirePackage[scaled=0.85]{thsmc}%
+    \RequirePackage{dogma}%
+    \newcommand{\dogma}{\fontfamily{fdg}\selectfont}%
+  \else %XeTeX or LuaTeX
+    \RequirePackage{fontspec}
+    \newfontface\dogma[
+    \nostarch at fontspath{dogma}
+    UprightFont=dogmab01.ttf,
+    Ligatures=TeX
+    ]{dogma}  % Font used for chapter titles
+
+    \newfontface\timesnewroman[
+    \nostarch at fontspath{tnr}
+    UprightFont=times.ttf,
+    BoldFont=timesbd.ttf,
+    ItalicFont=timesi.ttf,
+    BoldItalicFont=timesbi.ttf,
+    Ligatures=TeX
+    ]{timesnewroman}
+
+    \newfontface\futurabook[
+    \nostarch at fontspath{futurans}
+    UprightFont=FuturB37.ttf,
+    BoldFont=FuturH79.ttf,
+    ItalicFont=FutuBO08.ttf,
+    BoldItalicFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futurabook}
+
+    \newfontface\futuraheavy[
+    \nostarch at fontspath{futurans}
+    UprightFont=FuturH79.ttf,
+    Ligatures=TeX
+    ]{futuraheavy}
+
+    \newfontface\futuraboldc[
+    \nostarch at fontspath{futurans}
+    UprightFont=futucb18.ttf,
+    Ligatures=TeX
+    ]{futuraboldc}
+
+    \newfontface\futuraboldcoblique[
+    \nostarch at fontspath{futurans}
+    UprightFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futuraboldcoblique}
+
+    \newfontface\futuraoblique[
+    \nostarch at fontspath{futurans}
+    UprightFont=FutuBO08.ttf,
+    Ligatures=TeX
+    ]{futuraoblique}
+
+    \setmainfont{nbaskerv}[
+    \nostarch at fontspath{nbaskerv}
+    UprightFont=NewBaskervilleEF-Roman.ttf,
+    BoldFont=NewBaskervilleEF-Bold.ttf,
+    ItalicFont=NewBaskervilleEF-RomanIta.ttf,
+    BoldItalicFont=NewBaskervilleEF-BoldIta.ttf,
+    Ligatures=TeX]
+
+    \setmonofont[Scale=0.85,
+    \nostarch at fontspath{thsmc}
+    UprightFont=ThSMCP25.ttf,
+    BoldFont=ThSMCB02.ttf,
+    ItalicFont=ThSMCI29.ttf,
+    BoldItalicFont=TSMCBI56.ttf]{thsmc}
+
+    \setsansfont[
+    \nostarch at fontspath{futurans}
+    UprightFont=futura.ttf,
+    BoldFont=FuturB41.ttf,
+    ItalicFont=FutuBO08.ttf,
+    BoldItalicFont=FutCBO63.ttf,
+    Ligatures=TeX
+    ]{futurans}
+
+  \fi
 \else
   \newcommand{\dgdefault}{\sfdefault}%
 \fi
+\providecommand{\dogma}{\fontfamily{dgdefault}\selectfont}
+\providecommand{\futuraboldc}{\fontfamily{\sfdefault}\fontseries{bc}%
+  \selectfont}
+\providecommand{\futuraboldcoblique}{\fontfamily{\sfdefault}\fontseries{bc}%
+  \itshape\selectfont}
+\providecommand{\futuraheavy}{\fontfamily{\sfdefault}\fontseries{hq}%
+  \selectfont}
+\providecommand{\futurabook}{\fontfamily{\sfdefault}\fontseries{k}%
+  \selectfont}
 \normalsize
+\newcommand{\wingding}[1]{\ding{\the\numexpr #1 + 181 \relax}}
+\newcommand{\codewingding}[1]{\vbox{\llap{\wingding{#1}\hskip 0.5em}}}
+\newcommand\menuarrow{\raisebox{.2ex}{\small $\blacktriangleright$}}
+\newcommand{\bettertilde}{\raisebox{-1ex}{\textasciitilde}}
+\newcommand{\slashslash}{%
+  \raisebox{.53ex}{%
+    \scalebox{.5}{%
+      \rotatebox[origin=c]{18}{$\mathbf{/}$}%
+    }%
+  }%
+}
+\renewcommand{\neq}{\mathrel
+  {%
+   \vphantom{=}%
+   \ooalign{\kern.05em\smash{\slashslash}\hidewidth\cr$=$\cr}%
+  }%
+}
+
+\newcommand\keycap[1]{\fauxschelper#1 \relax\relax}
+\def\fauxschelper#1 #2\relax{%
+  \fauxschelphelp#1\relax\relax%
+  \if\relax#2\relax\else\ \fauxschelper#2\relax\fi%
+}
+\def\Hscale{.83}\def\Vscale{.72}\def\Cscale{1.00}
+\def\fauxschelphelp#1#2\relax{%
+  \ifnum`#1>``\ifnum`#1<`\{\scalebox{\Hscale}[\Vscale]{\uppercase{#1}}\else%
+    \scalebox{\Cscale}[1]{#1}\fi\else\scalebox{\Cscale}[1]{#1}\fi%
+  \ifx\relax#2\relax\else\fauxschelphelp#2\relax\fi}
 \setlength{\paperheight}{9.25in}
 \setlength{\paperwidth}{7in}
 \ifpdf\relax
@@ -107,6 +237,10 @@
 \widowpenalty=10000
 \clubpenalty=10000
 \raggedbottom
+\sodef\sochapter{}{.150em}{.5em}{1em}
+\sodef\sotitle{}{.125em}{.5em}{1em}
+\sodef\sobox{}{.075em}{.5em}{1em}
+\sodef\sonote{}{.200em}{.5em}{1em}
 \renewcommand{\headrulewidth}{0pt}
 \renewcommand{\footrulewidth}{0pt}
 \pagestyle{fancy}
@@ -114,15 +248,15 @@
 \rhead{}
 \chead{}
 \fancyhfoffset[L]{1in}
-\fancyfoot[RO]{\fontfamily{\sfdefault}\fontsize{6pt}{6pt}%
+\fancyfoot[RO]{\sffamily \fontsize{6pt}{6pt}%
   \fontseries{lq}\selectfont\rightmark%
-  \hspace{2em}\fontseries{bc}\fontsize{9pt}{6pt}\selectfont\thepage}
+  \hspace{2em} \futuraboldc \fontsize{9pt}{6pt}\selectfont\thepage}
 \fancyfoot[LO]{}
 \fancyfoot[CO]{}
-\fancyfoot[LE]{\fontfamily{\sfdefault}\fontseries{bc}\fontsize{9pt}{6pt}%
-  \selectfont\thepage\hspace{2em}%
-  \fontseries{lq}\fontsize{6pt}{6pt}\selectfont%
-  \leftmark}
+\fancyfoot[LE]{\futuraboldc \fontsize{9pt}{6pt}%
+  \selectfont\thepage%
+  \fontseries{lq}\sffamily \fontsize{6pt}{6pt}\selectfont%
+  \hspace{2em}\leftmark}
 \fancyfoot[RE]{}
 \fancyfoot[CE]{}
 \newcommand{\subtitle}[1]{\gdef\@subtitle{#1}}
@@ -135,12 +269,11 @@
   \clearpage
   {\pagestyle{empty}\cleardoublepage}%
   \thispagestyle{empty}%
-  \null\vskip1.025in%
+  \null%\vskip1.025in%
   \leavevmode\noindent\hspace{1.66in}%
     \begin{minipage}[t]{2.5625in}%
     \flushright
-    \fontfamily{\sfdefault}\fontseries{b}%
-    \fontsize{12\p@}{13\p@}\selectfont
+    \sffamily\bfseries\fontsize{12\p@}{13\p@}\selectfont
     \MakeUppercase{\@title}%
   \end{minipage}}
 \def\maketitle{%
@@ -155,18 +288,18 @@
   \item\relax
   \centering
   \null\vskip0.855in%
-  {\fontfamily{\dgdefault}\fontseries{bk}\fontsize{36\p@}{37\p@}\selectfont
-    \MakeUppercase{\@title}\par}%
+  {\dogma \fontsize{36\p@}{37\p@}\selectfont
+    \MakeUppercase{\sotitle{\@title}}\par}%
   \if\@subtitle\@empty\relax\else
      {\null\vskip25\p@%
-     \fontfamily{\dgdefault}\fontseries{bq}\fontsize{24\p@}{25\p@}\selectfont
+    \dogma \fontsize{24\p@}{25\p@}\selectfont
     \@subtitle\par}%
   \fi
-  \vspace{1.7in}%
+  \vspace{2.15in}%
   \vspace{-\baselineskip}%
-  {\fontfamily{\sfdefault}\fontseries{hq}\fontsize{18\p@}{22\p@}\selectfont
+  {\futuraheavy\fontsize{18\p@}{22\p@}\selectfont
     by \@author\par}%
-  \vspace{0.45in}%
+  \vspace{12\p@}%
   \vspace{\baselineskip}%
   \if\@nostarchlogo\@empty\relax\else
     \includegraphics[height=1.08in]{\@nostarchlogo}\par
@@ -195,16 +328,24 @@
   \parindent\z@\parfillskip\@flushglue\parskip\z at skip}{\par\vskip8pt\relax}
 \newenvironment{dedicationpage}{%
   \clearpage
-  {\pagestyle{empty}\cleardoublepage}%
+  \bgroup
+  \list{}{\leftmargin-1in\rightmargin\z@\labelwidth\z@%
+    \labelsep\z@\listparindent\z@\parsep8\p@\itemsep\z@%
+    \topsep\z@\partopsep\z@}%
+  \item\relax
   \thispagestyle{empty}%
   \null\vskip1.175in%
-  \centering\normalfont}{\clearpage}
-\def\briefcontentsname{Brief Contents}
+  \centering\normalfont}{%
+  \endlist
+  \egroup
+  \clearpage}
+\def\briefcontentsname{{Brief Contents}}
 \def\contentsname{Contents in Detail}%
 \AtBeginDocument{\@ifpackageloaded{babel}{%
   \addto\captionsenglish{%
     \renewcommand{\contentsname}%
     {Contents in Detail}}}{}}
+\newcommand{\apptoc}{\renewcommand{\chaptername}{Appendix}}
 \newcommand\brieftableofcontents{%
   \clearpage
   {\pagestyle{empty}\cleardoublepage}%
@@ -217,8 +358,8 @@
     \topsep\z@\partopsep\z@}%
   \item\relax
     {\centering
-      \fontfamily{\dgdefault}\fontseries{bs}\fontsize{16\p@}{18\p@}\selectfont
-      \MakeUppercase{\briefcontentsname}\par}\vskip40pt%
+     \dogma\fontsize{16\p@}{18\p@}\selectfont
+      \MakeUppercase{\sochapter{Brief Contents}}\par}\vskip40pt%
   \@starttoc{tbc}%
   \endlist
   \egroup}
@@ -234,8 +375,8 @@
     \topsep\z@\partopsep\z@}%
   \item\relax
     {\centering
-      \fontfamily{\dgdefault}\fontseries{bs}\fontsize{16\p@}{18\p@}\selectfont
-      \MakeUppercase{\contentsname}\par}\vskip18pt%
+     \dogma\fontsize{16\p@}{18\p@}\selectfont
+      \MakeUppercase{\sochapter{Contents in Detail}}\par}\vskip18pt%
   \@starttoc{toc}%
   \endlist
   \egroup}
@@ -248,7 +389,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       {\leavevmode
-       \fontfamily{\sfdefault}\fontseries{bq}\fontsize{12\p@}{14\p@}\selectfont
+       \sffamily\bfseries\fontsize{12\p@}{14\p@}\selectfont
        #1}\par
        \nobreak
          \global\@nobreaktrue
@@ -264,27 +405,35 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       \leavevmode
-      \fontfamily{\sfdefault}\fontseries{bq}\fontsize{10\p@}{12\p@}\selectfont
-      #1\nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
+      \sffamily \bfseries \fontsize{10\p@}{12\p@}\selectfont{#1}%
+      \nobreak\hfil \nobreak\hb at xt@\@pnumwidth{\hss #2}\par
       \vskip4\p@\penalty\@highpenalty
     \endgroup
   \fi}
 \newlength{\sectionnumberwidth}
 \settowidth{\sectionnumberwidth}{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+  \futurabook\fontsize{9\p@}{11\p@}\selectfont
   99.99}
+\newlength{\boldsectionnumberwidth}
+\settowidth{\boldsectionnumberwidth}{%
+  \futuraheavy\fontsize{9\p@}{11\p@}\selectfont
+  99.99}
 \newlength{\subsectionnumberwidth}
 \settowidth{\subsectionnumberwidth}{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{11\p@}\selectfont
+  \futurabook\fontsize{9\p@}{11\p@}\selectfont
   99.99.99}
 \renewcommand{\l at 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}}
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#2}}
 \renewcommand{\l at 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}}
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futurabook\fontsize{9\p@}{11\p@}\selectfont#2}}
+\newcommand*\l at boldsection[2]{{\bfseries\@dottedtocline{1}{\z@}{%
+    \boldsectionnumberwidth}{%
+    \futuraheavy\fontsize{9\p@}{11\p@}\selectfont#1}{%
+    \futuraheavy\fontsize{9\p@}{11\p@}\selectfont#2}}}
 \newcommand*\l at bpart[2]{%
   \ifnum \c at tocdepth >-2\relax
     \addpenalty{-\@highpenalty}%
@@ -293,7 +442,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       {\leavevmode
-       \fontfamily{\sfdefault}\fontseries{h}\fontsize{9\p@}{14\p@}\selectfont
+       \futuraheavy\fontsize{9\p@}{14\p@}\selectfont
        #1}\par\vskip7\p@%
        \nobreak
          \global\@nobreaktrue
@@ -300,6 +449,7 @@
          \everypar{\global\@nobreakfalse\everypar{}}%
     \endgroup
   \fi}
+\renewcommand{\@pnumwidth}{17pt}
 \newcommand*\l at bchapter[2]{%
   \ifnum \c at tocdepth >\m at ne
     \addpenalty{-\@highpenalty}%
@@ -308,7 +458,7 @@
       \parindent \z@ \rightskip \@pnumwidth
       \parfillskip -\@pnumwidth
       \leavevmode
-      \fontfamily{\sfdefault}\fontseries{k}\fontsize{9\p@}{14\p@}\selectfont
+      \futurabook\fontsize{9\p@}{14\p@}\selectfont
       #1\nobreak\leaders\hbox{$\m at th
         \mkern \@dotsep mu\hbox{.}\mkern \@dotsep
         mu$}\hfill
@@ -329,6 +479,7 @@
 \def\sectionmark#1{}%
 \newif\if at firstpara
 \@firstparafalse
+\newcommand{\turnoffbigpara}{\@firstparafalse}
 \def\@chapterart{}
 \def\secdef#1#2{\@ifstar{\@dblarg{#2}}{\@dblarg{#1}}}
 \renewcommand\part{%
@@ -345,29 +496,29 @@
       \refstepcounter{part}%
       \addcontentsline{toc}{part}{\MakeUppercase{\partname}
         \thepart\protect\linebreak\penalty\@highpenalty\MakeUppercase{#1}}%
-      \addcontentsline{tbc}{bpart}{\MakeUppercase{\partname~\thepart: #1}}%
+      \addcontentsline{tbc}{bpart}{\MakeUppercase{\partname~\thepart: \futuraheavy #1}}%
     \else
       \addcontentsline{toc}{part}{\MakeUppercase{#1}}%
-      \addcontentsline{tbc}{bpart}{\MakeUppercase{#1}}%
+      \addcontentsline{tbc}{bpart}{\MakeUppercase{\futuraheavy #1}}%
     \fi
     {\centering
      \interlinepenalty \@M
      \normalfont
      \ifnum \c at secnumdepth >-2\relax
-       \fontfamily{\sfdefault}\fontsize{80pt}{80pt}\fontseries{bc}\selectfont
+       \futuraboldc\fontsize{80pt}{80pt}\selectfont
        \MakeUppercase{\partname\nobreakspace\thepart}%
        \par
        \vskip 0.45in%
      \fi
-     \fontfamily{\dgdefault}\fontsize{16pt}{16pt}\fontseries{br}\selectfont
-     \MakeUppercase{#2}\par}%
+    \dogma \fontsize{16pt}{16pt}\selectfont
+     \MakeUppercase{\sochapter{#2}}\par}%
     \@endpart}
 \def\@spart[#1]#2{%
   \addcontentsline{toc}{part}{\MakeUppercase{#1}}%
   \addcontentsline{tbc}{bpart}{\MakeUppercase{#1}}%
     {\centering
-      \fontfamily{\dgdefault}\fontsize{16pt}{16pt}\fontseries{br}\selectfont
-     \MakeUppercase{#2}\par}%
+     \dogma \fontsize{16pt}{16pt}\selectfont
+     \MakeUppercase{\sochapter{#2}}\par}%
     \@endpart}
 \def\@endpart{%
   \@afterindentfalse
@@ -396,7 +547,7 @@
   \addcontentsline{tbc}{bchapter}{%
     \chaptername~\thechapter:~#1}%
   {\centering
-    \fontfamily{\sfdefault}\fontseries{bc}\fontsize{120pt}{120pt}
+    \futuraboldc\fontsize{120pt}{120pt}
     \selectfont
     \thechapter\par\nobreak\vskip27pt}%
   \else
@@ -406,19 +557,20 @@
   \markboth{#1}{#1}%
   \fi
   {\centering
-    \fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{#2}\par}\nobreak\vskip25pt\relax%
+   \dogma\fontsize{16pt}{18pt}\selectfont
+    \MakeUppercase{\sochapter{#2}}\par}\nobreak\vskip25pt\relax%
   \@firstparatrue
   \@afterheading}%
 \def\@schapter[#1]#2{%
   \vspace*{2.747in}
   {\centering
+    \phantomsection
     \addcontentsline{toc}{chapter}{%
       \MakeUppercase{#1}}%
     \addcontentsline{tbc}{bchapter}{#1}%
     \markboth{#1}{#1}%
-    {\fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-      \MakeUppercase{#2}\par}}\nobreak\vskip25pt\relax%
+    {\fontsize{16pt}{18pt}\selectfont
+      \MakeUppercase{\dogma \sochapter{#2}}\par}}\nobreak\vskip25pt\relax%
    \@firstparatrue
    \@afterheading}%
 \def\@afterheading{%
@@ -452,19 +604,55 @@
         \normalsize\selectfont
        \fi
     \@firstparafalse}}%
+\def\chapterwithquote{%
+  \clearpage
+  {\pagestyle{empty}\cleardoublepage}%
+  \everypar{}%
+  \thispagestyle{empty}%
+  \global\@topnum\z@
+  \@afterindentfalse
+  \gdef\@chapterart{}%
+  \secdef\@chapterwithquote\@schapter}
+\def\@chapterwithquote[#1]#2#3#4{%
+  \vspace*{0.622in}
+  \ifnum \c at secnumdepth > \m at 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
+    \futuraboldc\fontsize{120pt}{120pt}
+    \selectfont
+    \thechapter\par\nobreak\vskip27pt}%
+  \else
+  \addcontentsline{toc}{chapter}{%
+    \MakeUppercase{#1}}%
+  \addcontentsline{tbc}{bchapter}{#1}%
+  \markboth{#1}{#1}%
+  \fi
+  {\centering
+    \dogma\fontsize{16pt}{18pt}\selectfont
+    \MakeUppercase{\sochapter{#2}}\par\vspace{.1in}\normalfont\fontsize{9pt}{11pt}\selectfont\textit{#3}\par\textit{\textemdash#4}\par}\nobreak\vskip25pt\relax%
+  \@firstparatrue
+  \@afterheading}%
 \newcommand{\chapterart}[1]{\gdef\@chapterart{#1}}%
 \newcommand{\chapterartfile}[1]{\gdef\@chapterart{%
     \includegraphics[width=1.264in]{#1}}}%
 \renewcommand{\section}{\everypar{}%
   \@startsection{section}{1}{-0.75in}{16pt}{6pt}{%
-    \fontfamily{\sfdefault}\fontseries{b}\fontsize{12pt}{16pt}\selectfont}}%
+    \sffamily \bfseries \fontsize{12pt}{16pt}\selectfont}}%
 \renewcommand{\subsection}{\everypar{}%
   \@startsection{subsection}{2}{0pt}{14pt}{4pt}{%
-    \fontfamily{\sfdefault}\fontshape{it}%
-    \fontseries{bc}\fontsize{12pt}{17pt}\selectfont}}%
+    \futuraboldcoblique
+    \fontsize{12pt}{17pt}\selectfont}}%
 \renewcommand{\subsubsection}{\everypar{}%
   \@startsection{subsubsection}{3}{0pt}{10pt}{2pt}{%
-  \fontfamily{\sfdefault}\fontseries{bp}\fontsize{10pt}{14pt}%
+  \futuraboldc \fontsize{10pt}{14pt}%
     \selectfont}}%
 \setlength{\leftmargin}{0.25in}
 \setlength{\leftmargini}{0.25in}
@@ -473,7 +661,7 @@
 \setlength{\leftmarginiv}{0.25in}
 \setlength{\rightmargin}{0pt}
 \def\@listi{\leftmargin\leftmargini
-  \labelwidth\leftmargin\relax
+  \labelwidth\leftmargini\relax
   \advance\labelwidth-\labelsep\relax
   \parsep0\p@\relax
   \topsep6\p@\relax
@@ -527,6 +715,10 @@
         \csname label\@enumctr\endcsname
         {\usecounter\@enumctr\def\makelabel##1{##1}}%
         \fi}
+\renewenvironment{description}%
+  {\list{}{\labelwidth=0pt \leftmargin=18pt
+   \let\makelabel\descriptionlabel}}
+  {\endlist}
 \renewenvironment{quotation}{%
   \list{}{\listparindent\parindent\relax
     \itemindent\listparindent\relax
@@ -540,9 +732,8 @@
     \leftmargin0.5in\relax}%
     \item\fontsize{9pt}{11pt}\selectfont}{\endlist}
 \newenvironment{note}{%
-  \list{\makebox[0pt][r]{\fontfamily{%
-          \dgdefault}\fontseries{b}\fontsize{9pt}{11pt}\selectfont
-        NOTE\hspace{2em}}}{\listparindent0pt\relax
+  \list{\makebox[0pt][r]{\dogma \fontsize{7.5pt}{12pt}
+      \colorbox{black}{\textcolor{white}{\sonote{NOTE}}}\hspace{2em}}}{\listparindent0pt\relax
     \topsep9\p@\relax
     \itemindent0\p@\relax
     \rightmargin0\p@\relax
@@ -550,6 +741,14 @@
     \labelwidth0\p@\relax
     \labelsep0\p@}%
     \item\itshape}{\vspace{-3pt}\endlist}
+\newenvironment{plainlist}{%
+  \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textbf{##1}} % Add em space to description label
+  \begin{description}%
+  }{%
+    \renewcommand{\descriptionlabel}[1]{\hspace{\labelsep}\textbf{##1 \quad}} % Add em space to description label
+  \end{description}%
+}
+
 \renewcommand\footnoterule{%
   \kern6\p@
   \hrule height 0.25pt depth 0pt width 1in
@@ -567,35 +766,83 @@
       \@makefntext{%
         \rule\z@{13.5pt}\ignorespaces#1}%
     \color at endgroup}}%
-\setlength{\skip\footins}{16\p@ \@plus 4\p@ \@minus 0\p@}
+\setlength{\skip\footins}{20\p@ \@plus 4\p@ \@minus 0\p@}
 \renewcommand\@makefntext[1]{%
-    \parindent 0\p@%
-    \RaggedRightParindent0\p@%
-    \noindent
-    \@makefnmark\space#1}
+\@thefnmark.~#1}
 \renewcommand \thefigure
      {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at figure}
 \renewcommand \thetable
      {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at table}
-\renewcommand \thelstlisting
-     {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at lstlisting}
-\DeclareCaptionFormat{nostarchfigfmt}{\fontfamily{\sfdefault}%
-  \fontshape{it}\fontsize{8.5pt}{9pt}\fontseries{k}\selectfont\unskip#1#2#3}
-\DeclareCaptionFormat{nostarchtabfmt}{\fontfamily{\sfdefault}%
-  \fontshape{rm}\fontsize{8.5pt}{9pt}\fontseries{h}\selectfont\unskip#1#2%
-  \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}
+\AtBeginDocument{%
+  \renewcommand \thelstlisting
+  {\ifnum \c at chapter>\z@ \thechapter-\fi \@arabic\c at lstlisting}%
+}
+\lstset{
+    frame = lines,
+    showstringspaces=false,
+    tabsize=4,
+    title=\lstname,
+    numbers = none,
+    caption={},
+    literate={\ }{{\ }}1{"}{\textquotedbl}1,
+    escapeinside={(@}{@)},
+    captionpos=b,
+    basicstyle=\ttfamily,
+    columns=fullflexible,
+    moredelim=[is][\bfseries]{***}{***},
+    moredelim=[is][\itshape]{___}{___},
+    moredelim=[is][\bfseries\itshape]{&&&}{&&&},
+    aboveskip=8pt,
+}
+\lstnewenvironment
+    {codewide}[1][]
+    {
+    \renewcommand{\codewingding}[1]
+    {\ding{\the\numexpr ##1 + 181 \relax}}
+   \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=-12pt, margin=-70pt}
+    \lstset{
+    frame = lines,
+    showstringspaces=false,
+    tabsize=4,
+    title=\lstname,
+    numbers = none,
+    literate={\ }{{\ }}1{"}{\textquotedbl}1,
+    escapeinside={(@}{@)},
+    captionpos=b,
+    caption={},
+    basicstyle=\ttfamily,
+    columns=fullflexible,
+    moredelim=[is][\bfseries]{***}{***},
+    moredelim=[is][\itshape]{___}{___},
+    moredelim=[is][\bfseries\itshape]{&&&}{&&&},
+    xleftmargin=-70pt,
+    aboveskip=8pt,
+    #1
+    }}
+    {
+    \renewcommand{\codewingding}[1]
+    {\vbox{\llap{\wingding{#1}\hskip 0.5em}}}
+    \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=0pt, margin=0pt}}
+\DeclareCaptionFont{nostarchfigfont}{\sffamily \itshape \fontsize{8.5pt}{9pt}\selectfont}
+\DeclareCaptionFont{nostarchtabfont}{\futurabook \fontsize{9pt}{9pt}\selectfont}
+\captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt}
+\captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=4pt, belowskip=0pt}
+\captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf}
+\newcommand{\captionlst}[1]{{\ttfamily \itshape \fontsize{10pt}{9pt}\selectfont #1}}
+\newcommand{\boxlst}[1]{{\ttfamily \fontsize{10pt}{9pt}\selectfont #1}}
+\newcommand{\tablelst}[1]{{\ttfamily \fontsize{10pt}{9pt}\selectfont #1}}
 \def\tbfont{%
-  \fontfamily{\sfdefault}\fontseries{k}\fontsize{8pt}{10pt}\selectfont}
+  \futurabook\fontsize{8.5pt}{10pt}\selectfont}
 \def\thfont{%
-  \fontfamily{\sfdefault}\fontseries{h}\fontsize{8pt}{10pt}\selectfont}
+  \futuraheavy\fontsize{9pt}{10pt}\selectfont}
+\AtBeginEnvironment{tabular}{\tbfont}
 \heavyrulewidth=3\p@
-\lightrulewidth=1.5\p@
+\lightrulewidth=1\p@
 \cmidrulewidth=1.5\p@
 \def\bottomrule{\noalign{\ifnum0=`}\fi
   \@aboverulesep=\aboverulesep
@@ -606,11 +853,185 @@
 \belowbottomsep=0.65pt
 \aboverulesep=0.7ex
 \abovetopsep=0.65pt
-\DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt}
+\newenvironment{tablewide}[1][]
+    {
+        \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, margin=-70pt}
+        \begin{table}[#1]
+    }
+    {
+        \end{table}
+        \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, margin=0pt}
+    }
+\newenvironment{tabularwide}[1]
+    {
+        \hspace*{-72pt}
+        \begin{tabular}{#1}
+    }
+    {
+        \end{tabular}
+    }
+    \newenvironment{figurewide}[1][]
+    {
+        \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt, margin=-70pt}
+        \begin{figure}[#1]
+        \hspace*{-70pt}
+    }
+    {
+        \end{figure}
+        \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
+  aboveskip=8pt,belowskip=-8pt}
+    }
+\DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt, commandchars=\\\{\}}
 \FV at AddToHook\FV at ListParameterHook{\vspace{-6pt}}
 \VerbatimFootnotes
-\lstset{captionpos=b}
-\lstset{basicstyle=\ttfamily,columns=fullflexible}
+\definecolor{nspgray}{cmyk}{0, 0, 0, 0.1}
+\mdfdefinestyle{nspbox}{%
+    linecolor=black,
+    outerlinewidth=1pt,
+    roundcorner=5pt,
+    innertopmargin=\baselineskip,
+    innerbottommargin=\baselineskip,
+    innerrightmargin=18pt,
+    innerleftmargin=18pt,
+    backgroundcolor=nspgray,
+    }
+
+\mdfdefinestyle{custombox}{%
+    linecolor=black,
+    outerlinewidth=1pt,
+    roundcorner=5pt,
+    innertopmargin=\baselineskip,
+    innerbottommargin=\baselineskip,
+    innerrightmargin=18pt,
+    innerleftmargin=18pt,
+    }
+\newenvironment{nspbox}[1]
+{\begin{mdframed}[style=nspbox]
+    \begin{center}
+    {\dogma \fontsize{9pt}{15pt} \MakeUppercase{\sobox{#1}}}
+    \end{center}
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{\end{flushleft}\end{flushright}
+\end{mdframed}}
+\newenvironment{nspboxcontinued}
+{\begin{mdframed}[style=nspbox]
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{
+\end{flushleft}
+\end{flushright}
+\end{mdframed}}
+\newenvironment{custombox}[1]
+{\begin{mdframed}[style=custombox]
+    \begin{center}
+    {\dogma \fontsize{9pt}{15pt} \MakeUppercase{\sobox{#1}}}
+    \end{center}
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{\end{flushleft}\end{flushright}
+\end{mdframed}}
+
+\newenvironment{customboxcontinued}
+{\begin{mdframed}[style=custombox]
+    \begin{flushright}
+    \begin{flushleft}
+    \parskip=.5\baselineskip
+    \tbfont
+}
+{
+\end{flushleft}
+\end{flushright}
+\end{mdframed}}
+
+\newcommand{\continued}[0]{%
+    {\begin{flushright}%
+    \emph{(continued)}%
+    \end{flushright}}%
+}
+\newcounter{project}
+\stepcounter{project}
+\newcommand{\projecthead}[1]{
+    \vspace{16pt}%
+    \noindent%
+    \hspace{-.75in}%
+    \addcontentsline{toc}{boldsection}{Project~\#\theproject: #1}%
+     {\sffamily\bfseries\fontsize{12pt}{16pt}\selectfont
+        \colorbox{black}{\textcolor{white}{Project~\#\theproject: #1}}}%
+    \vspace{6pt}%
+    \@afterindentfalse\@afterheading%
+    \refstepcounter{project}%
+}
+\renewcommand*{\marginfont}{\sffamily\itshape\fontsize{8.5}{10}\selectfont}
+\renewcommand*{\marginnotevadjust}{-\baselineskip}
+\newcommand{\marginwingding}[1]{{\fontsize{10pt}{12pt}\selectfont \wingding{#1}}}
+\long\def\@mn@@@marginnote[#1]#2[#3]{%
+  \begingroup
+    \ifmmode\mn at strut\let\@tempa\mn at vadjust\else
+      \if at inlabel\leavevmode\fi
+      \ifhmode\mn at strut\let\@tempa\mn at vadjust\else\let\@tempa\mn at vlap\fi
+    \fi
+    \@tempa{%
+      \vbox to\z@{%
+        \vss
+        \@mn at margintest
+        \if at reversemargin\if at tempswa
+            \@tempswafalse
+          \else
+            \@tempswatrue
+        \fi\fi
+
+          \llap{%
+            \vbox to\z@{\kern\marginnotevadjust\kern #3
+              \vbox to\z@{%
+                \hsize\marginparwidth
+                \linewidth\hsize
+                \kern-\parskip
+                %\mn at parboxrestore
+                \marginfont\raggedleftmarginnote\strut\hspace{\z@}%
+                \ignorespaces#1\endgraf
+                \vss
+              }%
+              \vss
+            }%
+            \if at mn@verbose
+              \PackageInfo{marginnote}{xpos seems to be \@mn at currxpos}%
+            \fi
+            \begingroup
+              \ifx\@mn at currxpos\relax\else\ifx\@mn at currpos\@empty\else
+                  \kern\@mn at currxpos
+              \fi\fi
+              \ifx\@mn at currpage\relax
+                \let\@mn at currpage\@ne
+              \fi
+              \if at twoside\ifodd\@mn at currpage\relax
+                  \kern-\oddsidemargin
+                \else
+                  \kern-\evensidemargin
+                \fi
+              \else
+                \kern-\oddsidemargin
+              \fi
+              \kern-1in
+            \endgroup
+            \kern\marginparsep
+          }%
+      }%
+    }%
+  \endgroup
+}
 \AtBeginDocument{
   \def\bibsection{%
     \clearpage
@@ -625,9 +1046,9 @@
     \addcontentsline{toc}{chapter}{\MakeUppercase{\bibname}}%
     \addcontentsline{tbc}{bchapter}{\bibname}%
     {\centering
-      {\fontfamily{\dgdefault}\fontseries{br}\fontsize{16pt}{20pt}\selectfont
-        \MakeUppercase{\bibname}\par}}\nobreak\vskip25pt\relax%
-    \@mkboth{\MakeUppercase\bibname}{\MakeUppercase\bibname}}}%
+      {\dogma\fontsize{16pt}{20pt}\selectfont
+        \MakeUppercase{\sochapter{\bibname}}\par}}\nobreak\vskip25pt\relax%
+    \@mkboth{\bibname}{\bibname}}}%
 \renewenvironment{thebibliography}[1]{%
   \bibsection
       \list{\@biblabel{\@arabic\c at enumiv}}%
@@ -646,6 +1067,7 @@
      {\def\@noitemerr
        {\@latex at warning{Empty `thebibliography' environment}}%
       \endlist}
+\newcommand{\term}[1]{\emph{#1}\index{#1}}
 \renewenvironment{theindex}{%
   \clearpage
   {\pagestyle{empty}\cleardoublepage}%
@@ -665,12 +1087,12 @@
   \addcontentsline{toc}{chapter}{\MakeUppercase{\indexname}}%
   \addcontentsline{tbc}{bchapter}{\indexname}%
   {\centering
-    {\fontfamily{\dgdefault}\fontseries{br}%
+    {\dogma%
       \fontsize{16pt}{20pt}\selectfont
-      \MakeUppercase{\indexname}\par}}%
+      \MakeUppercase{\sochapter{\indexname}}\par}}%
   \nobreak\vskip25pt\relax]%
-  \@mkboth{\MakeUppercase\indexname}%
-  {\MakeUppercase\indexname}%
+  \@mkboth{\indexname}%
+  {\indexname}%
   \parindent\z@
   \parskip\z@ \@plus .3\p@\relax
   \columnseprule \z@
@@ -683,7 +1105,7 @@
 \renewcommand\subitem{\@idxitem \hspace*{0.15in}}
 \renewcommand\subsubitem{\@idxitem \hspace*{0.3in}}
 \renewcommand\indexspace{\par \vskip 14\p@\relax}
-\newcommand\indexgroup[1]{{\fontfamily{\sfdefault}%
+\newcommand\indexgroup[1]{{\futuraboldc
     \fontseries{bc}\fontsize{11\p@}{13\p@}\selectfont#1}\par\vskip4\p@}
 \def\updatesname{Updates}
 \newcommand\updatespage{%
@@ -695,9 +1117,9 @@
   \gdef\@chapterart{}%
   \vspace*{1.875in}%
   {\centering
-    \fontfamily{\dgdefault}\fontseries{br}%
+   \dogma%
     \fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{\updatesname}\par\nobreak\vskip40\p@}%
+    \MakeUppercase{\sochapter{\updatesname}}\par\nobreak\vskip40\p@}%
   \@nobreaktrue
   \everypar{%
     \if at nobreak
@@ -714,10 +1136,10 @@
   \global\@topnum\z@
   \gdef\@chapterart{}%
   \vspace*{0.875in}%
-  {\centering
-    \fontfamily{\dgdefault}\fontseries{br}%
-    \fontsize{16pt}{20pt}\selectfont
-    \MakeUppercase{\colophonname}\par\nobreak\vskip40\p@}%
+  %{\centering
+   %\dogma%
+   % \fontsize{16pt}{20pt}\selectfont
+    %\MakeUppercase{\sochapter{\colophonname}}\par\nobreak\vskip40\p@}%
   \@nobreaktrue
   \everypar{%
     \if at nobreak
@@ -729,9 +1151,10 @@
     \everypar{}%
     \fi}\par
     The fonts used in \emph{\@title} are New Baskerville, Futura, The
-    Sans Mono Condensed and Dogma.  The book was typeset with
+    Sans Mono Condensed, and Dogma.  The book was typeset with
     \LaTeXe{} package
-    \texttt{nostarch} by Boris Veytsman
+    \texttt{nostarch} by Boris Veytsman with many additions by Alex
+    Freed and other members of the \emph{No Starch Press} team
     \emph{(\csname ver at nostarch.cls\endcsname).}\par}
 \endinput
 %%

Modified: trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty	2023-04-09 19:44:00 UTC (rev 66812)
@@ -36,7 +36,7 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 \ProvidesPackage{nshyper}
-[2008/06/06 v1.3 Typesetting books for No Starch Press]
+[2023/03/30 v2.0 Typesetting books for No Starch Press]
 \RequirePackage[breaklinks,colorlinks,linkcolor=black,
   citecolor=black,pagecolor=black,urlcolor=black,hyperindex,
   bookmarks=false]{hyperref}

Modified: trunk/Master/tlpkg/libexec/ctan2tds
===================================================================
--- trunk/Master/tlpkg/libexec/ctan2tds	2023-04-08 23:48:58 UTC (rev 66811)
+++ trunk/Master/tlpkg/libexec/ctan2tds	2023-04-09 19:44:00 UTC (rev 66812)
@@ -3379,6 +3379,7 @@
  'bibtex'               => 'xampl\.bib$',
  'cnltx'                => '\.bib$',
  'dtk-bibliography'	=> '\.bib$',
+ 'nostarch'		=> '\.bib$',
 );
 
 # packages which have Metafont sources to run.



More information about the tex-live-commits mailing list.