texlive[67072] Master/texmf-dist: nostarch (11may23)

commits+karl at tug.org commits+karl at tug.org
Thu May 11 22:10:13 CEST 2023


Revision: 67072
          http://tug.org/svn/texlive?view=revision&revision=67072
Author:   karl
Date:     2023-05-11 22:10:13 +0200 (Thu, 11 May 2023)
Log Message:
-----------
nostarch (11may23)

Modified Paths:
--------------
    trunk/Master/texmf-dist/bibtex/bib/nostarch/nostarch.bib
    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/nostarch.dtx
    trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
    trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.pdf
    trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.tex
    trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf
    trunk/Master/texmf-dist/doc/latex/nostarch/urltest.tex

Modified: trunk/Master/texmf-dist/bibtex/bib/nostarch/nostarch.bib
===================================================================
--- trunk/Master/texmf-dist/bibtex/bib/nostarch/nostarch.bib	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/bibtex/bib/nostarch/nostarch.bib	2023-05-11 20:10:13 UTC (rev 67072)
@@ -13,7 +13,7 @@
   author =        {Boris Veytsman},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/fonts/psfonts/adobe/nbaskerv}},
+  {\url{https:/ctan.org/pkg/nbaskerv}},
   title =         {{\LaTeX} Support For New Baskerville Fonts From
                    Adobe},
   year =          {2008},
@@ -23,7 +23,7 @@
   author =        {Boris Veytsman},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/fonts/psfonts/adobe/futurans}},
+  {\url{https://ctan.org/pkg/futurans}},
   title =         {{\LaTeX} Support For Futura Fonts From Adobe As Used
                    By No Starch Press},
   year =          {2008},
@@ -33,7 +33,7 @@
   author =        {Boris Veytsman},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/fonts/psfonts/emigre/dogma}},
+  {\url{https://ctan.org/pkg/dogma}},
   title =         {{\LaTeX} Support For Dogma Fonts From Emigre
                    Graphics},
   year =          {2008},
@@ -43,7 +43,7 @@
   author =        {Boris Veytsman},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/fonts/psfonts/fontfabrik/thsmc}},
+  {\url{https://ctan.org/pkg/thsmc}},
   title =         {{\LaTeX} Support For The Sans Mono Condensed Fonts},
   year =          {2008},
 }
@@ -52,7 +52,7 @@
   author =        {Heiko Oberdiek},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/oberdiek}},
+  {\url{https://ctan.org/pkg/oberdiek}},
   title =         {The \textsf{ifpdf} Package},
   year =          {2006},
 }
@@ -61,7 +61,7 @@
   author =        {van Oostrum, Piet},
   month =         {March},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/fancyhdr}},
+  {\url{https://ctan.org/pkg/fancyhdr}},
   title =         {Page Layout in \LaTeX},
   year =          {2004},
 }
@@ -70,7 +70,7 @@
   author =        {Simon Fear},
   month =         {April},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/booktabs}},
+  {\url{https://ctan.org/pkg/booktabs}},
   title =         {Publication Quality Tables in {\LaTeX}},
   year =          {2005},
 }
@@ -79,7 +79,7 @@
   author =        {D. P. Carlisle},
   month =         {November},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/required/graphics}},
+  {\url{https://ctan.org/pkg/graphics}},
   title =         {Packages in the `Graphics' Bundle},
   year =          {2005},
 }
@@ -88,7 +88,7 @@
   author =        {Axel Sommerfeldt},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/caption}},
+  {\url{https://ctan.org/pkg/caption}},
   title =         {Typesetting Captions with the \textsf{caption}
                    Package},
   year =          {2007},
@@ -99,7 +99,7 @@
   editor =        {Denis Girou},
   month =         {July},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/fancyvrb}},
+  {\url{https://ctan.org/pkg/fancyvrb}},
   title =         {The \textsf{`fancyvrb'} Package. Fancy Verbatims in
                    {\LaTeX}},
   year =          {1998},
@@ -109,7 +109,7 @@
   author =        {Martin Schr\"oder},
   month =         {March},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/ms}},
+  {\url{https://ctan.org/pkg/ms}},
   title =         {The \textsf{ragged2e} Package},
   year =          {2003},
 }
@@ -118,7 +118,7 @@
   author =        {Sebastian Rahtz and Heiko Oberdiek},
   month =         {September},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/hyperref}},
+  {\url{https://ctan.org/pkg/hyperref}},
   title =         {Hypertext Marks in \LaTeX: a Manual for Hyperref},
   year =          {2006},
 }
@@ -137,7 +137,7 @@
   author =        {Patrick W. Daly},
   month =         {February},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/natbib}},
+  {\url{https://ctan.org/pkg/natbib}},
   title =         {Natural Sciences Citations and References
                    (Author-Year and Numerical Schemes)},
   year =          {2007},
@@ -147,7 +147,7 @@
   author =        {Peter Wilson},
   month =         {January},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/memoir}},
+  {\url{https://ctan.org/pkg/memoir}},
   title =         {The Memoir Class for Configurable Typesetting},
   year =          {2004},
 }
@@ -156,7 +156,7 @@
   author =        {Leslie Lamport and Frank Mittelbach and
                    Johannes Braams},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/base}},
+  {\url{https://ctan.org/pkg/base}},
   title =         {Standard Document Classes for {\LaTeX{}} version 2e},
   year =          {1997},
 }
@@ -164,7 +164,7 @@
 @manual{Heinz07:Listings,
   author =        {Carsten Heinz and Brooks Moses},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/listings}},
+  {\url{https://ctan.org/pkg/listings}},
   title =         {The \textsf{Listings} Package},
   year =          {2007},
 }
@@ -173,7 +173,7 @@
 @manual{Covington03:Upquote,
   author =        {Michale A. Covington and Frank Mittelback},
   note =
-  {\url{http://ctan.tug.org/tex-archive/macros/latex/contrib/upquote}},
+  {\url{https://ctan.org/pkg/upquote}},
   title =         {Covington's Upright-Quote Modification to Verbatim and 
                    Verb},
   year =          {2003},

Modified: trunk/Master/texmf-dist/doc/latex/nostarch/README
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/README	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/README	2023-05-11 20:10:13 UTC (rev 67072)
@@ -10,6 +10,14 @@
 
 CHANGES:
 
+Version 2.1
+    Urls now correspond to the requirements of NoStarch: italic font,
+    low tilde, splitting according to the NoStarch rules
+    Bibliography updates
+    New formatting for captions.
+    Longtable is now loaded by default
+    New code for colored rows
+
 Version 2.0:
     Incorporated the changes by Alex Freed and other members of
     the NoStarch team over the years.

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-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/nssample.tex	2023-05-11 20:10:13 UTC (rev 67072)
@@ -11,11 +11,11 @@
 
 \frontmatter
 
-\author{A.~U.~Thor, C.~O.~R.~Respondent and W.~R.~Iter}
+\author{Boris Veytsman}
 
-\title{Pellentesque habitant morbi}
+\title{\emph{No Starch Press} example file}
 
-\subtitle{Cum sociis natoque penatibus}
+\subtitle{A short demonstration}
 
 \nostarchlogo{vitruvian.jpg}
 
@@ -25,9 +25,8 @@
 
 
 \begin{copyrightpage}
-  \textbf{\sffamily\MakeUppercase{Pellentesque habitant morbi.}}
-  Copyright \textcopyright{} 2008 by A.~U.~Thor, C.~O.~R.~Respondent
-  and W.~R.~Iter
+  \textbf{\sffamily\MakeUppercase{\emph{No Start Press} example file}}
+  Copyright \textcopyright{} 2023 by Boris Veytsman
 
   No rights reserved. Any part of this work may be reproduced or
   transmitted in any form or by any means, electronic or mechanical,
@@ -116,8 +115,15 @@
 
 \chapter*[Foreword by R.~E.~Viewer]{Foreword}
 
-\lipsum[48-60]
+This is a foreword.  Note that the chapter\index{chapter} has two
+arguments: the title of the chapter and the title for the table of
+contents\index{table of contents!adding to}.  The first paragraph
+is automatically typeset in a larger font.
 
+Now a couple of paragraphs of filler text to make some pages.
+
+\lipsum[1-3]
+
 \bigskip
 
 \begin{raggedright}
@@ -128,22 +134,32 @@
 \end{raggedright}
 
 \mainmatter
-\part{Mi aliquam dictum}
+\part{The first part}
 
+The main part of the book starts with the command, well,
+\path{\mainmatter}\index{main matter}.
+
+Again some filler.
+
 \lipsum[77-78]
 
-\chapter[Morbi ac orci]{Morbi ac orci et nisl hendrerit
-  mollis}
+\chapter[The first chapter]{The first chapter (the long title)}
 
 \chapterartfile{1eurogr}\index{euro, coin!Greece}\index{Greek euro|see{euro}}
 
+The first chapter again has two versions of the title.  There is a
+special command \path{\chapterartfile}.  It adds the art vignette to
+the start of the chapter.  Now again some filler---but here we show
+how to add index entries to the text.  Fusce adipiscing justo nec
+ante. Nullam in enim.  Pellentesque felis orci, sagittis ac, malesuada
+et, facilisis in, ligula\index{ligula}.  Nunc\index{nunc} non magna
+sit amet mi aliquam dictum\index{dictum}.
 
-Fusce adipiscing justo nec ante. Nullam in enim.  Pellentesque felis
-orci, sagittis ac, malesuada et, facilisis in, ligula\index{ligula}.
-Nunc\index{nunc} non magna sit amet mi aliquam dictum\index{dictum}.
-
 \section{Quisque aliquam ipsum sed turpis}
 
+Some additional filler\ldots
+
+
 \lipsum[1]
 
 Nam dui ligula\index{ligula}, \emph{fringilla a}, euismod sodales,
@@ -167,6 +183,8 @@
 
 \section{Nunc\index{nunc} non magna sit amet mi aliquam dictum}
 
+The index can be even in the section head.
+
 \lipsum[32-33]
 
 \subsection{Nam sed augue}
@@ -177,16 +195,18 @@
 
 \lipsum[36-38]
 
-\chapter{Proin vel urna}
+\chapter{Footnotes, figures and tables}
 \label{chap:proin}
 \chapterartfile{100euroit}\index{euro, coin!Italy}\index{Italian
   euro|see{euro}} 
 
-Aenean imperdiet\footnote{Quisque aliquam ipsum sed turpis\index{turpis}}.
-Vestibulum ante ipsum pri\-m\-is in faucibus orci luctus et ultrices
-posuere cubilia Curae; Donec lacinia nonummy lectus. Proin vel urna.
-Fusce sit amet orci ac magna iaculis pharetra.
 
+Some examples of footnotes.  Aenean imperdiet\footnote{Quisque aliquam
+  ipsum sed turpis\index{turpis}}.  Vestibulum ante ipsum pri\-m\-is
+in faucibus orci luctus et ultrices posuere cubilia Curae; Donec
+lacinia nonummy lectus. Proin vel urna.  Fusce sit amet orci ac magna
+iaculis pharetra.
+
 Fusce adipiscing justo nec ante. Nullam in enim.  Pellentesque felis
 orci, sagittis ac, malesuada et, facilisis in, ligula\index{ligula}.
 Nunc\index{nunc} non magna sit amet mi aliquam dictum. In mi.
@@ -228,6 +248,7 @@
   odio.
 \end{itemize}
 
+
 \begin{figure}[tp]
   \includegraphics[width=3in]{vitruvian}
   \index{Da Vinci, Leonardo@\emph{Da Vinci, Leonardo}}
@@ -234,7 +255,8 @@
   \index{Leonardo Da Vinci@\emph{Leonardo Da Vinci}|see{Da Vinci,
       Leonardo}}
   \index{Vitruvian Man}
-  \caption{Pellentesque laoreet velit nec justo}
+  \caption{Vitruvian man.  Note that the caption is typeset in a box
+    with the width automatically calculated from the image.}
   \label{fig:one}
 \end{figure}
 
@@ -333,11 +355,10 @@
 
 \begin{table}[tp]
   \caption[Sed blandit, tortor a auctor]{Sed blandit, tortor a auctor
-    imperdiet, wisi nibh\\ ornare leo, 
+    imperdiet, wisi nibh ornare leo, 
     ac dictum nibh enim eu orci}
-  \tbfont
-  \begin{tabular}{@{}lll}
-    \toprule\let\normalfont=\bfseries%
+  \begin{tabular}{lll}
+    \toprule
     \thfont Phasellus &  \thfont At Dui       & \thfont Donec Commodo \\
     \midrule    
      Augue At Nunc    & Nunc In  sapien       & Et magna mollis \\
@@ -365,10 +386,47 @@
 erat rhoncus consectetuer. Aenean pulvinar erat vitae\index{vita} mi.
 \index{donec|)}
 
+
 \section{Proin eget magna porta erat rhoncus consectetuer}
 
-\lipsum[123-124]
+\lipsum[123-125]
 
+\begin{longtable}{lll}
+  \caption{This is a longtable with a very long caption. It will be
+    typeset in several lines}\label{tab:longtable}\\
+  \toprule
+  \thfont First column & \thfont Second column\\
+  \midrule
+  \endfirsthead
+  \caption[]{This is a longtable with a very long caption. It will be
+    typeset in several lines---continued\ldots}\\
+  \toprule
+  \thfont First column & \thfont Second column\\
+  \midrule
+  \endhead
+  \bottomrule
+  \endfoot
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+  a & b\\
+  ab & bc\\
+  $\alpha$ & $\beta$\\
+\end{longtable}
+
+
 \part{Curabitur vitae}\index{vita|(}
 \label{part:Curabitur}
 

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

Index: trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.pdf	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.pdf	2023-05-11 20:10:13 UTC (rev 67072)

Property changes on: trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.tex	2023-05-11 20:10:13 UTC (rev 67072)
@@ -0,0 +1,215 @@
+\documentclass[cfonts, nofontsdir]{nostarch}
+\usepackage{nshyper}
+\begin{document}
+
+Some examples of tables
+
+
+\begin{table}[H]
+\caption{Similar to Figures, Table Titles Also Should Break Within the Table's Width Instead of Extending the Full Page Width Like This}\index{kinds, meanings of}
+\label{exampletable}
+\begin{tabular}{ll}
+  \toprule
+  \thfont Col 1 & \thfont Col 2 \\
+  \midrule
+  Lorem ipsum & dolor sit amet \\
+  consectetur adipiscing & elit sed do \\
+  eiusmod tempor & incididunt ut \\
+  labore et dolore & magna aliqua \\
+  ut enim ad & minim veniam \\
+  \bottomrule
+\end{tabular}
+\end{table}
+
+A long table
+
+\begin{longtable}{ll}
+  \caption{A very long table.  Its caption also wraps up like the
+    caption of figures and tables}\label{long table}\\
+  \toprule
+  \thfont Col 1 & \thfont Col 2 \\
+  \midrule
+  \endfirsthead
+  \caption[]{A very long table.  Its caption also wraps up like the
+    caption of figures and tables continued\ldots}\\
+  \toprule
+  \thfont Col 1 & \thfont Col 2 \\
+  \midrule
+  \endhead
+  \bottomrule
+  \endfoot
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+  this table is & long! \\
+\end{longtable}
+
+Equations have unequal amounts of spacing above and below them. The
+space before the following equation looks roughly twice as large as
+after.
+\begin{equation}
+mean~tot = b + c ~ temp + d ~ temp^2.
+\end{equation}  
+
+Additionally, the amount of space before/after equations is not always
+consistent. The below equation seems to have even more leading space
+than the previous one.
+\begin{equation}
+mean~tot = b + c ~ temp + d ~ temp^2 + e ~ hum + f ~ hum^2 + g ~ temp
+\times ~ hum.
+\end{equation}
+
+We've been manually adding \lstinline{\vspace} commands to account for this, which is not an ideal solution.
+
+
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/nostarch/tabletest.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf	2023-05-11 20:10:13 UTC (rev 67072)

Property changes on: trunk/Master/texmf-dist/doc/latex/nostarch/urltest.pdf
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/pdf
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/latex/nostarch/urltest.tex
===================================================================
--- trunk/Master/texmf-dist/doc/latex/nostarch/urltest.tex	                        (rev 0)
+++ trunk/Master/texmf-dist/doc/latex/nostarch/urltest.tex	2023-05-11 20:10:13 UTC (rev 67072)
@@ -0,0 +1,8 @@
+\documentclass[cfonts, nofontsdir]{nostarch}
+\usepackage{nshyper}
+\begin{document}
+\url{https://bilbo.dynip.com/~boris}
+
+
+\fbox{\parbox{.8cm}{\url{https://bilbo.dynip.com/~boris_ddd=2345&aaaaaaa-b-c-c-c-cdddddddddd@ddddddddd!ddddd?dddddd|dddddd,ddddd;ddddd'dddddd+dddddd<aaaaaa>bbbbbb(aaaaaa)bbbbbb[aaaaaa]bbbbb{aaaaaa}bbbbb"aaaaaaaa:bbbbbbbbb///////////bbbbbbbbbbb}}}
+\end{document}


Property changes on: trunk/Master/texmf-dist/doc/latex/nostarch/urltest.tex
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Modified: trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/source/latex/nostarch/nostarch.dtx	2023-05-11 20:10:13 UTC (rev 67072)
@@ -474,16 +474,21 @@
 % captions. The captions for figures go \emph{below} the figures, the
 % captions for tables go \emph{above} the tabular data.  
 %
-% If a caption for a table or figure turns out to be wider than the
-% body, you might want to split the caption into lines.  Remember,
-% however, that the mandatory argument to |\caption| becomes
-% ``robust'' in the \LaTeX{} parlance~\cite{Lamport94} only when there
-% is the optional one.  Therefore the correct way to split a caption
-% is the following:
+% \DescribeMacro{\NextCaptionWidth}%
+% The captions of tables and figures are automatically typeset with
+% the same width as the table or figure.  Sometimes, however, \LaTeX\
+% makes a mistake in the calculation.  In this case the macro
+% \cs{NextCaptionWidth}\marg{length} overrides this calculation and
+% sets the width of the caption for the next figure or table to
+% \marg{length}, for example
 % \begin{verbatim}
-% \caption[A Long Caption With Lines To Split]{%
-%   A Long Caption\\ With Lines To Split}
+% \NextCaptionWidth{2in}
+% \begin{figure}
+%   ...
+%   \caption{...}
+% \end{figure}
 % \end{verbatim}
+%
 % 
 % Typesetting tables, unfortunately, is rarely done right, and
 % standard \LaTeX{} is not an exception.  The authors are urged to
@@ -583,7 +588,19 @@
 % example, in quote characters.
 %
 %
+%\subsection{Boxes}
+%\label{sec:ug_boxes}
 %
+% \DescribeEnv{nspbox}%
+% You may put some information into \emph{boxes}.  Boxes have a \emph{heading}
+% and a \emph{text}.  The environment |nspbox| can be used to typeset
+% them, for example:
+% \begin{verbatim}
+% \begin{nspbox}{This is a heading}
+%   This is a text for the box.  
+% \end{nspbox}
+% \end{verbatim}
+%
 %\subsection{Back Matter}
 %\label{sec:guide:backmatter}
 %  
@@ -686,7 +703,7 @@
 %<class>\ProvidesClass{nostarch}
 %<nshyper>\ProvidesPackage{nshyper}
 %<*!ist>
-[2023/03/30 v2.0 Typesetting books for No Starch Press]
+[2023/04/08 v2.1 Typesetting books for No Starch Press]
 %</!ist>
 %    \end{macrocode}
 %
@@ -783,10 +800,11 @@
 % A bunch of packages:
 %    \begin{macrocode}
 \RequirePackage[table]{xcolor}  
-\RequirePackage{iftex, ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
+\RequirePackage{iftex, ifpdf, longtable,
+  fancyhdr, fancyvrb, booktabs, graphicx,
   listings, caption, makeidx, upquote, pifont,
   textcomp, xcolor, lmodern, nameref, float, amssymb, etoolbox,
-  setspace, marginnote}
+  setspace, marginnote, url}
 \RequirePackage[framemethod=TikZ]{mdframed}
 \RequirePackage{soul}
 \RequirePackage[T1]{fontenc}  
@@ -2377,17 +2395,189 @@
 %    \end{macrocode}
 % \end{macro}
 %
+% Setting up longtables
+%    \begin{macrocode}
+\def\LTleft{\z@}
+\def\LTright{\fill}
+%    \end{macrocode}
 %
+% \begin{macro}{\ifnostarch at overridecaptionwidth}
+% \changes{v2.1}{2023/04/09}{Introduced macro}
+% Whether the user wants to override automatically selected caption
+% width
+%    \begin{macrocode}
+\newif\ifnostarch at overridecaptionwidth
+\nostarch at overridecaptionwidthfalse
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nostarch at captionwidth}
+% \changes{v2.1}{2023/04/09}{Introduced macro}
+% The width of the caption.  Either set by the user or measured
+%    \begin{macrocode}
+\newlength\nostarch at captionwidth
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\NextCaptionWidth}
+% \changes{v2.1}{2023/04/09}{Introduced macro}
+% A user-level command to set the caption width
+%    \begin{macrocode}
+\newcommand\NextCaptionWidth[1]{%
+  \global\nostarch at overridecaptionwidthtrue
+  \global\setlength{\nostarch at captionwidth}{#1}%
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nostarch at measurecaptionwidth}
+% \changes{v2.1}{2023/04/09}{Introduced macro}
+% We set \cs{nostarch at captionwidth} to the width of the last box
+% unless the flag \cs{ifnostarch at overridecaptionwidth} is set.  At the
+% end we set the flag to false.
+%    \begin{macrocode}
+\newcommand\nostarch at measurecaptionwidth{%
+  \ifnostarch at overridecaptionwidth\else
+  \par
+  \setbox\@tempboxa\lastbox
+  \setbox\@tempboxa=\hbox{\unhbox\@tempboxa}%
+  \global\setlength{\nostarch at captionwidth}{\wd\@tempboxa}%
+  \box\@tempboxa\par
+  \fi
+  \global\nostarch at overridecaptionwidthfalse
+}
+%    \end{macrocode}
+% \end{macro}
+%
+% We measure the width at the begin of the figure caption.  Note that
+% the cs{AtBeginCaption} hook is too late for us.
+%    \begin{macrocode}
+\AtBeginDocument{%
+\pretocmd{\caption}{\def\@tempa{figure}%
+  \ifx\@tempa\@captype\relax
+  \nostarch at measurecaptionwidth
+  \fi}{}{}}
+%    \end{macrocode}
+%
+%
+% We declare the caption format for figures and tables
+%    \begin{macrocode}
+\DeclareCaptionFormat*{nostarchfigtblformat}{%
+  \parbox{\nostarch at captionwidth}{#1#2#3}}
+%    \end{macrocode}
+%
+% Tables are more complex, because captions are \emph{before} the
+% tables.  Therefore we need to write the width into aux file and read
+% it from there.  Most of the ideas here are stolen from
+% \textsl{longtable} code.
+%
+% \begin{macro}{\nostarch at tbl@warn}
+% \changes{v2.1}{2023/04/10}{Introduced macro}
+% Whether to ask the user for rerun due to changed widths
+%    \begin{macrocode}
+\def\nostarch at tbl@warn{}
+\AtEndDocument{\nostarch at tbl@warn}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\c at nostarch@tbl}
+% \changes{v2.1}{2023/04/10}{Introduced macro}
+% We write the table width into the macro \cs{nostarch at tbl@N}, where
+% $N$ is the roman representation of the table number
+%    \begin{macrocode}
+\newcounter{nostarch at tbl}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nostarch at read@tbl at width}
+% \changes{v2.1}{2023/04/10}{Introduced macro}
+% At the beginning of table environment we read the latest value of the
+% width for the given table and set the caption size
+%    \begin{macrocode}
+\newcommand\nostarch at read@tbl at width{%
+  \stepcounter{nostarch at tbl}%
+  \expandafter\ifx\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname\relax
+     \edef\@tempa{\the\textwidth}%
+  \else
+     \edef\@tempa{\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname}%
+  \fi
+  \expandafter\setlength\expandafter\nostarch at captionwidth\expandafter{\@tempa}%
+}
+\AtBeginEnvironment{table}{\nostarch at read@tbl at width}
+%    \end{macrocode}
+% \end{macro}
+%
+% \begin{macro}{\nostarch at save@tbl at width}
+% \changes{v2.1}{2023/04/10}{Introduced macro}
+% At the end of the table environment we measure the width of the last
+% box and write it in the aux file.
+%    \begin{macrocode}
+\newcommand\nostarch at save@tbl at width{%
+  \nostarch at measurecaptionwidth
+  \if at filesw
+     \immediate\write\@auxout{%
+     \gdef\expandafter\noexpand\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname
+     {\the\nostarch at captionwidth}}%
+  \fi
+  \expandafter\ifx\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname\relax
+    \edef\@tempa{\the\textwidth}%
+  \else
+    \edef\@tempa{\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname}%
+  \fi
+  \expandafter\ifdim\@tempa=\nostarch at captionwidth\else
+  \gdef\nostarch at tbl@warn{\ClassWarningNoLine{nostarch}
+    {Table widths have changed.  Rerun LaTeX.}}
+ \fi
+}
+\pretocmd{\endtable}{\nostarch at save@tbl at width}{}{}
+%    \end{macrocode}
+% \end{macro}
+%
+% The |H| specifier from the |float| package redefines the end of the
+% float, so we need to patch it too
+%    \begin{macrocode}
+\pretocmd{\float at endH}{\def\@tempa{table}%
+  \ifx\@tempa\@captype\nostarch at save@tbl at width\fi}{}{}
+%    \end{macrocode}
+%
+% \begin{macro}{\nostarch at read@LT at width}
+% \changes{v2.1}{2023/04/10}{Introduced macro}
+% The long table version of setting caption width is different,
+% because a longtable knows its width.
+%    \begin{macrocode}
+\def\nostarch at read@LT at width{%
+  \ifnostarch at overridecaptionwidth\else
+     \global\setlength{\nostarch at captionwidth}{\z@}%
+     \bgroup
+        \def\LT at entry##1##2{%
+          \global\addtolength{\nostarch at captionwidth}{##2}}%
+        \csname LT@\romannumeral\c at LT@tables\endcsname        
+     \egroup
+  \fi
+ \global\nostarch at overridecaptionwidthfalse
+}
+\AtBeginDocument{\pretocmd{\caption at LT@config}{\global\rownum=1\relax
+    \nostarch at read@LT at width}{}{}}
+\AtBeginEnvironment{longtable}{\global\rownum=0\relax}
+%    \end{macrocode}
+% \end{macro}
+%
+%
 % Fonts for captions
 %    \begin{macrocode}
-\DeclareCaptionFont{nostarchfigfont}{\sffamily \itshape \fontsize{8.5pt}{9pt}\selectfont}
-\DeclareCaptionFont{nostarchtabfont}{\futurabook \fontsize{9pt}{9pt}\selectfont}
+\DeclareCaptionFont{nostarchfigfont}{\sffamily
+  \itshape \fontsize{8.5pt}{9pt}\selectfont}
+\DeclareCaptionFont{nostarchtabfont}{\futurabook
+  \fontsize{9pt}{9pt}\selectfont}
+%    \end{macrocode}
+% And the setup
+%    \begin{macrocode}
 \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
-  aboveskip=8pt,belowskip=-8pt}
+  aboveskip=8pt,belowskip=-8pt, format=nostarchfigtblformat}
 \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
   aboveskip=4pt, belowskip=0pt}
 \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
-  aboveskip=0pt,belowskip=4pt, labelfont=bf}
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, format=nostarchfigtblformat}
 %    \end{macrocode}
 %
 % \begin{macro}{\captionlst}
@@ -2417,6 +2607,7 @@
 % \end{macro}
 %    \begin{macrocode}
 \AtBeginEnvironment{tabular}{\tbfont}
+\AtBeginEnvironment{longtable}{\tbfont}
 %    \end{macrocode}
 %
 % \begin{macro}{\heawyrulewidth}
@@ -2509,7 +2700,19 @@
 %    \end{macrocode}
 % \end{macro}
 %
-%\subsection{Verbatim and Listings Customization}
+% Setting up colors in tables
+%    \begin{macrocode}
+\rowcolors[]{1}{}{nspgray}
+%    \end{macrocode}
+%
+% We extend the height of the rows and delete the space arounr rules
+%    \begin{macrocode}
+\setlength{\aboverulesep}{0pt}
+\setlength{\belowrulesep}{0pt}
+\setlength{\extrarowheight}{.8ex}
+%    \end{macrocode}
+%
+%\subsection{Verbatim, url and Listings Customization}
 %\label{sec:verbatim}
 %
 % \begin{macro}{Code}
@@ -2556,6 +2759,7 @@
     innerrightmargin=18pt,
     innerleftmargin=18pt,
     backgroundcolor=nspgray,
+    everyline=true
     }
     
 \mdfdefinestyle{custombox}{%
@@ -2566,6 +2770,7 @@
     innerbottommargin=\baselineskip,
     innerrightmargin=18pt,
     innerleftmargin=18pt,
+    everyline=true
     }
 \newenvironment{nspbox}[1]
 {\begin{mdframed}[style=nspbox]
@@ -2640,7 +2845,75 @@
 }
 %    \end{macrocode}
 %
+% Urls are typeset in italics, with upper tilde, and according to the
+% following rules: URLs should break \emph{before} periods,
+% underscores, equal signs, ampersands, and hyphens but \emph{after}
+% colons, slashes and hash marks.  Also, we do not allow splitting
+% before slashes.
+% \begin{macro}{\UrlFont}
+% \changes{v2.1}{2023/04/08}{Redefined macro}
+% Urls are in italic
+%    \begin{macrocode}
+\def\UrlFont{\itshape}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\UrlTildeSpecial}
+% \changes{v2.1}{2023/04/08}{Redefined macro}
+%    \begin{macrocode}
+\def\UrlTildeSpecial{\do\~{\raise.2ex\hbox{\m at th$\scriptstyle\sim$}}}
+\let\Url at force@Tilde\UrlTildeSpecial
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\UrlBreaks}
+% \changes{v2.1}{2023/04/08}{Redefined macro}
+% \changes{v2.1}{2023/04/10}{Moved slashes to specials}
+% Breaks after colons, slashes, hash marks.  Colons are defined in
+% \cs{UrlBigBreaks}, so we need the other signs.  We also add some
+% other signs here
+%    \begin{macrocode}
+\def\UrlBreaks{\do\#\do\\\do\>\do\]\do\)\do\}}
+%    \end{macrocode}
+% \end{macro}
+% \begin{macro}{\UrlSpecials}
+% \changes{v2.1}{2023/04/08}{Redefined macro}
+% \changes{v2.1}{2023/04/11}{Added slashes and double quote}
+% We add to macro special treatment of the chars with breaking URLs.
+% Slashes are interesting: we allow breaking after them, but not
+% before, even after other slashes or colons
+% \emph{before} them
+%    \begin{macrocode}
+\g at addto@macro{\UrlSpecials}{%
+  \do\.{\penalty\UrlBreakPenalty\mathchar46\relax}%
+  \do\_{\penalty\UrlBreakPenalty\mathchar95\relax}%
+  \do\={\penalty\UrlBreakPenalty\mathchar61\relax}%
+  \do\&{\penalty\UrlBreakPenalty\mathchar38\relax}%
+  \do\-{\penalty\UrlBreakPenalty\mathchar45\relax}%
+  \do\!{\penalty\UrlBreakPenalty\mathchar33\relax}%
+  \do\?{\penalty\UrlBreakPenalty\mathchar63\relax}%
+  \do\|{\penalty\UrlBreakPenalty\mathchar124\relax}%
+  \do\,{\penalty\UrlBreakPenalty\mathchar44\relax}%
+  \do\;{\penalty\UrlBreakPenalty\mathchar59\relax}%
+  \do\@{\penalty\UrlBreakPenalty\mathchar64\relax}%
+  \do\'{\penalty\UrlBreakPenalty\mathchar39\relax}%
+  \do\"{\penalty\UrlBreakPenalty\mathchar34\relax}%
+  \do\+{\penalty\UrlBreakPenalty\mathchar43\relax}%
+  \do\<{\penalty\UrlBreakPenalty\mathchar60\relax}%
+  \do\[{\penalty\UrlBreakPenalty\mathchar91\relax}%
+  \do\({\penalty\UrlBreakPenalty\mathchar40\relax}%
+  \do\{{\penalty\UrlBreakPenalty\mathchar123\relax}%
+  \do\/{\unpenalty\penalty\@M\mathchar47\penalty\UrlBreakPenalty}%
+}
+%    \end{macrocode}
+% \end{macro}
 %
+% \begin{macro}{\UrlNoBreaks}
+% \changes{v2.1}{2023/04/08}{Redefined macro}
+% We allow breaks in urls after brackets
+%    \begin{macrocode}
+\def\UrlNoBreaks{}
+%    \end{macrocode}
+% \end{macro}
+%
 %\subsection{Margin notes}
 %\label{sec:margins}
 %
@@ -2960,8 +3233,7 @@
 %    \begin{macrocode}
 %<*nshyper>
 \RequirePackage[breaklinks,colorlinks,linkcolor=black,
-  citecolor=black,pagecolor=black,urlcolor=black,hyperindex,
-  bookmarks=false]{hyperref}
+  citecolor=black,pagecolor=black,urlcolor=black,hyperindex]{hyperref}
 %    \end{macrocode}
 % 
 % \progname{hyperref} expects the starred parts and chapters to have

Modified: trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/tex/latex/nostarch/nostarch.cls	2023-05-11 20:10:13 UTC (rev 67072)
@@ -37,7 +37,7 @@
 %%   Right brace   \}     Tilde         \~}
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesClass{nostarch}
-[2023/03/30 v2.0 Typesetting books for No Starch Press]
+[2023/04/08 v2.1 Typesetting books for No Starch Press]
 \newif\ifnostarch at cfonts
 \nostarch at cfontstrue
 \DeclareOption{cfonts}{\nostarch at cfontstrue}
@@ -63,10 +63,11 @@
 \ProcessOptions\relax
 \LoadClass[10pt]{book}
 \RequirePackage[table]{xcolor}
-\RequirePackage{iftex, ifpdf, fancyhdr, fancyvrb, booktabs, graphicx,
+\RequirePackage{iftex, ifpdf, longtable,
+  fancyhdr, fancyvrb, booktabs, graphicx,
   listings, caption, makeidx, upquote, pifont,
   textcomp, xcolor, lmodern, nameref, float, amssymb, etoolbox,
-  setspace, marginnote}
+  setspace, marginnote, url}
 \RequirePackage[framemethod=TikZ]{mdframed}
 \RequirePackage{soul}
 \RequirePackage[T1]{fontenc}
@@ -825,14 +826,89 @@
     {\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}
+\def\LTleft{\z@}
+\def\LTright{\fill}
+\newif\ifnostarch at overridecaptionwidth
+\nostarch at overridecaptionwidthfalse
+\newlength\nostarch at captionwidth
+\newcommand\NextCaptionWidth[1]{%
+  \global\nostarch at overridecaptionwidthtrue
+  \global\setlength{\nostarch at captionwidth}{#1}%
+}
+\newcommand\nostarch at measurecaptionwidth{%
+  \ifnostarch at overridecaptionwidth\else
+  \par
+  \setbox\@tempboxa\lastbox
+  \setbox\@tempboxa=\hbox{\unhbox\@tempboxa}%
+  \global\setlength{\nostarch at captionwidth}{\wd\@tempboxa}%
+  \box\@tempboxa\par
+  \fi
+  \global\nostarch at overridecaptionwidthfalse
+}
+\AtBeginDocument{%
+\pretocmd{\caption}{\def\@tempa{figure}%
+  \ifx\@tempa\@captype\relax
+  \nostarch at measurecaptionwidth
+  \fi}{}{}}
+\DeclareCaptionFormat*{nostarchfigtblformat}{%
+  \parbox{\nostarch at captionwidth}{#1#2#3}}
+\def\nostarch at tbl@warn{}
+\AtEndDocument{\nostarch at tbl@warn}
+\newcounter{nostarch at tbl}
+\newcommand\nostarch at read@tbl at width{%
+  \stepcounter{nostarch at tbl}%
+  \expandafter\ifx\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname\relax
+     \edef\@tempa{\the\textwidth}%
+  \else
+     \edef\@tempa{\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname}%
+  \fi
+  \expandafter\setlength\expandafter\nostarch at captionwidth\expandafter{\@tempa}%
+}
+\AtBeginEnvironment{table}{\nostarch at read@tbl at width}
+\newcommand\nostarch at save@tbl at width{%
+  \nostarch at measurecaptionwidth
+  \if at filesw
+     \immediate\write\@auxout{%
+     \gdef\expandafter\noexpand\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname
+     {\the\nostarch at captionwidth}}%
+  \fi
+  \expandafter\ifx\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname\relax
+    \edef\@tempa{\the\textwidth}%
+  \else
+    \edef\@tempa{\csname nostarch at tbl@\romannumeral\c at nostarch@tbl\endcsname}%
+  \fi
+  \expandafter\ifdim\@tempa=\nostarch at captionwidth\else
+  \gdef\nostarch at tbl@warn{\ClassWarningNoLine{nostarch}
+    {Table widths have changed.  Rerun LaTeX.}}
+ \fi
+}
+\pretocmd{\endtable}{\nostarch at save@tbl at width}{}{}
+\pretocmd{\float at endH}{\def\@tempa{table}%
+  \ifx\@tempa\@captype\nostarch at save@tbl at width\fi}{}{}
+\def\nostarch at read@LT at width{%
+  \ifnostarch at overridecaptionwidth\else
+     \global\setlength{\nostarch at captionwidth}{\z@}%
+     \bgroup
+        \def\LT at entry##1##2{%
+          \global\addtolength{\nostarch at captionwidth}{##2}}%
+        \csname LT@\romannumeral\c at LT@tables\endcsname
+     \egroup
+  \fi
+ \global\nostarch at overridecaptionwidthfalse
+}
+\AtBeginDocument{\pretocmd{\caption at LT@config}{\global\rownum=1\relax
+    \nostarch at read@LT at width}{}{}}
+\AtBeginEnvironment{longtable}{\global\rownum=0\relax}
+\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}
+  aboveskip=8pt,belowskip=-8pt, format=nostarchfigtblformat}
 \captionsetup[lstlisting]{font=nostarchfigfont,singlelinecheck=off,
   aboveskip=4pt, belowskip=0pt}
 \captionsetup[table]{font=nostarchtabfont,singlelinecheck=off,
-  aboveskip=0pt,belowskip=4pt, labelfont=bf}
+  aboveskip=0pt,belowskip=4pt, labelfont=bf, format=nostarchfigtblformat}
 \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}}
@@ -841,6 +917,7 @@
 \def\thfont{%
   \futuraheavy\fontsize{9pt}{10pt}\selectfont}
 \AtBeginEnvironment{tabular}{\tbfont}
+\AtBeginEnvironment{longtable}{\tbfont}
 \heavyrulewidth=3\p@
 \lightrulewidth=1\p@
 \cmidrulewidth=1.5\p@
@@ -884,6 +961,10 @@
         \captionsetup[figure]{font=nostarchfigfont,singlelinecheck=off,
   aboveskip=8pt,belowskip=-8pt}
     }
+\rowcolors[]{1}{}{nspgray}
+\setlength{\aboverulesep}{0pt}
+\setlength{\belowrulesep}{0pt}
+\setlength{\extrarowheight}{.8ex}
 \DefineVerbatimEnvironment{Code}{Verbatim}{frame=lines,framerule=0.25pt, commandchars=\\\{\}}
 \FV at AddToHook\FV at ListParameterHook{\vspace{-6pt}}
 \VerbatimFootnotes
@@ -897,6 +978,7 @@
     innerrightmargin=18pt,
     innerleftmargin=18pt,
     backgroundcolor=nspgray,
+    everyline=true
     }
 
 \mdfdefinestyle{custombox}{%
@@ -907,6 +989,7 @@
     innerbottommargin=\baselineskip,
     innerrightmargin=18pt,
     innerleftmargin=18pt,
+    everyline=true
     }
 \newenvironment{nspbox}[1]
 {\begin{mdframed}[style=nspbox]
@@ -974,6 +1057,32 @@
     \@afterindentfalse\@afterheading%
     \refstepcounter{project}%
 }
+\def\UrlFont{\itshape}
+\def\UrlTildeSpecial{\do\~{\raise.2ex\hbox{\m at th$\scriptstyle\sim$}}}
+\let\Url at force@Tilde\UrlTildeSpecial
+\def\UrlBreaks{\do\#\do\\\do\>\do\]\do\)\do\}}
+\g at addto@macro{\UrlSpecials}{%
+  \do\.{\penalty\UrlBreakPenalty\mathchar46\relax}%
+  \do\_{\penalty\UrlBreakPenalty\mathchar95\relax}%
+  \do\={\penalty\UrlBreakPenalty\mathchar61\relax}%
+  \do\&{\penalty\UrlBreakPenalty\mathchar38\relax}%
+  \do\-{\penalty\UrlBreakPenalty\mathchar45\relax}%
+  \do\!{\penalty\UrlBreakPenalty\mathchar33\relax}%
+  \do\?{\penalty\UrlBreakPenalty\mathchar63\relax}%
+  \do\|{\penalty\UrlBreakPenalty\mathchar124\relax}%
+  \do\,{\penalty\UrlBreakPenalty\mathchar44\relax}%
+  \do\;{\penalty\UrlBreakPenalty\mathchar59\relax}%
+  \do\@{\penalty\UrlBreakPenalty\mathchar64\relax}%
+  \do\'{\penalty\UrlBreakPenalty\mathchar39\relax}%
+  \do\"{\penalty\UrlBreakPenalty\mathchar34\relax}%
+  \do\+{\penalty\UrlBreakPenalty\mathchar43\relax}%
+  \do\<{\penalty\UrlBreakPenalty\mathchar60\relax}%
+  \do\[{\penalty\UrlBreakPenalty\mathchar91\relax}%
+  \do\({\penalty\UrlBreakPenalty\mathchar40\relax}%
+  \do\{{\penalty\UrlBreakPenalty\mathchar123\relax}%
+  \do\/{\unpenalty\penalty\@M\mathchar47\penalty\UrlBreakPenalty}%
+}
+\def\UrlNoBreaks{}
 \renewcommand*{\marginfont}{\sffamily\itshape\fontsize{8.5}{10}\selectfont}
 \renewcommand*{\marginnotevadjust}{-\baselineskip}
 \newcommand{\marginwingding}[1]{{\fontsize{10pt}{12pt}\selectfont \wingding{#1}}}

Modified: trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty	2023-05-11 20:09:40 UTC (rev 67071)
+++ trunk/Master/texmf-dist/tex/latex/nostarch/nshyper.sty	2023-05-11 20:10:13 UTC (rev 67072)
@@ -36,10 +36,9 @@
 %%   Grave accent  \`     Left brace    \{     Vertical bar  \|
 %%   Right brace   \}     Tilde         \~}
 \ProvidesPackage{nshyper}
-[2023/03/30 v2.0 Typesetting books for No Starch Press]
+[2023/04/08 v2.1 Typesetting books for No Starch Press]
 \RequirePackage[breaklinks,colorlinks,linkcolor=black,
-  citecolor=black,pagecolor=black,urlcolor=black,hyperindex,
-  bookmarks=false]{hyperref}
+  citecolor=black,pagecolor=black,urlcolor=black,hyperindex]{hyperref}
 \AtBeginDocument{%
   \def\@schapter[#1]#2{%
     \H at old@schapter[#1]{#2}%



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