texlive[47492] Master/texmf-dist: novel (26apr18)

commits+karl at tug.org commits+karl at tug.org
Mon Apr 30 01:01:28 CEST 2018


Revision: 47492
          http://tug.org/svn/texlive?view=revision&revision=47492
Author:   karl
Date:     2018-04-30 01:01:28 +0200 (Mon, 30 Apr 2018)
Log Message:
-----------
novel (26apr18)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-example.tex
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-extras-README.html
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-scripts.zip
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testsuite.tex
    trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/parascale.png
    trunk/Master/texmf-dist/doc/lualatex/novel/novel-documentation.html
    trunk/Master/texmf-dist/doc/lualatex/novel/novel.pdf
    trunk/Master/texmf-dist/doc/lualatex/novel/novel.tex
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-DropCap.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-Fonts.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-Obsolete.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-PostLayout.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-Sandbox.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty
    trunk/Master/texmf-dist/tex/lualatex/novel/novel.cls

Added Paths:
-----------
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg
    trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png
    trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png

Modified: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-example.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-example.tex	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-example.tex	2018-04-29 23:01:28 UTC (rev 47492)
@@ -6,7 +6,7 @@
 % IF YOU COMPILE THIS DOCUMENT: Be sure that this file, and its generated PDF,
 %   have read/write permissions for any user. If they don't, then
 %   compile will fail at the point where files are written.
-\documentclass{novel} % v. 1.50.4.
+\documentclass{novel} % v. 1.52.
 \SetTitle{Dark and Stormy}
 \SetSubtitle{A Tale of Nights}
 \SetAuthor{Dirk Hardcase}

Modified: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-extras-README.html
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-extras-README.html	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-extras-README.html	2018-04-29 23:01:28 UTC (rev 47492)
@@ -9,11 +9,11 @@
 
 <h2>README for novel extras</h2>
 
-<p>This folder contains items that may be helpful, but are not essential to operation of the <i>novel</i> document class. Version 1.50.</p>
+<p>This folder contains items that may be helpful, but are not essential to operation of the <i>novel</i> document class. Version 1.52.</p>
 
 <p>File <i>novel-example.tex</i> is a fake short novel. If you wish to compile it, place a copy in your user home folder (or other place where you have read/write privilege) and compile it there.</p>
 
-<p>File <i>novel-testsuite.tex</i> exercises the various capabilities of the document class. You can look at the code, and see how it compiles. You may also change settings, to see what they do. It requires file <i>novel-testimage.png</i>. If you wish to compile it, place a copy (along with image) in your user home folder (or other place where you have read/write privilege) and compile it there.</p>
+<p>File <i>novel-testsuite.tex</i> exercises the various capabilities of the document class. You can look at the code, and see how it compiles. You may also change settings, to see what they do. It requires files <i>novel-testimage.png</i>, <i>novel-testimage.jpg</i>, <i>novel-testscript.png</i>, and <i>novel-testscript.jpg</i>. If you wish to compile it, place a copy (along with images) in your user home folder (or other place where you have read/write privilege) and compile it there.</p>
 
 <p>File <i>novel-decoglyphs.pdf</i> shows the decorative characters in the <i>NovelDeco.otf</i> file, along with the codes needed to retrieve them.</p>
 

Modified: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-scripts.zip
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg	2018-04-29 23:01:28 UTC (rev 47492)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testimage.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg	2018-04-29 23:01:28 UTC (rev 47492)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.jpg
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Added: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png	2018-04-29 23:01:28 UTC (rev 47492)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testscript.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testsuite.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testsuite.tex	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/extras/novel-testsuite.tex	2018-04-29 23:01:28 UTC (rev 47492)
@@ -21,7 +21,7 @@
 % It is grayscale png, 150x150 pixels, with resolution 300pdi.
 % 
 % The `test' class option is required. You may add others.
-\documentclass[test]{novel} % v. 1.50.4.
+\documentclass[test,shademargins,draft]{novel} % v. 1.52.
 \SetTitle{Test Suite}
 \SetSubtitle{Novel Document Class}
 \SetAuthor{Author Name}
@@ -74,15 +74,19 @@
 
 % NEXT PAGE:
 
-This page tests all of the linegap environment, the \string\charscale\space command, and \string\rotatebox. The combined effect is shown below:
-\begin{linegap}{10}
-\vspace{1.5\nbs}
+This page tests the \string\charscale\space command, and \string\rotatebox. The combined effect is shown below:\par
+\vspace{1.5\nbs} % trial and error
 \charscale[2,3em,-4em]{\rotatebox[origin=c]{45}{Random Test Items}}
-\end{linegap}
-Above, you should see the phrase Random Test Items in larger than normal text, tilted 45 degrees, nicely fitting between the text above and this text.  The phrase does not begin at the left margin; this can be changed.
+\vspace{7.5\nbs} % trial and error
 
-If you change the font size or number of lines per page, then the tilted phrase might not fit nicely. That can be fixed by changing the linegap.
+Above, you should see the phrase Random Test Items in larger than normal text, tilted 45 degrees, nicely fitting between the text above and this text. Offset has been used, so it is not quite centered.
 
+If you change the font size or number of lines per page, then the tilted phrase might not fit nicely. That can be fixed by changing the amount of \string\vspace\space above and below the rotated text.
+
+The amount of \string\vspace\space is not calculated automatically. You have to determine it by trial and error (or do some math). The total amount of \string\vspace, top and bottom, must be an integer.
+
+If you use \string\rotatebox\space without \string\charscale, then it will create its own vertical gap. Unfortunately, the height of this gap is very difficult for you to calculate, so you would not be able to easily restore the line grid by adding some amount of \string\vspace. So, don't use \string\rotatebox\space without \string\charscale.
+
 \clearpage
 
 
@@ -112,11 +116,11 @@
 
 \null\null\null
 
-\noindent\InlineImage[0,b-\normaldescender]{novel-testimage.png}This paragraph is not indented. The unstarred command places an image, offset so that its bottom sits at the descender of the text. It was necessary to insert previous blank lines, or the image would overlie (and obscure) the preceding paragraph.
+\noindent\InlineImage[0,b-\normaldescender]{novel-testimage.jpg}This paragraph is not indented. The unstarred command places an image, offset so that its bottom sits at the descender of the text. It was necessary to insert previous blank lines, or the image would overlie (and obscure) the preceding paragraph.
 
 \null\null
 
-\noindent\InlineImage[0,1.5em]{novel-testimage.png}This paragraph is not indented. The unstarred command places an image, offset so that it rises above the paragraph, and also descends beneath the following text. 
+\noindent\InlineImage[0,1.5em]{novel-testscript.png}This paragraph is not indented. The unstarred command places an image, offset so that it rises above the paragraph, and also descends beneath the following text. 
 
 \null\null
 
@@ -129,28 +133,48 @@
 
 This page tests \string\WrapImage. The command is written following the paragraph you are now reading.
 
-\WrapImage[r]{novel-testimage.png}
+\WrapImage[r]{novel-testscript.jpg}
 
-The image will appear at right, with this text flowing around it. the first few lines will be at the left of the image. Then, as the paragraph continues, it eventually is restored to full text width, once it gets pas the bottom of the image. Note that the top of the image is aligned to the X-height of the first line of text.
+The image will appear at right, with this text flowing around it. the first few lines will be at the left of the image. Then, as the paragraph continues, it eventually is restored to full text width, once it gets past the bottom of the image. Note that the top of the image is aligned to the X-height of the first line of text.
 
+\null
+\null
+
 \clearpage
 
-% NEXT PAGE:
+% NEXT 2 PAGES:
 
-This page tests the footnote and endnote capabilities.\footnote{This is the first sample footnote. Unless you change the marker style, it will be marked with an asterisk.} Two footnotes have been placed.\footnote{This is the second footnote. Unless you change the marker style, it will be marked by a dagger.}
+This page, combined with the following page, test the detection mechanism for \string\scenebreak, \string\sceneline, and \string\scenestars.
 
-\scenebreak
+In the source document, there is \string\vspace\space following this paragraph. To detect the effects, vary the \string\vspace.
 
-The \string\scenebreak\space command was used above. This paragraph is not indented, unless you change the behavior using \string\SetScenebreakIndent.
+% Change this to see the effects:
+\vspace{20\nbs} % originally 20\nbs
 
+Following this paragraph is the \string\scenestars\space command. It prints a few asterisks centered in a gap. It is one way to indicate that a scenbreak is present, when the break occurs at the very top or bottom of a page (because a blank line might not be noticed there).
+
 \scenestars
 
-As above, but this time marked by three centered asterisks.
+If you change the above \string\vspace\space to 25\string\nbs, you will get a Warning about the line being too close to the bottom. Change to 28\string\nbs, and the Warning will say that it is too close to the top (of the following page. Note that \string\scenestars\space is allowed to be at the very bottom or very top, or somewhere in the middle of the page. The same applies to \string\sceneline.
 
-\sceneline
+If you wish, you can always use \string\scenestars\space or \string\sceneline\space to indicate a scene break. But more common practice is to use a blank line, \string\scenebreak, except for those cases where you ``must'' use one of the others.
 
-As above, but this time marked by a short, centered line.
+\scenebreak
 
+Above this paragraph is \string\scenebreak, which appears as a blank line. A \string\scenebreak\space cannot be located close to the top or bottom of a page. Unlike \string\sceneline\space or \string\scenestars, you cannot place \string\scenebreak\space at the very top or bottom, either. So, changing the \string\vspace\space to any of 14\string\nbs\space through 17\string\nbs\space will generate a Warning.
+
+\clearpage
+
+
+% NEXT PAGE:
+
+This page tests the footnote and endnote capabilities.\footnote{This is the first sample footnote. Unless you change the marker style, it will be marked with an asterisk.} Two footnotes have been placed.\footnote{This is the second footnote. Unless you change the marker style, it will be marked by a dagger.}
+
+\null
+
+Test of \string\QuickChapter:
+
+
 \QuickChapter[3em]{Just Before Midnight}
 
 Above, \string\QuickChapter\space inserted two blank lines, in which a phrase is followed by a short line. The text is slightly larger than normal, and sits slightly above the normal baseline.
@@ -174,28 +198,35 @@
 
 % NEXT PAGE:
 
-The following tests the \textit{parascale}  and \textit{linegap} environments:
+The following tests the \textit{parascale} environment:
 
-\begin{linegap}{8}
-\vspace{0.4\nbs}
 \begin{parascale}[0.8]
-This text has a different scale than normal. Both the font size and the baseline skip have been proportionately changed. As a result, the lines are not on the normal line grid.\par
-If the following normal text needs to be back on grid (usually the case), there are two possible solutions: (1) Compile, note the number of lines occupied by this text, then calculate how much vertical space must be added, to restore the grid. Manually add that space, usually splitting it top and bottom. (2) Place \textit{parascale} within a \textit{linegap} environment. This will restore the grid. You will still have to compile, and count lines\par
+But this text has a different scale than normal. Both the font size and the baseline skip have been proportionately changed. As a result, the lines are not on the normal line grid.\par
+If the following normal text needs to be back on grid (usually the case), here is what you must do: Compile, and note the number of lines occupied by the scaled text. Calculate the discrepancy, and fix with \string\vspace. Or let \textit{novel} do the thinking for you; there will be a Warning message with advice.\par
+\vspace{0.2\nbs} % based on result of Warning.
 \end{parascale}
-\end{linegap}
 
-Back to normal text. The above scaled text is wrapped in \textit{linegap}. The gap is not necessarily the number of lines in the scaled text. It is the number of normal lines that occupy that vertical space.
+Back to normal text.  At the dimensions originally used for this test, there are 9 lines of scaled text. Not counting the first scaled line, the remaining 8 scaled lines each introduce a deficit of 0.2\string\nbs. So, the cumulative deficit is 1.6\string\nbs. The integer part doesn't matter. So, \string\vspace{0.6\string\nbs} must be added prior to \string\end\{parascale\}, to restore the normal line grid.
 
-At the dimensions originally used for this test, there are 9 lines of scaled text. They occupy more or less 7 lines of normal vertical space. However, I chose an 8 line gap, then added a little \string\vspace\space above the scaled text. I think this looks nicer.
+It is also possible to split the \string\vspace, prior to \string\begin\{parascale\} and \string\end\{parascale\}, as long as the total is correct.
 
-If you change the dimensions used for this test, then the scaled text and its surrounding will probably not align properly. So, before you use \textit{parascale}, plan ahead by making your settings final.
+If the \string\vspace\space is not added, then there will be a Warning message.
 
-\null
+If the parascale spans more than one page, then the correct amount to add will depend on the lines present on the final page, not the total number of lines.
 
+\clearpage
+
+
+% NEXT PAGE
+
+This page tests the \textit{adjustwidth} environment. Changing textwidth is a useful way to create block indents, occasionally used for long quotations, or for other special text that must be visually distinguished from normal.
+
 \begin{adjustwidth}{2\normalparindent}{\normalparindent}
 \forceindent This text uses the \textit{adjustwidth} environment. It is set to block indent 2\string\normalparindent\space at left, and indent 1\string\normalparindent\space at right. The \string\forceindent\space command precedes the text, so that (within the block) it indents like an ordinary paragraph.\par
 \end{adjustwidth}
 
+This text is after the environment, so it occupies the normal amount of text width.
+
 \clearpage
 
 
@@ -211,7 +242,7 @@
 
 \null\null
 
-\lettrine{H}{ere}, is placed is a drop cap, using \string\lettrine. But you will only see the drop cap if you place \string\RequirePackage\{lettrine\} in the Preamble. Otherwise, you will not see anything unusual. This behavior is specific to the test suite. Anywhere else, if you try to use \string\lettine\space without loading the package, an error will result.\par
+\dropcap{H}ere is placed is a drop cap, using \textit{novel's} \string\dropcap\space command. Alternatively, the \textit{lettrine} package could be used. There are differences in how the drop caps are specified, depending on what you do. So, be sure to read the documentation, or you will be surprised.\par
 In general, it is difficult to style drop caps so that they look good for many different letters. An alternative is to use images for the drop caps. If you use images, please read the \textit{novel} documentation, as the method is not the same as the usual methods from the \textsc{lettrine} package.\par
 Note that there is no automated way to combine a drop cap with a first line in small caps. This is discussed in \textsc{novel} documentation.
 
@@ -228,7 +259,7 @@
 
 % NEXT PAGE:
 
-\thispagestyle{dropfoliobeneath}
+\thispagestyle{dropfoliobeneath} % compare to dropfolioinside
 
 This page tests drop folio. There will be no page header. If your head/foot style normally has a footer, then you will see it as usual.
 
@@ -250,17 +281,32 @@
 
 \null\null
 
-You may change the settings in the Preamble, or try additional settings.
 
-\null\null
+When you request PDF/X (default), whether or not you are in draft mode, each image placed in your document is inspected. This is one of those things that require Lua code, which is one reason why the \textit{novel} class requires LuaLaTeX only.
 
-If you have the Adobe Acrobt Pro software,  then you can also test for PDF/X compliance:
+When an image is inspected, it is added to one of two lists, either good or unknown. Each time an image is  requested, the lists are examined, so the same image file is not inspected twice. This saves time.
 
-First, add \lnum{\string\SetPDFX[CGATSTR001]\{X-1a:2001\}} to the Preamble. Then compile, and verify that the resulting PDF meets the standard, without embedded *.icc profile.
+The lists are saved in the \textit{aux} file. Then, if you re-compile, images already inspected won't be re-inspected. To re-initialize the lists, discard the \textit{aux} file.
 
-Note that if you use an image other then the included \textit{novel-testimage.png}, then your own image must be prepared according to the specification in \textit{novel} documentation. Otherwise, an incorrectly prepared image will cause PDF/X compliance to fail.
+\null
 
+Two of the images were pre-processed via \textit{novel-scripts}. These will be detected as good. They are:
 
+\makeatletter\@AllGoodImages\makeatother
 
+\null
+
+Two of the images were not pre-processed, so their compliance is unknown. They might be good or bad. They are:
+
+ \makeatletter\@UnknownImages\makeatother
+
+\null
+
+Note: If you change the document settings to \string\SetPDFX\{off\} then you will not see either of the image lists, and will not get the Warning message.
+
+Also, using \string\SetPDFX\{off\} will re-initialize the lists.
+
+
+
 \end{document}
 

Modified: trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/parascale.png
===================================================================
(Binary files differ)

Added: trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png
===================================================================
(Binary files differ)

Index: trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png	2018-04-29 23:01:28 UTC (rev 47492)

Property changes on: trunk/Master/texmf-dist/doc/lualatex/novel/html-resources/simpletoc.png
___________________________________________________________________
Added: svn:mime-type
## -0,0 +1 ##
+application/octet-stream
\ No newline at end of property
Modified: trunk/Master/texmf-dist/doc/lualatex/novel/novel-documentation.html
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/novel-documentation.html	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/novel-documentation.html	2018-04-29 23:01:28 UTC (rev 47492)
@@ -353,7 +353,7 @@
     </ul>
   </li><!-- end 5 -->
 
-  <li id="l6"><span class="n"></span><a href="#h6"><b>6. Text Size, Style, Position, Notes</b></a>
+  <li id="l6"><span class="n"></span><a href="#h6"><b>6. Text Size, Style, Position</b></a>
     <ul id="u6">
       <li id="l6.1"><span class="n"></span><a href="#h6.1">6.1 Text Sizes</a>
         <ul id="u6.1">
@@ -387,21 +387,10 @@
           <li><a href="#h6.4.2">6.4.2 Local Real or Fake</a></li>
         </ul>
       </li><!-- end 6.4 -->
-      <li id="l6.5"><span class="n"></span><a href="#h6.5">6.5 Footnotes, Endnotes</a>
-        <ul id="u6.5">
-          <li><a href="#h6.5.1">6.5.1 Footnotes</a></li>
-          <li id="l6.5.2"><span class="n"></span><a href="#h6.5.2">6.5.2 Endnotes</a>
-            <ul id="u6.5.2">
-              <li><a href="#h6.5.2.1">6.5.2.1 Marking the Endnote</a></li>
-              <li><a href="#h6.5.2.2">6.5.2.2 Writing the Endnote</a></li>
-            </ul>
-          </li>
-        </ul>
-      </li><!-- end 6.5 -->
     </ul>
   </li><!-- end 6 -->
 
-  <li id="l7"><span class="n"></span><a href="#h7"><b>7. Images</b></a>
+  <li id="l7"><span class="n"></span><a href="#h7"><b>7. Images, Pictures, Drawings</b></a>
     <ul id="u7">
       <li id="l7.1"><span class="n"></span><a href="#h7.1">7.1 Technical Requirements</a>
         <ul id="u7.1">
@@ -421,6 +410,31 @@
     </ul>
   </li><!-- end 7 -->
 
+  <li id="l8"><span class="n"></span><a href="#h8"><b>8. Tables, Lists</b></a>
+    <ul id="u8">
+      <li id="l8.1"><span class="n"></span><a href="#h8.1">8.1 The toc Environment</a>
+        <ul id="u8.1">
+          <li><a href="#h8.1.1">8.1.1 Entries Using \tocitem</a></li>
+          <li><a href="#h8.1.2">8.1.2 Example Table</a></li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+
+  <li id="l9"><span class="n"></span><a href="#h9"><b>9. Footnotes, Endnotes</b></a>
+    <ul id="u9">
+      <li id="l9.1"><span class="n" style="visibility:hidden"></span><a href="#h9.1">9.1 Footnotes</a></li>
+      <li id="l9.2"><span class="n"></span><a href="#h9.2">9.2 Endnotes</a>
+        <ul id="u9.2">
+          <li><a href="#h9.2.1">9.2.1 Placing: \endnote</a></li>
+          <li><a href="#h9.2.2">9.2.2 Writing: \endnotetext</a></li>
+        </ul>
+      </li>
+    </ul>
+  </li>
+
+
+
   <li><i>Appendices:</i></li>
 
   <li id="lA"><span class="n" style="visibility:hidden"></span><a href="#hA"><b>A. Sample Document</b></a>
@@ -551,7 +565,7 @@
 <div id="main">
 <!-- **************************************************************************************** -->
 
-<h1 id="h0" style="padding-top:16px">Document class <i>novel</i> - documentation.   <span style="font-size:75%">V. 1.50.4, 2018/04/07</span></h1>
+<h1 id="h0" style="padding-top:16px">Document class <i>novel</i> - documentation.   <span style="font-size:75%">V. 1.52, 2018/04/26</span></h1>
 <p class="noindent"><span id="screennoscript" class="screennoscript"><b>For enhanced navigation of this file, turn on JavaScript.</b></span></p>
 <div><script>if(document.getElementById("screennoscript")){document.getElementById("screennoscript").style.display="none";}</script></div>
 
@@ -701,8 +715,10 @@
 
 <h3 id="h2.2">2.2. sandbox</h3>
 <div class="d3" id="d2.2">
-<p class="noindent">This option is new in version 1.50.</p>
+<p class="noindent">New in version 1.50. You work in <code>sandbox</code> mode as a class option:</p>
+<p class="code"><code>\documentclass[sandbox]{novel}</code></p>
 <p class="item"><b>A.</b> In <code>sandbox</code> mode, you can use many packages that would otherwise be prohibited. This will allow you to create tables and diagrams using nearly any methods ordinarily available in most other document classes. Of course, you may have to load some additional packages.</p>
+<p>Also, when in <code>sandbox</code> mode, many glues and lengths are set to values that are typical of other document classes, rather than the special values ordinarily used by <i>novel</i>.
 <p class="item"><b>B.</b> The <code>sandbox</code> is limited to 4 pages of output, regardless of document length. So, you cannot use <code>sandbox</code> for your whole book. Instead, create one or more separate <code>sandbox</code> files.</p>
 <p class="item"><b>C.</b> Your <code>sandbox</code> document should have the same layout as your full document. Then it is a drawing canvas. On a per-page basis, whatever fits in <code>sandbox</code> will also fit in your main document.</p>
 <p class="item"><b>D.</b> If you also enable draft mode and shademargins, you can see the size of available space on the <code>sandbox</code> pages.</p>
@@ -1639,7 +1655,9 @@
 Ah, such ill fortune haunted the Withens!\par<br/>
 Unfortunately, novelists of that era had so little to write about, or they would have chosen another family to pursue.\par
 </small></code></p>
-<p class="item" style="position:relative"><b>C.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> If you are using <code>\scenebreak</code> and the gap occurs at the very bottom or top of a page, then manually substitute <code>\sceneline</code> or <code>\scenestars</code> there. This is a standard way to indicate that the gap is intentional. The substitution is not automatic.</p>
+<p class="item"><b>C.</b> From version 1.52, a badly-placed scene break will be detected, and a Warning message will be issued.</p>
+<p>If <code>\scenebreak</code> is positioned at the very top or bottom of a page, then the Warning will advise you to substitute it with either <code>\scenestars</code> or <code>\sceneline</code>. The substitution is not automatic.</p>
+<p>If any of <code>scenebreak</code>, <code>\sceneline</code>, or <code>\scenestars</code> appears just one line away from the top or bottom of a page, you will get a Warning.</p>
 
 <h4 id="h5.3.1">5.3.1. <code>\SetScenebreakIndent{<em>true</em> or <em>false</em>}</code></h4>
 <div class="d4" id="d5.3.1">
@@ -1766,21 +1784,23 @@
 <h4 id="h6.1.3">6.1.3. <code>\begin{parascale}[<em>scale</em>] ... \end{parascale}</code></h4>
 <div class="d4" id="d6.1.3">
 <p class="item"><b>A.</b> The <i>parascale</i> environment is used on a paragraph basis. More than one paragraph may be included. The scale is applied to the font size and to the baselineskip within.</p>
-<p class="item"><b>B.</b> Note that the scale is an <i>optional</i> argument.</p>
-<p class="item"><b>C.</b> Since the text within <i>parascale</i> generally will not occupy an integer number of normal baseline skips, the following text will be off-grid. This may not be a problem, if <i>parascale</i> is used on a <a href="#hD.3.1.1">display page</a>. It may not be a problem, if <i>parascale</i> is used inside <a href="#h5.1.2">ChapterStart</a>. But it is certainly a problem if <i>parascale</i> is used within main text.</p>
-<p class="item"><b>D.</b> To restore the main line grid, when <i>parascale</i> is used within main text, wrap <i>parascale</i> in the <a href="#h6.3.2">linegap</a> environment.</p>
-<p>The line gap is not automatic; you must compile, look at the result of <i>parascale</i>, then adjust the gap and re-compile. If your text is on more than one page, then you will need to use more than one <i>linegap</i>.</p>
+<p>Note that the scale is an optional argument. Default is <code>1</code>.</p>
+<p class="item"><b>B.</b> The <i>parascale</i> environment is allowed to cross page boundaries.</p>
+<p>Trick: If you place an ordinary paragraph in <i>parascale</i> at scale <code>1</code>, then you will know whether or not that paragraph remains on one page.</p>
+<p class="item"><b>C.</b> For scale less than or equal to <code>1</code>, the first line in <i>parascale</i> will be at the normal baseline position. The following lines will progressively depart from the normal grid (unless scale is <code>1</code>). Thus, you will usually need to add some amount of vertical space following <i>parascale</i>, in order to restore subsequent text to the line grid.</p>
+<p class="item"><b>D.</b> You will usually get a Warning message, advising you that <i>parascale</i> caused the subsequent text (after the environment closed) to be off-grid. Fix by adding the requisite <code>\vspace</code> just prior to <code>\end{parascale}</code>.</p>
+<p>If <i>parascale</i> is entirely on a single page, you may also split the <code>\vspace</code>: Place part of it prior to <code>\begin{parascale}</code>, and part of it prior to <code>\end{parascale}</code>.</p>
+<p class="item"><b>E.</b> If multiple <i>parascale</i> end on a single page, the line deficit is cumulative. For example, if the first deficit is <code>0.5\nbs</code> and the second defict is <code>0.8\nbs</code>, you would fix them by adding <code>0.5\nbs</code> and <code>0.3\nbs</code> respectively.</p>
+<p class="item"><b>E.</b> Example:</p>
 <p class="code"><code><small>
 Lord Withens sneaked out the door of the veranda, and hastily opened the letter. In it was a message that curled his jodphurs:\par<br/>
-\begin{linegap}{2} % Not always the same as the parascale line count.<br/>
 \begin{parascale}[0.87]<br/>
-\vspace{0.18<span style="cursor:help" title="normal baseline skip">\nbs</span>}<br/>
-We know where youse been goin them dark and stormy nights. We knows what you been doin out there. We got yer number, Jack.\par<br/>
+We knows where youse been a-goin all a them dark and stormy nights. We knows what you been doin out there. We got yer number, Jack. So youse better play nice or we gonna rat to the lady.\par<br/>
+\vspace{0.26\nbs} % Without this, a Warning is issued, adivisng 0.26\nbs.<br/>
 \end{parascale}<br/>
-\end{linegap}<br/>
 Even after his jodphurs had finally uncurled, Lord Withens could not master his rage. ``My name's not Jack,'' he mumbled.\par
 </small></code></p>
-<p class="centerimg"><img src="html-resources/parascale.png" width="642" height="198" title="parascale inside linegap" alt="parascale inside linegap"/></p>
+<p class="centerimg"><img src="html-resources/parascale.png" width="598" height="214" title="parascale with vspace" alt="parascale with vspace"/></p>
 </div><!-- end 6.1.3 -->
 
 <h4 id="h6.1.4">6.1.4. Open Type Scale (fontspec)</h4>
@@ -1907,7 +1927,7 @@
 <div class="d4" id="d6.3.1">
 <p class="item"><b>A.</b> The <code>\raisebox</code> command does not play well with novel. It can be used on a <a href="#hD.3.1.1">display page</a>, where line grid is less important. In main text, avoid it. Use <code><a href="#h6.1.2">\charscale</a></code> instead.</p>
 <p class="item"><b>B.</b> If you must use the <code>\vspace</code> command (or its relative, <code>\vskip</code>) be sure to measure the space in units of <code><span style="cursor:help" title="normal baseline skip">\nbs</span></code> (normal baseline skip).</p>
-<p class="item"><b>C.</b> Avoid the <i>minipage</i> and <i>parbox</i> environments. These are likely to disrupt the line grid. When that happens, restoring the grid is your own responsibility. You may find the <i>adjustwidth</i> and <i>linegap</i> environments to be useful, as described in the next section.</p>
+<p class="item"><b>C.</b> Avoid the <i>minipage</i> and <i>parbox</i> environments. These are likely to disrupt the line grid. When that happens, restoring the grid is your own responsibility. You may find the <i>adjustwidth</i> environment to be useful, as described in the next section.</p>
 <p class="item"><b>D.</b> In most cases, do not use the center environment. You may use <code>{\centering ... \par}</code> instead, for a single paragraph. The center environment may cause the text to go off-grid. That's not a problem on some <a href="#hD.3.1.1">display pages</a> where you don't care about the grid, but it is ugly in the middle of running text.</p>
 <p class="item"><b>E.</b> Avoid positioning via the <i>textblock</i> or <i>textblock*</i> environments (package <i>textpos</i>).</p>
 <p>Actually, <i>novel</i> uses that code internally. But if not handled with more care than usual, positioned text can disrupt the baseline and position of surrounding text. You may use <code><a href="#h6.1.2">\charscale</a></code> to position small amounts of text safely, but not on a paragraph basis.</p>
@@ -1922,17 +1942,12 @@
 <p class="noindent">This is not a complete list. It merely addresses a few situations that you are likely to encounter, without the need for elaborate code, and without loading additional packages.</p>
 <p style="margin-top:10pt"><code>\begin{adjustwidth}{<em>left</em>}{<em>right</em>} ... \end{adjustwidth}</code></p>
 <p>This environment, from the included <i>changepage</i> package, is the most useful way to create block indents. The included text may have multiple paragraphs and span pages. The left and right arguments are lengths, being the amount to <em>increase</em> the respective margins from their normal values.</p>
-<p id="linegap" style="margin-top:10pt"><code>\begin{linegap}{<em>integer</em>} ... \end{linegap}</code></p>
-<p>This environment creates a gap of <i>integer</i> lines. Then, the following text will be on-grid, regardless of what you place inside the environment. If the contents are small relative to the gap, there will be a lot of white space. If the contents are too large, then they will overflow the gap and overlap the following text, rather than push it down.</p>
-<p>This environment is particularly useful when it contains highly styled text, because you don't have to calculate a <code>\vspace</code> to restore the following line grid. Pick a likely gap, then make it larger or smaller as desired.</p>
-<p>The environment fails if it crosses a page boundary. There will be no error, merely an undesired result. Be sure to plan your writing so that the linegap remains on a single page.</p>
-<p>If you use a non-integer linegap, it will be processed that way, but there will be a warning in the log file. The only reason it is not an error, is that a non-integer linegap might be useful on some <a href="#hD.3.1.1">display pages</a>.</p>
 <p style="margin-top:10pt"><code>\rotatebox{<em>text</em>}</code></p>
 <p>This command is from the included <i>graphicx</i> package. It rotates the text, about an axis at the lower left of the text. If you wish to rotate the text about its center, use <code>\rotatebox[origin=c]{text}</code>.</p>
 <p>This command plays nicely with <code>\charscale</code>, so you can size, rotate, and displace a string of text (single line). It makes a difference which command goes inside the other. More likely than not, the effect you want is obtained by using <code>\charscale</code> on the outside, with <code>\rotatebox</code> inside.</p>
-<p>To avoid disturbing the line grid, <code>\rotatebox</code> is best used inside the <a href="#linegap">linegap</a> environment.</p>
+<p>To avoid disturbing the line grid, <code>\rotatebox</code> is best used with <a href="#h6.1.2">\charscale</a> and a few blank lines.</p>
 <p style="margin-top:10pt"><code>\phantom{<em>text</em>}</code></p>
-<p>Does not print the text, but leaves a horizontal gap as if the text were there.</p>
+<p>Does not print the text, but leaves a horizontal gap as if the text were there. Caution: In some locations, this command has unexpected results, such as by adding a line.</p>
 <p style="margin-top:10pt"><code>\mbox{<em>text</em>}</code></p>
 <p>Prevents a specific word from being hyphenated, or to ensure that two consecutive words always appear on the same line. The box will not be broken across lines. However, it may overhang the margin, which is undesirable.</p>
 <p style="margin-top:10pt"><code>\makebox[<em>width</em>][<em>alignment</em>]{<em>text</em>}</code></p>
@@ -1974,7 +1989,7 @@
 <div class="d4" id="d6.4.1">
 <p class="item"><b>A.</b> This command may only be used in the Preamble. It globally sets the kind of marker to be used. Default is <i>real</i> and <i>asterisk</i>.</p>
 <p class="item"><b>B.</b> The optional argument applies real or fake markers, as described above.</p>
-<p class="item"><b>C.</b> The required argument applies only to markers created by the <code>\footnote</code> command. It does not apply to endnotes, or to manually placed superscripts and subscripts.</p>
+<p class="item"><b>C.</b> The required argument applies only to markers created by the <a href="#h9.1"><code>\footnote</code></a> command. It does not apply to endnotes, or to manually placed superscripts and subscripts.</p>
 <p class="item"><b>D.</b> The available choices for marker style:</p>
 <p>• <i>asterisk</i> (default) uses symbolic footnote markers. The symbols rotate in order * † ‡ § ** †† ‡‡ §§ until reset.</p>
 <p>• <i>dagger</i> uses symbolic footnote markers, but without asterisks. The symbols rotate in order † ‡ § †† ‡‡ §§ until reset.</p>
@@ -1988,63 +2003,7 @@
 </div><!-- end 6.4.2 -->
 </div><!-- end 6.4 -->
 
-<h3 id="h6.5">6.5. Footnotes and Endnotes</h3>
-<div class="d3" id="d6.5">
-<p class="item"><b>A.</b> The <i>novel</i> class has <em>limited</em> support for footnotes, because they are rarely used in fiction. Nevertheless, I have seen them. The notes may be factual or imaginary.</p>
-<p class="item"><b>B.</b> If there are more than a handful of notes, then use <a href="#h6.5.2">endnotes</a> to avoid a constant disruption of the text flow. You may use both footnotes and endnotes.</p>
-<p class="item"><b>C.</b> In the running text, markers for footnotes and endnotes are superscripts. You may control their appearance using the method of <a href="#h6.4">section 6.4</a>.</p>
-<p class="item"><b>D.</b> The actual footnote (at base of page) or endnote (wherever placed) does <i>not</i> use a superscript for its marker. Instead, the marker has ordinary size and position. This is the recommended style.</p>
 
-<h4 id="h6.5.1">6.5.1. Footnotes</h4>
-<div class="d4" id="d6.5.1">
-<p class="item"><b>A.</b> Footnotes appear at the bottom of the page where they are placed. There is no option to accumulate them to another location. Very long footnotes might straddle pages, but that is automatic, and not within your control.</p>
-<p class="code"><code>\footnote[<em>option</em>]{<em>text</em>}</code></p>
-<p class="item"><b>B.</b> The <code>\footnote</code> command places a superscript "marker" at the place where the command is written. The included text is written at the bottom of the page, beneath a short line that separates it from the main text. The footnote text is at smaller size and line skip, and has the same marker placed before it (but not as superscript). All of this is automatic.</p>
-<p class="item"><b>C.</b> You may, if necessary, apply some style to the footnote text. For example, if you are referring to another work, its title might be in italics.</p>
-<p class="item"><b>D.</b> Normally, no option is used. If you use option <i>0</i> (zero) then no marker will appear in the main text, and the footnote text will also appear without a marker. The count of markers is not incremented. This applies whether the markers are numbers or symbols.</p>
-<p><b>E.</b> If you are normally using footnote <i>numbers</i>, but wish to place a particular footnote using a <i>symbol</i> instead, you can do it manually. For example:</p>
-<p class="code"><code>He blinked.*\footnote[0]{* No, he didn't.}</code></p>
-<p><b>F.</b> Avoid use of underlining or bold. It is considered bad style, due to visual distraction. If necessary, use italics.</p>
-<p class="item" style="position:relative"><b>G.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> Sorry, but even though there are numerous TeX packages for custom footnote styles, they will not work in <i>novel</i>. This is intentional.</p>
-</div><!-- end 6.5.1 -->
-
-<h4 id="h6.5.2">6.5.2. Endnotes</h4>
-<div class="d4" id="d6.5.2">
-<p class="item"><b>A.</b> Endnotes are sometimes used in fiction. Often, the endnotes are also fictional.</p>
-<p class="item"><b>B.</b> You may use both footnotes and endnotes. However, if endnotes are used, then footnotes must be marked by symbols, rather than by numbers, to avoid confusion. The counts for endnotes and footnotes are independent.</p>
-<p class="item"><b>C.</b> If you gather endnotes at the rear of your book, then arabic page numbering continues. Think of the endnotes as just another chapter. If you use page headings, then the preferred style is to use something like <i>Notes to Chapters 3-4</i> in the headings, changing it on a page by page basis using <code><a href="#h4.3.4.6">\SetRectoheadText</a></code> and <code><a href="#h4.3.4.6">\SetVersoheadText</a></code>.</p>
-<p class="item" style="position:relative"><b>D.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> The <i>endnotes</i> package may not be used, due to conflict with <i>novel's</i> built-in commands.</p>
-
-<h5 id="h6.5.2.1">6.5.2.1. <code>\endnote{<i>comment</i>}</code>, <code>\ResetEndnote</code></h5>
-<div class="d5" id="d6.5.2.1">
-<p class="item"><b>A.</b> The <code>\endnote</code> command inserts a numerical superscript in the text. A running count of the numbers is automatically updated.</p>
-<p class="item"><b>B.</b> Endnote numbers normally run continuously through the text. If you wish to reset the count (perhaps at new chapters), you have to do it manually, using <code>\ResetEndnote</code> at the appropriate location.</p>
-<p class="item"><b>C.</b> No argument is needed. But if you write <code style="white-space:nowrap">\endnote{<i>some comment</i>}</code>, then the comment will not print. It is merely a note to yourself, reminding you why you put an endnote there. The comment is not stored for later use, so it is not the actual content of the endnote text.</p>
-<p class="item"><b>D.</b> You may not immediately follow <code>\endnote</code> with a square bracket <code>[</code>. If you do that, an error results. If you need to follow the command with a printing square bracket, then use <code>\endnote{}[</code>.
-<p class="item" style="position:relative"><b>E.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> The <i>novel</i> class does not know, and does not care, whether or not you actually write the endnotes later. The <code>\endnote</code> command merely places a marker. It does not record data for later use.</p>
-
-</div><!-- end 6.5.2.1 -->
-
-<h5 id="h6.5.2.2">6.5.2.2. <code>\endnotetext{<i>number</i>}{<i>text</i>}</code></h5>
-<div class="d5" id="d6.5.2.2">
-<p class="item"><b>A.</b> The built-in <code>\endnotetext{}{}</code> takes two mandatory arguments. No optional argument. If you follow <code>\endnotetext</code> with a square bracket <code>[</code>, then an error results.</p>
-<p class="item"><b>B.</b> The first argument is usually the endnote number. A period and following space will automatically be added. You may use <code>\emph{<em>number</em>}</code> if you prefer the number to be in italics.</p>
-<p class="item"><b>C.</b> The text will be block-indented. It is limited to one paragraph. If the note needs more than one paragraph, then continue like this, with an empty note number:</p>
-<p class="code"><code>\endnotetext{}{\indent <em>text</em>}</code></p>
-<p class="item"><b>D.</b> Example of an endnote:</p>
-<p class="code">
-<code><small>
-\endnotetext{9}{Yang Sho-Nuff was the twelfth son of the elder god of the ancient Who-Zit Clan, with power over the forces of rust.\par}<br/>
-\endnotetext{}{\indent However, since this was not yet the Iron Age, the terrible might of Yang Sho-Nuff was largely unrecognized.\par}<br/>
-\endnotetext{10}{As Professor Withens notes in his treatise, \emph{When Sho-Nuff Was Not Enough}, the ceremony of daily human sacrifice had a devastating effect on the tribal population.\par}
-</small></code></p>
-<p class="centerimg"><img src="html-resources/endnotetext.png" width="447" height="151" alt="using endnotetext"/></p>
-<p class="item" style="position:relative"><b>E.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/>If you don't like the built-in <code>\endnotetext</code> style, you can change it to suit your needs, using <code>\renewcommand</code>. Coding is up to you!</p>
-</div><!-- end 6.5.2.2 -->
-</div><!-- end 6.5.2 -->
-</div><!-- end 6.5 -->
-
-
 </div><!-- end 6 -->
 </div><!-- end page06 -->
 <!-- ************************************************************ -->
@@ -2051,16 +2010,19 @@
 <div id="page07" class="page">
 
 
-<h2 id="h7">7. Images</h2>
+<h2 id="h7">7. Images, Pictures, Drawings</h2>
 <div class="d2" id="d7">
-<p class="item"><b>A.</b> If your book consists primarily of artwork, rather than text, then you should use a page layout program designed for that purpose, instead of TeX.</p>
-<p>Bleed is only supported for cover artwork, not book interior.</p>
-<p class="item"><b>B.</b> You may only use raster images, not vector drawings. If you use a vector program (such as Inkscape), you must export your work as a raster image.</p>
-<p class="item"><b>C.</b> You cannot crop, transform, resize, or resample images within <i>novel</i>. Each image must be placed at exact size and resolution.</p>
+<p class="item"><b>A.</b> <b>Interior Bleed</b> is not supported. Only cover artwork has bleed.</p>
+<p>If your book consists primarily of artwork, rather than text, then you should use a page layout program designed for that purpose, instead of TeX.</p>
+<p class="item"><b>B.</b> The <b>picture environment</b> is not supported.</p>
+<p>If you try to use a <code>picture</code> environment, it will probably not throw an error, because pictures are used in the internal code. However, you will get unexpected layout. In any case, <b>caption</b> is not supported.</p>
+<p class="item"><b>C.</b> Most <b>vector drawings</b> (pgfplots, pstricks, TikZ) are not supported.</p>
+<p class="item" style="position:relative"><b>D.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> You may work with the picture environment, and use vector drawings, in <code><a href="#h2.2">sandbox</a></code> mode.</p>
+<p>This requires you to create your picture or drawing in a separate document, then process the PDF to a raster image. The raster image is placed in your main document, using the commands provided in this section.</p>
+<p class="item"><b>E.</b> You cannot crop, transform, resize, or resample images within <i>novel</i>. Each image must be placed at exact size and resolution.</p>
 <p>So, if an image has print size 1.5" by 2" at 300dpi resolution, then its dimensions must be 450x600 pixels. Be sure that the image file contains its resolution.</p>
-<p class="item"><b>D.</b> If you wish to use something such as LaTeX TikZ, then create another small document using the <code><a href="#h2.2">sandbox</a></code> class option.</p>
 
-<h3 id="h7.1">7.1. Technical Requirements for Images</h3>
+<h3 id="h7.1">7.1. Technical Requirements for Raster Images</h3>
 <div class="d3" id="d7.1">
 
 <p class="noindent">Interior images may be black/white line art, or grayscale. Interior color is not supported. Color cover artwork has strong support.</p>
@@ -2075,6 +2037,10 @@
 <p class="item"><b>F.</b> Most print services require that images must be stripped of private metadata (such as EXIF), and that the color space be DeviceGray, rather than specified by a transfer profile.</p>
 <p class="item"><b>G.</b> Black/White images must be in <i>png</i> file format. Grayscale images may be in either <i>png</i> or <i>jpg</i> file format.</p>
 <p class="item" style="position:relative"><b>H.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> In the documentation <i>extras</i> folder, <i style="white-space:nowrap">novel-scripts.zip</i> will help you comply with these requirements. Complete usage information is provided there.</p>
+ <p class="item"><b>I.</b> From version 1.52, <i>novel</i> detects whether or not an interior image was pre-processed using <i>novel-scripts</i>. If yes, it is "known good". If no, it is "unknown" and may be good or bad.</p>
+<p>If your document has any "unknown" images, you will get a Warning. The list of "unknown" images is written near the bottom of the log file.</p>
+<p>If you know that an image meets specs (because you are a graphic artists who knows these things), but it wasn't processed by <i>novel-scripts</i>, you can manually add it to the list of "known good" images. In Preamble:</p>
+<p class="code"><code>\SetKnownGoodImages{somefile.png anotherfile.jpg}</code></p>
 </div><!-- end 7.1.1 -->
 
 <h4 id="h7.1.2">7.1.2. Color Cover</h4>
@@ -2173,6 +2139,143 @@
 </div><!-- end 7 -->
 </div><!-- end page07 -->
 <!-- ************************************************************ -->
+<div id="page08" class="page">
+
+
+<h2 id="h8">8. Tables and Lists</h2>
+<div class="d2" id="d8">
+<p class="item"><b>A.</b> <b>Lists</b> are not supported.</p>
+<p>If you attempt to use any of the well-known list environments, an error will result. This is because lists are typeset using layout incompatible with the rest of <i>novel</i></p>
+<p>If you need a list, you can use <code><a href="#h2.2">sandbox</a></code> mode in a separate document, convert the list to a raster image, then place the image in your main document.</p>
+<p class="item"><b>B.</b> <b>Tables</b> are not supported, except for the built-in <code><a href="#h8.1">toc</a></code>.</p>
+<p>If you attempt to use any of the well-known table environments, an error will result. This is because tables are typeset using layout incompatible with the rest of <i>novel</i></p>
+<p>If you need a table, you can use <code><a href="#h2.2">sandbox</a></code> mode in a separate document, convert the table to a raster image, then place the image in your main document. This is unnecessary if you use <code><a href="#h8.1">toc</a></code>.</p>
+
+<h3 id="h8.1">8.1. The <code>toc</code> Environment</h3>
+<div class="d3" id="d8.1">
+<p class="item"><b>A.</b> You may create a Table of Contents in your own style, or use the <i>toc</i> environment for <i>novel's</i> own style. The choice is yours.</p>
+<p class="item"><b>B.</b> Since <code>toc</code> is not synchronized against any other code, you may use it more than once, and you may use it for any purpose (not necessarily a Table of Contents).</p>
+<p class="item"><b>C.</b> The <code>toc</code> is an environment:</p>
+<p class="code"><code>\begin{toc}[<em>extra entry separation</em>]{<em>extra margins</em>} <em>...</em> \end{toc}</code></p>
+<p>The table is not indented, and text within it is not indented.</p>
+<p class="item"><b>D.</b> The optional argument is a number. It is the portion of normal baselineskip that will be added beneath each <code><a href="#h8.1.1">\tocitem</a></code> entry. Default is 0, meaning that there is no extra skip between items, and normal baselineskip is maintained.</p>
+<p>A value greater than 0 spreads the entries, which could be attractive if there are only a few chapters and you'd like to use more space on the page. For example, a value of <i>0.25</i> means that a gap of 0.25 normal baselineskip will be added beneath each entry.</p>
+<p>A small negative value will crowd the lines together, but there is a limit (approximately -0.1) before the lines cannot be squeezed any tighter.</p>
+<p>Note that the optional argument only applies to <code>\tocitem</code> entries, not to any other text within the environment.</p>
+<p class="item"><b>E.</b> The required argument is a length, which will be the amount of extra margin added at left and right of the table (using <i>adjustwidth</i>). A value of <i>0em</i> allows the table to occupy the full width of the textblock. A value of <i>2em</i> adds 2em to the margin on each side, so that the width of the table is 4em less than the width of the textblock.</p>
+<p> It is best to specify horizontal lengths in units of <i>em</i> or the proportional <code>\parindent</code> or <code>\textwidth</code>.</p>
+<p class="item" style="position:relative"><b>F.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> Place at least one empty line above the Table's title, using <code>\null</code> or <code>\vspace*</code>. This will prevent the title (which is normally enlarged using <code>\charscale</code>) from encroaching into the top margin.</p>
+
+<h4 id="h8.1.1">8.1.1. Entries Using <code>\tocitem</code></h4>
+<div class="d4" id="d8.1.1">
+<p class="code"><code>\tocitem[<em>chapter number</em>]{<em>description</em>}{<em>page number</em>}</code> and starred</p>
+<p class="item"><b>A.</b> Use <code>\tocitem</code> for entries in <code>toc</code>. Do not use it for non-Table text on the page.</p>
+<p class="item"><b>B.</b> The optional argument is the <i>chapter number</i>, at most two digits. The number will be left-aligned, with a period automatically added. Following the period will be whatever amount of space is needed to keep the following description aligned.</p>
+<p>• If the optional argument is omitted (or empty), then the <i>description</i> will align to the left of the table.</p>
+<p>• If the optional argument is the tilde character <code>~</code> then no number or period is printed, but the space for <i>chapter number</i> is occupied, so that the following <i>description</i> aligns as if you had entered a <i>chapter number</i>.</p>
+<p class="item"><b>C.</b> The <i>description</i> is usually the chapter title. If it cannot easily fit on one line, then use an additional <code>\tocitem</code>, because the text cannot be wrapped. The following example shows how this can be done.</p>
+<p class="item"><b>D.</b> Without the asterisk, <code>\tocitem</code> fills the area between the description and the page number with empty space. The more popular, starred <code>\tocitem*</code> command fills with a dotted line, and is very attractive.</p>
+<p class="item"><b>E.</b> You may use ordinary style commands, such as <code>\textit</code>, in the entries.</p>
+</div><!-- end 8.1.1 -->
+
+<h4 id="h8.1.2">8.1.2. Example Table of Contents</h4>
+<div class="d3" id="d8.1.2">
+<p class="code" style="text-indent:0px; font-size:small"><img class="floatright" src="html-resources/toc.png" width="264" height="408" alt="toc example"/>
+<code>
+\cleartorecto % because ToC must start recto<br/>
+\thispagestyle{empty}<br/>
+\vspace*{4<span style="cursor:help" title="normal baseline skip">\nbs</span>}<br/>
+\begin{toc}[0.25]{5.5em}<br/>
+{\centering\charscale[1.25]{Contents}\par}<br/>
+\null\null<br/>
+\tocitem*{Prologue}{1}<br/>
+\tocitem*[1]{The Evil Weeds}{5}<br/>
+\tocitem*[2]{A Plan of Attack}{18}<br/>
+\tocitem*[3]{Lady Withens Objects}{35}<br/>
+\tocitem*[4]{Back-Hoe to the Rescue}{48}<br/>
+\tocitem*[5]{Invasion of the Dandelions}{63}<br/>
+\tocitem*[~]{\emph{Interlude}}{90}<br/>
+\tocitem*[6]{Army of the Gardeners}{94}<br/>
+\tocitem*[7]{Too Much Rain}{113}<br/>
+\tocitem*[8]{To Nuke, or Not to Nuke?}{145}<br/>
+\tocitem*[9]{Revenge of the Zucchini}{162}<br/>
+\tocitem*[10]{Lady Withens Sneezes}{180}<br/>
+\tocitem*[11]{The Concrete Lawn}{206}<br/>
+\tocitem*{Epilogue}{228}<br/>
+\end{toc}<br/>
+\clearpage 
+</code>
+</p>
+<div style="clear:both"></div>
+</div><!-- end 8.1.2 -->
+</div><!-- end 8.2 -->
+
+</div><!-- end 8 -->
+</div><!-- end page08 -->
+<!-- ************************************************************ -->
+<div id="page9" class="page">
+
+
+<h2 id="h9">9. Footnotes and Endnotes</h2>
+<div class="d2" id="d9">
+<p class="item"><b>A.</b> The <i>novel</i> class has <em>limited</em> support for <a href="#h9.1">footnotes</a>. The support is adequate for the needs of fictional works, but not academic works.</p>
+<p class="item"><b>B.</b> There is <em>em</em> limited support for <a href="#h9.2">endnotes</a>. The primary difference between <i>novel's</i> method, and the method used by other document classes, is that <i>novel</i> only places a marker. It does not remember or automate the text of endnotes. You must write the notes yourself.</p>
+<p class="item"><b>C.</b> You may use both footnotes and endnotes.</p>
+<p class="item"><b>D.</b> In the running text, markers for footnotes and endnotes are superscripts. You may control their appearance using the method of <a href="#h6.4">section 6.4</a>.</p>
+<p class="item"><b>E.</b> The actual footnote (at base of page) or endnote (wherever placed) does <i>not</i> use a superscript for its marker. Instead, the marker has ordinary size and position. This is the recommended style.</p>
+<p class="item"><b>F.</b> <b>Margin notes</b> are not supported.</p>
+
+<h3 id="h9.1">9.1. Footnotes</h3>
+<div class="d3" id="d9.1">
+<p class="item"><b>A.</b> Footnotes appear at the bottom of the page where they are placed. There is no option to accumulate them to another location. Very long footnotes might straddle pages, but that is automatic, and not within your control.</p>
+<p class="code"><code>\footnote[<em>option</em>]{<em>text</em>}</code></p>
+<p class="item"><b>B.</b> The <code>\footnote</code> command places a <a href="#h6.4">superscript</a> "marker" at the place where the command is written. The included text is written at the bottom of the page, beneath a short line that separates it from the main text. The footnote text is at smaller size and line skip, and has the same marker placed before it (but not as superscript). All of this is automatic.</p>
+<p class="item"><b>C.</b> You may, if necessary, apply some style to the footnote text. For example, if you are referring to another work, its title might be in italics.</p>
+<p class="item"><b>D.</b> Normally, no option is used. If you use option <i>0</i> (zero) then no marker will appear in the main text, and the footnote text will also appear without a marker. The count of markers is not incremented. This applies whether the markers are numbers or symbols.</p>
+<p><b>E.</b> If you are normally using footnote <i>numbers</i>, but wish to place a particular footnote using a <i>symbol</i> instead, you can do it manually. For example:</p>
+<p class="code"><code>He blinked.*\footnote[0]{* No, he didn't.}</code></p>
+<p><b>F.</b> Avoid use of underlining or bold. It is considered bad style, due to visual distraction. If necessary, use italics.</p>
+<p class="item" style="position:relative"><b>G.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> Sorry, but even though there are numerous TeX packages for custom footnote styles, they will not work in <i>novel</i>. This is intentional.</p>
+</div><!-- end 9.1 -->
+
+<h3 id="h9.2">9.2. Endnotes</h3>
+<div class="d3" id="d9.2">
+<p class="item"><b>A.</b> Endnotes are sometimes used in fiction. Often, the endnotes are also fictional.</p>
+<p class="item"><b>B.</b> You may use both footnotes and endnotes. However, if endnotes are used, then footnotes must be marked by symbols, rather than by numbers, to avoid confusion. The counts for endnotes and footnotes are independent.</p>
+<p class="item"><b>C.</b> If you gather endnotes at the rear of your book, then arabic page numbering continues. Think of the endnotes as just another chapter. If you use page headings, then the preferred style is to use something like <i>Notes to Chapters 3-4</i> in the headings, changing it on a page by page basis using <code><a href="#h4.3.4.6">\SetRectoheadText</a></code> and <code><a href="#h4.3.4.6">\SetVersoheadText</a></code>.</p>
+<p class="item" style="position:relative"><b>D.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> The <i>endnotes</i> package may not be used, due to conflict with <i>novel's</i> built-in commands.</p>
+
+<h4 id="h9.2.1">9.2.1. <code>\endnote{<i>comment</i>}</code>, <code>\ResetEndnote</code></h4>
+<div class="d4" id="d9.2.1">
+<p class="item"><b>A.</b> The <code>\endnote</code> command inserts a numerical superscript in the text. A running count of the numbers is automatically updated.</p>
+<p class="item"><b>B.</b> Endnote numbers normally run continuously through the text. If you wish to reset the count (perhaps at new chapters), you have to do it manually, using <code>\ResetEndnote</code> at the appropriate location.</p>
+<p class="item"><b>C.</b> No argument is needed. But if you write <code style="white-space:nowrap">\endnote{<i>some comment</i>}</code>, then the comment will not print. It is merely a note to yourself, reminding you why you put an endnote there. The comment is not stored for later use, so it is not the actual content of the endnote text.</p>
+<p class="item"><b>D.</b> You may not immediately follow <code>\endnote</code> with a square bracket <code>[</code>. If you do that, an error results. If you need to follow the command with a printing square bracket, then use <code>\endnote{}[</code>.
+<p class="item" style="position:relative"><b>E.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> The <i>novel</i> class does not know, and does not care, whether or not you actually write the endnotes later. The <code>\endnote</code> command merely places a marker. It does not record data for later use.</p>
+</div><!-- end 9.2.1 -->
+
+<h4 id="h9.2.2">9.2.2. <code>\endnotetext{<i>number</i>}{<i>text</i>}</code></h4>
+<div class="d4" id="d9.2.2">
+<p class="item"><b>A.</b> The built-in <code>\endnotetext{}{}</code> takes two mandatory arguments. No optional argument. If you follow <code>\endnotetext</code> with a square bracket <code>[</code>, then an error results.</p>
+<p class="item"><b>B.</b> The first argument is usually the endnote number. A period and following space will automatically be added. You may use <code>\emph{<em>number</em>}</code> if you prefer the number to be in italics.</p>
+<p class="item"><b>C.</b> The text will be block-indented. It is limited to one paragraph. If the note needs more than one paragraph, then continue like this, with an empty note number:</p>
+<p class="code"><code>\endnotetext{}{\indent <em>text</em>}</code></p>
+<p class="item"><b>D.</b> Example of an endnote:</p>
+<p class="code">
+<code><small>
+\endnotetext{9}{Yang Sho-Nuff was the twelfth son of the elder god of the ancient Who-Zit Clan, with power over the forces of rust.\par}<br/>
+\endnotetext{}{\indent However, since this was not yet the Iron Age, the terrible might of Yang Sho-Nuff was largely unrecognized.\par}<br/>
+\endnotetext{10}{As Professor Withens notes in his treatise, \emph{When Sho-Nuff Was Not Enough}, the ceremony of daily human sacrifice had a devastating effect on the tribal population.\par}
+</small></code></p>
+<p class="centerimg"><img src="html-resources/endnotetext.png" width="447" height="151" alt="using endnotetext"/></p>
+<p class="item" style="position:relative"><b>E.</b> <img src="html-resources/info18.png" width="18" height="18" style="position:relative; bottom:-3px" title="tech info" alt="tech info"/> If you don't like the built-in <code>\endnotetext</code> style, you can change it to suit your needs, using <code>\renewcommand</code>. Coding is up to you!</p>
+</div><!-- end 9.2.2 -->
+</div><!-- end 9.2 -->
+
+
+</div><!-- end 9 -->
+</div><!-- end page09 -->
+<!-- ************************************************************ -->
 <div id="pageA" class="page">
 
 
@@ -2421,18 +2524,17 @@
 <div class="d4" id="dD.2.2">
 <p class="noindent">Libraries rarely purchase Perfect Binding books (regardless of soft or hard cover) due to lack of durability in a library environment. The exceptions are popular books of no lasting literary value, and how-to books for evolving technologies. These may be obtained by libraries in the cheapest softcover version, because such books will be discarded long before they wear out.</p>
 <p>Unless you are sure that your book will be acquired by numerous libraries for long-term addition to their collections, there is little reason to produce a quality hardcover version. Not all P.O.D. services offer hardcover. If you do need a hardcover version, then be sure to carefully inquire regarding its manufacture, and preferably obtain a copy of someone else's book manufactured that way.</p>
-<p><img class="floatright" src="html-resources/smythsewn.png" width="177" height="141" alt="perfect binding"/> The best hardcovers, suitable for library use, are made using the <b>Smyth Sewing</b> process. A Smyth Sewn book has signatures of (typically) 12 or 16 folios. But instead of removing the creases after folding, each signature is sewn through its crease using strong thread, onto a durable spine material. The pages will remain attached, even with hard usage. If the spine material is sufficiently flexible, then the book will lie flat when opened.</p>
+<p><img class="floatright" src="html-resources/smythsewn.png" width="177" height="141" title="Smyth sewing" alt="Smyth sewing"/> The best hardcovers, suitable for library use, are made using the <b>Smyth Sewing</b> process. A Smyth Sewn book has signatures of (typically) 12 or 16 folios. But instead of removing the creases after folding, each signature is sewn through its crease using strong thread, onto a durable spine material. The pages will remain attached, even with hard usage. If the spine material is sufficiently flexible, then the book will lie flat when opened.</p>
 <p>Be sure to ask about spine flexibility. The most flexible methods have a soft, curved spine, and are best suited to thick novels. There is also a variety that has a square (flat) spine, which will not quite lie flat when opened. Square-spine Smyth Sewn books seem to be the fashion for documenting intellectual property.</p>
 <p>If a major publisher is producing a book that is sure to be ordered by many libraries, due to its author's popularity or maybe a movie tie-in, then it is likely to be released as a Smyth Sewn hardcover. That's because the production method is affordable in quantity. But on a P.O.D. basis, it is a significant expense.</p>
 <p>Different bindings must have different ISBNs, because they are different products.</p>
+<p>If you are ordering a hardcover edition, and the supplier calls it <b>casebound</b>, be careful. If a hardcover book is Smyth sewn, then it is almost certain to be casebound. But not the other way around! A book can be casebound, without being Smyth sewn.</p>
 </div><!-- end D.2.2 -->
 
 <h4 id="hD.2.3">D.2.3. Other Bindings</h4>
 <div class="d4" id="dD.2.3">
-<p class="noindent">A Perfect Bound softcover cannot be retroactively converted to a Smyth Sewn, Library Bound hardcover. However, it is possible to convert a softcover book to some other kinds of hardcover.</p>
-<p>In the simplest method, the soft cover is removed, and a hard cover is glued on. The pages may be shaved in size, so that they don't edge beyond the new cover; or the new cover may be slightly over-sized. Part of the soft cover may be pasted onto the hard cover. That won't look the same as original manufacture, but it avoids creating a dust jacket. Such a hard cover book is no more durable than the softcover, no more flexible at the spine, and perhaps no more resistant to losing pages. But it has a harder cover.</p>
-<p>A more advanced method involves adding strength to the glued spine, by sewing it <em>sideways</em>, before adding the hard cover. This results in a book that is less flexible at the spine, but less likely to lose pages. Sometimes, small (page count) books are made this way, when there are a limited number stored for archival purposes, rather than reading. In other words, it does not concern novels.</p>
-<p>I only mention this because there are services that will create a hardcover book from an existing softcover copy. That is how they do it. Not very useful to you, except possibly as a personal souvenir. If you want a "real" hardcover book, you want a Smyth Sewn Library Binding with hard cover and curved (flexible) spine. Those must be made directly from PDF, not by re-working an existing book. There are services that will do it (not cheaply), but you must remove the ISBN from wherever it appears, because it does not apply to the book in any binding but its original.</p>
+<p class="noindent">A Perfect Bound softcover cannot be retroactively converted to Smyh Sewn. However, it is possible to convert it to a glued-on casebound. Sometimes the original paper cover will be glued onto the new hard cover. Books of this type are sometimes used as souvenirs.</p>
+<p>If a book has very few copies, intended for permanent archiving (as with patents, and other large legal documents), then in addition to gluing, the pages may be sewn cross-wise at the spine, before attaching a hard cover. This techique is only used when the book must be tamper-resistant. It is not suited to casual reading.</p>
 </div><!-- end D.2.3 -->
 
 <h4 id="hD.2.4">D.2.4. Paper and Cover Materials</h4>
@@ -2576,64 +2678,11 @@
 <div class="d5" id="dD.3.2.7">
 <p class="noindent">If you use a Table of Contents, it is a <a href="#hD.3.1.1">display page</a>, beginning recto. If a second page is needed, add <code>\thispagestyle{empty}</code> after the table completes, but before you clear that page.</p>
 <p>Most fiction does not have, and does not need, a Table of Contents. It is more useful when the story consists of discrete episodes with distinctive names, not just numbers. Or, if the book is a collection of short stories, a table of contents is suggested. If your book is a critical edition, or has sections by different authors, then a Table of Contents is mandatory.</p>
+<p><img src="html-resources/simpletoc.png" class="floatright" width="232" height="342" title="simple table of contents" alt="simple table of contents"/> A basic Table of Contents uses the <i>center</i> environment, so that the Table's title and each entry appear centered on the page, without any fancy layout. The text may be italics. So simple. So effective. However, if you prefer a more formal, rectangular table, <i>novel</i> has its own <code><a href="#h8.1">toc environment</a></code>.</p>
 <p>Avoid any of the table environments that come with TeX or its packages. These do not provide the most attractive presentation for fiction, without a lot of work on your part. But if you wish the use them, do it using <a href="#h2.2">sandbox</a> mode.</p>
 <p>A Table of Contents has no header or footer, and no printed page number. Use <code>\thispagestyle{empty}</code>. If it continues to a second page, add <code>\thispagestyle{empty}</code> at the end, if you don't know where the page breaks.</p>
 <p>Anything preceding a Table of Contents is not listed in the table. Neither is the table itself. An Epigraph is normally not listed, even if it follows the table.</p>
 <p>You may or may not list maps or other illustrations in the table. Fiction rarely has more than a map or two, easily located in front matter by the reader, so there's no need to mention them. Use your judgement. That's different from the practice in nonfiction, especially academic works, where the illustrations convey factual data rather than artistry.</p>
-<p>A basic Table of Contents uses the <i>center</i> environment, so that the Table's title and each entry appear centered on the page, without any fancy layout. So simple. So effective. However, if you prefer a more rectangular table, <i>novel</i> has commands for this purpose.</p>
-
-<h6 id="hD.3.2.7.1"><span class="n"></span>D.3.2.7.1. The <i>toc</i> Environment</h6>
-<div class="d6" id="uD.3.2.7.1">
-<p class="noindent">Unlike some other TeX document classes, <i>novel</i> will not automatically build a Table of Contents. Also, LaTeX commands related to tables are generally disabled; adding other packages does not help (and may hurt).</p>
-<p>You may create a Table of Contents in your own style, or use the <i>toc</i> environment for <i>novel's</i> own style. The choice is yours.</p>
-<p class="code"><code>\begin{toc}[<em>extra entry separation</em>]{<em>extra margins</em>} <em>...</em> \end{toc}</code></p>
-<p>The table is not indented, and text within it is not indented.</p>
-<p>The optional argument is a number. It is the portion of normal baselineskip that will be added beneath each <code>\tocitem</code> entry. Default is 0, meaning that there is no extra skip between items, and normal baselineskip is maintained. A value greater than 0 spreads the entries, which could be attractive if there are only a few chapters and you'd like to use more space on the page. For example, a value of <i>0.25</i> means that a gap of 0.25 normal baselineskip will be added beneath each entry. A small negative value will crowd the lines together, but there is a limit (approximately -0.1) before the lines cannot be squeezed any tighter.</p>
-<p>Note that the optional argument only applies to <code>\tocitem</code> entries, not to any other text within the environment.</p>
-<p>The required argument is a length, which will be the amount of extra margin added at left and right of the table (using <i>adjustwidth</i>). A value of <i>0em</i> allows the table to occupy the full width of the textblock. A value of <i>2em</i> adds 2em to the margin on each side, so that the width of the table is 4em less than the width of the textblock.</p>
-<p>It is best to specify horizontal lengths in units of <i>em</i> or the proportional <code>\parindent</code> or <code>\textwidth</code>.</p>
-<p>Place at least one empty line above the Table's title, using <code>\null</code> or <code>\vspace*</code>. This will prevent the title (which is normally enlarged using <code>\charscale</code>) from encroaching into the top margin.</p>
-<p class="code"><code>\tocitem[<em>chapter number</em>]{<em>description</em>}{<em>page number</em>}</code> and starred</p>
-<p>Use this command for entries in the Table. Do not use it for non-Table text on the page.</p>
-<p>The optional argument is the <i>chapter number</i>, at most two digits. The number will be left-aligned, with a period automatically added. Following the period will be whatever amount of space is needed to keep the following description aligned.</p>
-<p>If the optional argument is omitted (or empty), then the <i>description</i> will align to the left of the table.</p>
-<p>If the optional argument is the tilde character ~ then no number or period is printed, but the space for <i>chapter number</i> is occupied, so that the following <i>description</i> aligns as if you had entered a <i>chapter number</i>.</p>
-<p>The <i>description</i> is usually the chapter title. If it cannot easily fit on one line, then use an additional <code>\tocitem</code>, because the text cannot be wrapped. The following example shows how this can be done.</p>
-<p>Without the asterisk, <code>\tocitem</code> fills the area between the description and the page number with empty space. The more popular, starred <code>\tocitem*</code> command fills with a dotted line, and is very attractive.</p>
-<p>You may use ordinary style commands, such as <code>\textit</code>, in the entries.</p>
-</div><!-- end D.3.2.7.1 -->
-
-<h6 id="hD.3.2.7.2"><span class="n"></span>D.3.2.7.2. Example Table of Contents</h6>
-<div class="d6" id="uD.3.2.7.2">
-<p class="noindent">This content of this table is a spoiler, in that you can figure out where the story is going. Sometimes that's desirable, but usually not:</p>
-<p class="code" style="text-indent:0px; font-size:small"><img class="floatright" src="html-resources/toc.png" width="264" height="408" alt="toc example"/>
-<code>
-\cleartorecto % because ToC must start recto<br/>
-\thispagestyle{empty}<br/>
-\vspace*{4<span style="cursor:help" title="normal baseline skip">\nbs</span>}<br/>
-\begin{toc}[0.25]{5.5em}<br/>
-{\centering\charscale[1.25]{Contents}\par}<br/>
-\null\null<br/>
-\tocitem*{Prologue}{1}<br/>
-\tocitem*[1]{The Evil Weeds}{5}<br/>
-\tocitem*[2]{A Plan of Attack}{18}<br/>
-\tocitem*[3]{Lady Withens Objects}{35}<br/>
-\tocitem*[4]{Back-Hoe to the Rescue}{48}<br/>
-\tocitem*[5]{Invasion of the Dandelions}{63}<br/>
-\tocitem*[~]{\emph{Interlude}}{90}<br/>
-\tocitem*[6]{Army of the Gardeners}{94}<br/>
-\tocitem*[7]{Too Much Rain}{113}<br/>
-\tocitem*[8]{To Nuke, or Not to Nuke?}{145}<br/>
-\tocitem*[9]{Revenge of the Zucchini}{162}<br/>
-\tocitem*[10]{Lady Withens Sneezes}{180}<br/>
-\tocitem*[11]{The Concrete Lawn}{206}<br/>
-\tocitem*{Epilogue}{228}<br/>
-\end{toc}<br/>
-\clearpage 
-</code>
-</p>
-<div style="clear:both"></div>
-</div><!-- end D.3.2.7.2 -->
 </div><!-- end D.3.2.7 -->
 
 <h5 id="hD.3.2.8">D.3.2.8. Foreword, Preface, Introduction</h5>
@@ -3124,12 +3173,24 @@
 <div id="pageZ" class="page">
 
 
-<h2 id="hZ">Appendix Z.   Changes in v.1.50</h2>
+<h2 id="hZ">Appendix Z.   Changes in v.1.50 and Later</h2>
 <div class="d2" id="dZ">
 
-<p class="noindent">Version 1.50 introduces some new features, and some changes, from version 1.46.2.</p>
+<h4>Changes in version 1.52</h4>
+<div class="d4">
+<p>The <code>linegap</code> environment is deprecated. It will still be honored in code, but has been removed from the documentation. It was never very useful.</p>
+<p>The <code>parascale</code> environment now measures how much it disturbs the line grid. Although it cannot automatically correct the disturbance, it does provide a useful warning so that you can make the change yourself.</p>
+<p>Best practice avoids scene breaks too close to the top or bottom of a page, unless you place something visible there. Now, a badly-placed <code>\scenebreak</code> can be detected, and a warning will be issued.</p>
+<p>Version 1.50 already included an advanced method for PDF/X-1a color covers. In version 1.52, this is extended to non-color interior book blocks. Now, any image placed in your document will be inspected, and classified either as <i>known-compliant</i> or <i>unknown</i>. Images with <i>unknown</i> compliance will be reported in the log file, and if any were detected, there will be a warning.</p>
+<p>There have been some miscellaneous small tweaks, unlikely to be noticeable by most users.</p>
+<p>Documents that successfully compiled with version 1.50 should look the same in version 1.52, but you may see more warnings.</p>
+</div>
 
-<h4>Post-Release Reversion to Old</h4>
+<h4>Changes in Version 1.50</h4>
+<div class="d3">
+<p>Version 1.50 introduced many new features, and some changes, from version 1.46.2.</p>
+
+<p class="noindent"><b>Post-Release Reversion to Old</b></p>
 <p>If you have an existing document created with version prior to 1.50, in rare circumstances the layout will change. </p>
 <p>If the only change is the number of lines per page, then you can simply fix it manually, using the <code>\SetLinesPerPage</code> command. But if version 1.50 creates problems, you can run the old and new versions side-by-side. Be sure to keep the new version installed.</p>
 <p>In the short term, an older version of <i>novel</i> can be found <a href="https://github.com/RobtAll/novel">here</a>, in the archives folder. Be sure that the zip file is named "novel-old".</p>
@@ -3141,57 +3202,58 @@
 <p>In the long term, the older version will be removed. No particular time frame. I do not believe that many users (if any) will be affected.</p>
 <p>If your existing documents have no problem with version 1.50, then use the newer version.</p>
 
-<h4>Cover Art Methods Changed</h4>
+<p class="noindent"><b>Cover Art Methods Changed</b></p>
 <p>From version 1.50, the method used for cover art has changed. If you have existing cover artwork using the older syntax, it will still be honored, but it is no longer documented.</p>
 <p>The new cover art syntax requires you to pre-process your image using a script, included in the documentation <i>extras</i> folder. The scripts works on Windows, Linux, and Mac OSX. The processed image will be PDF, separated to CMYK, at 240% ink limit.</p>
 <p>To obtain PDF/X, you post-process the above PDF in lualatex, using a template. Complete instructions are in the zip file containing the scripts.</p>
 <p>Of course, you don't need to use TeX at all, if your print service accepts an ordinary RGB image.</p>
 
-<h4>New Class Option: sandbox</h4>
+<p class="noindent"><b>New Class Option: sandbox</b></p>
 <p><i>Novel</i> does not permit things such as TikZ diagams, tables (other than its own method), imported PDf pages, and some other TeX effects. The purpose of the prohibition is to maintain grid layout, and ensure PDF/X compliance.</p>
 <p>From version 1.50, the <code>sandbox</code> class option allows you to do nearly anything, provided that the result is no more than four pages. Then, you can create drawings or whatever, convert to raster images, and place the images in your main document.</p>
 
-<h4>\BlockImage Obsolete</h4>
+<p class="noindent"><b>\BlockImage Obsolete</b></p>
 <p>From version 1.50 the \BlockImage command is obsolete. It was never a very good macro. If you have an existing document that uses \BlockImage, it will be honored, but it is no longer documented.</p>
 <p>You may prefer the new <code>\FloatImage</code> and <code>\WrapImage</code> commands.</p>
 
-<h4>\FloatImage Added</h4>
+<p class="noindent"><b>\FloatImage Added</b></p>
 <p>Better than <code>\BlockImage</code>: Version 1.50 now has <code>\FloatImage</code>, which can place an image "here" or float it to the next page, if it doesn't immdiately fit. Full-page floats are supported. See the full documentation, above.</p>
 <p>The <code>\InlineImage</code> command remains unchanged, and will probably remain forever. It's a good macro.</p>
 
-<h4>\WrapImage Added</h4>
+<p class="noindent"><b>\WrapImage Added</b></p>
 <p>The new <code>\WrapImage</code> command provides limited support for wrapping text around an image. It is all you need in the context of fiction writing.</p>
 <p>The <i>wrapfig</i> package is automatically loaded, and provides the layout engine. However, do not directly use the commands and environments from that package (they won't work). Instead, <i>novel</i> provides macro <code>\WrapImage</code>, which will format your input so that it can be processed correctly.</p>
 
-<h4>Drop Caps Added</h4>
+<p class="noindent"><b>Drop Caps Added</b></p>
 <p>As before, you may use the <i>lettrine</i> package, if you wish. From version 1.50, <i>novel</i> now has built-in support for a certain style of drop caps, as a special interface to the <i>lettrine</i> layout engine.</p>
 <p>Since the new <code>\dropcap</code> command requires an updated version of the <i>NovelDeco.otf</i> font, be sure to update your <span style="white-space:nowrap">luatex-cache</span>.</p>
 
-<h4>\Rework Obsolete</h4>
+<p class="noindent"><b>\Rework Obsolete</b></p>
 <p>From its early days, <i>novel</i> had an exotic built-in method for preserving layout if your book's Trim Size changed. It was a complicated piece of code, and even though it worked, it was inherently incapable of addressing some layout situations.</p>
 <p>In version 1.46.1 it was quietly removed from the documentation. In the short term, existing documents that rely on <code>\Rework</code> commands will still compile. In the long term, forget it. To my knowledge, nobody is using it.</p>
 
-<h4>Class Option <i>graytext</i> Obsolete</h4>
+<p class="noindent"><b>Class Option <i>graytext</i> Obsolete</b></p>
 <p>Formerly, you could use a class option to specify whether or not the use of grayscale text (anything other than solid black) was permitted. There was never any good reason for having that choice, so it has been removed. Now, you can always use grayscale text, if you wish.</p>
 
-<h4>\SetCropmarkGap Obsolete</h4>
+<p class="noindent"><b>\SetCropmarkGap Obsolete</b></p>
 <p>Formerly, there was a minimal ability to configure crop marks. It was not very useful, and made the code more complex. Now, the size of cropmarks is fixed.</p>
 
-<h4>New Error Messages for Endnotes</h4>
-<p>Prior to version 1.50, incorrect use of <code>\endnote</code> commands would simply produce bad typesetting, without warning.</p>
-<p>New error messages have been added. If you use <code>\endnote</code>, and get error messages that did not appear before, then be sure to read the command documentation again. The most likely reason for error is that you are using the commands according to the syntax of some other package, rather than using <i>novel's</i> own syntax.</p>
+<p class="noindent"><b>New Error Messages for Endnotes</b></p>
+<p>Prior to version 1.50, incorrect use of <a href="#h9.2"><code>\endnote</code></a> commands would simply produce bad typesetting, without warning.</p>
+<p>New error messages have been added. If you use <a href="#h9.2"><code>\endnote</code></a>, and get error messages that did not appear before, then be sure to read the command documentation again. The most likely reason for error is that you are using the commands according to the syntax of some other package, rather than using <i>novel's</i> own syntax.</p>
 
-<h4>New Algorithm for Layout Calculations</h4>
+<p class="noindent"><b>New Algorithm for Layout Calculations</b></p>
 <p>Under the hood, version 1.50 uses a more accurate method for page layout. In most cases, the change is microscopic, and will not affect existing documents.</p>
 <p>Books that use widely-spaced lines are most likely to show a noticeable change for the better. In a few cases, the default number of lines per page will change. If you have an existing document using default lines per page, and it has changed, then simply specify the exact number manually.</p>
 
-<h4>Revised Documentation Format</h4>
+<p class="noindent"><b>Revised Documentation Format</b></p>
 <p>This documentation has been slightly revised. Now, long sections are broken down into items, marked A, B, etc. This is for the convenience of translators.</p>
 <p>Under the hood, in the TeX code, there has been some cleanup, for the benefit of future package maintainers.</p>
 
-<h4>What's Unchanged</h4>
+<p class="noindent"><b>What's Unchanged</b></p>
 <p>Most of <i>novel</i> is just as before, and will be...</p>
 <p>In particular, there is no support for tables (other than novel's own Table of Contents), no support for automatic divisions into sections and other kinds of partitions, no support for automatic index or bibliography, and generally no support for the "academic" structure used by other document classes.</p>
+</div>
 
 
 </div><!-- end Z -->

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

Modified: trunk/Master/texmf-dist/doc/lualatex/novel/novel.tex
===================================================================
--- trunk/Master/texmf-dist/doc/lualatex/novel/novel.tex	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/doc/lualatex/novel/novel.tex	2018-04-29 23:01:28 UTC (rev 47492)
@@ -5,7 +5,7 @@
 % IF YOU COMPILE THIS DOCUMENT: Be sure that both this file and
 %   novel.pdf (if present) have read/write permissions for any user.
 %   Otherwise, compile may fail at the point where files are written.
-\documentclass{novel} % v. 1.50.4.
+\documentclass{novel} % v. 1.52.
 % Almost all settings are defaults.
 \SetHeadFootStyle{3}
 \SetTitle{Novel Document Class} % only footer, with page number
@@ -58,8 +58,10 @@
 
 \QuickChapter{4. Version}
 
-\noindent 1.50.4, 2018-04-07: Enhancements to novel-scripts.
+\noindent 1.52, 2018-04-26: Enhanced detection and warning using Lua code.
 
+\noindent 1.50.5, 2018-04-11: Minor bug fixes (docs and code disagreed).
+
 \noindent 1.50, 2018-03-28: Improved image handling commands, sandbox.
 
 \noindent 1.46.2, 2018-01-14: Stable "old" version. Use newer 1.50.

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -12,7 +12,7 @@
 %% 
 %%
 \ProvidesFile{novel-CalculateLayout.sty}%
-[2018/04/07 v1.50.4 LaTeX file (layout calculations)]
+[2018/04/26 v1.52 LaTeX file (layout calculations)]
 %%
 
 %%
@@ -303,7 +303,7 @@
 % In order to fix the position, \topskip gets a non-flexible setting.
 % The best value is normal baselineskip, partly because it looks right,
 %   and also to avoid underfull vboxes on nearly every page.
-\gsetlength\topskip{\baselineskip}
+\gsetlength\topskip{\baselineskip} % absorber
 % In `novel' class, footers are done in an unusual manner, as explained above.
 % To fix the position of the virtual footer baseline:
 \gsetlength\footskip{\baselineskip}

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-ChapterScene.sty}%
-[2018/04/07 v1.50.4 LaTeX file (chapter and scene macros)]
+[2018/04/26 v1.52 LaTeX file (chapter and scene macros)]
 %%
 
 
@@ -94,18 +94,60 @@
 %   Default behavior is \noindent for following paragraph.
 %   Use \SetScenebreakIndent{true or false} in Preamble to change globally.
 %   Either way, local behavior changed using \forceindent or \backindent.
-\newcommand\scenebreak{\null}
+% \newcommand\scenebreak{\null}
 %
+\newcommand\scenebreak{% revised in version 1.52.
+  \leavevmode\getBreakpos{scenebreak}~\par
+}
+%
 \newcommand\sceneline{%
-  \noindent\hfil%
+  \noindent\getBreakpos{sceneline}\hfil%
   \raisebox{0.2em}{\rule{0.35\textwidth}{.4pt}}\hfil\par%
 }
 %
 \newcommand\scenestars{%
-  \noindent\hfil%
+  \noindent\getBreakpos{scenestars}\hfil%
   \raisebox{-.3em}{*\quad\quad*\quad\quad*}\hfil\par%
 }
-%% end scene changes
+%
+\gdef\getBreakpos#1{%
+  \begingroup%
+    \savepos%
+    \protected at write\@auxout{}{%
+      \protect\@getBreakpos{\noexpand\number\lastypos}{\thepage}{#1}%
+    }%
+  \endgroup%
+}
+%
+\newlength\CurrentBreakpos
+\gdef\@getBreakpos#1#2#3{} % nothing, when reading aux at beginning
+\gdef\@RedefineBreakpos{ % called by `novel.cls' \AtBeginDocument
+  \gdef\@getBreakpos##1##2##3{% numerical position sp, page, break type
+    \gsetlength\CurrentBreakpos{##1sp}% measured up from very bottom of page.
+    \FPsub{\@BreakLines}{\strip at pt\TotalYpos}{\strip at pt\CurrentBreakpos}
+    \FPdiv{\@BreakLines}{\@BreakLines}{\strip at pt\nbs}%
+    \FPround{\@BreakLines}{\@BreakLines}{0}% integer lines from text top
+    \ifthenelse{\equal{##3}{scenebreak}}{%
+    \xdef\thisline{\@BreakLines}%
+      \ifnum\@BreakLines=1%
+        \ClassWarning{novel}{Replace \string\scenebreak\space at top of ^^J%
+         page ##2 with \string\sceneline\space or \string\scenestars.}%
+      \fi%
+      \ifnum\@BreakLines=\@LinesPerPage%
+        \ClassWarning{novel}{Replace \string\scenebreak\space at bottom of ^^J%
+         page ##2 with \string\sceneline\space or \string\scenestars.}%
+      \fi%
+    }{}%
+    \FPsub{\@nearthebottom}{\@LinesPerPage}{1}%
+    \ifnum\@BreakLines=2%
+      \ClassWarning{novel}{\string\ ##3 too close to top of page ##2.}%
+    \fi%
+    \ifnum\@BreakLines=\@nearthebottom%
+      \ClassWarning{novel}{\string\ ##3 too close to bottom of page ##2.}%
+    \fi%
+  }%
+} % end @RedefineBreakpos
+%%
 
 
 %% Repair \FirstLine{} command from `magaz' package.
@@ -194,7 +236,7 @@
   \vspace{\@fixlines\nbs}%
   \if at DeleteCSline\else\null\fi% adjusts when dropfolioinside
   \global\@WithinChapterStartfalse%
-  \vspace{\@NovelCaulk}%
+  \vspace{0.1pt plus 0pt minus 0.2pt}% caulk
   \gsetlength\parindent{\normalparindent}% restored
   \nov at AfterGroup\NoIndentAfterThis% etextools and noindentafter
 }

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-DropCap.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-DropCap.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-DropCap.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -19,7 +19,7 @@
 % This file is new in `novel' version 1.50.
 %
 \ProvidesFile{novel-DropCap.sty}%
-  [2018/04/07 v1.50.4 (Drop Caps)]
+  [2018/04/26 v1.52 (Drop Caps)]
 \NeedsTeXFormat{LaTeX2e}[1999/12/01]
 %
 %
@@ -94,7 +94,6 @@
 \newdimen\NDCboxheight
 \newdimen\NDCboxdepth
 %
-\ExplSyntaxOn
 \DeclareDocumentCommand \NDC at boxcap { m }{%
   \begingroup%
   % The model letter has no upper diacritical.
@@ -163,7 +162,7 @@
       \FPdiv{\@tempN}{\strip at pt\textwidth}{\strip at pt\@OriginalTextWidth}%
       \FPmul{\NDC at bloat}{\NDC at bloat}{\@tempN}%
     \else%
-      \if at ReworkMargins
+      \if at ReworkMargins%
         \FPdiv{\@tempN}{\strip at pt\textwidth}{\strip at pt\@OriginalTextWidth}%
         \FPmul{\NDC at bloat}{\NDC at bloat}{\@tempN}%
       \fi%
@@ -214,7 +213,6 @@
     }%
   \fi%
 }% end @NDCdropcap
-\ExplSyntaxOff
 %%
 
 

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-FileData.sty}%
-[2018/04/07 v1.50.4 LaTeX file (File Data settings)]
+[2018/04/26 v1.52 LaTeX file (File Data settings)]
 %% 
 
 

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-Fonts.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-Fonts.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-Fonts.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-Fonts.sty}%
-[2018/04/07 v1.50.4 LaTeX file (font settings and defaults)]
+[2018/04/26 v1.52 LaTeX file (font settings and defaults)]
 %%
 
 
@@ -164,7 +164,6 @@
 \gdef\@DropCapColorModel{} % until actually set, using `xcolor' syntax
 \gdef\@DropCapColorValue{black} % until actually set, using `xcolor' syntax
 \gdef\NDC at charstyle{}
-\ExplSyntaxOn
 % The argument to \SetDropCapFont is a user-defined `fontspec' font command.
 % Example syntax, using `fontspec' in LuaLaTeX:
 %   Create font command, such as: \newfontface\mynicefont[options]{fontname}
@@ -204,6 +203,7 @@
   }%
 }% end \@setdropcapcolor
 % for convenience:
+\ExplSyntaxOn
 \cs_new_eq:NN \SetDropcapFont \SetDropCapFont
 \cs_new_eq:NN \SetDropcapColor \SetDropCapColor
 \ExplSyntaxOff
@@ -274,9 +274,9 @@
 %% ----------------------------------------------------------------------------
 \gdef\@ActivateFonts{% called by `novel.cls' \AtEndPreamble
   % We begin with the parent font:
-  \if at coverart %%%%%
-    \SetParentFont{NovelDeco.otf} %%%%%
-  \fi %%%%%
+  \if at coverart
+    \SetParentFont{NovelDeco.otf}
+  \fi
   \if at ParentFontSet\else
     \ifthenelse{\equal{\rmdefault}{lmr}}{%
       % At this point, if \rmdefault is lmr, it means the user did not choose
@@ -301,12 +301,12 @@
       \if at ParentFontSet\else
         \ClassError{novel}{Wrong command used to set main font}%
         {You tried to define the main document font the wrong way. ^^J%
-        Bad: \string\renewcommand\string\rmdefault\{font\}\space ^^J%
-        Bad: \string\usepackage\{font package\}\space ^^J%
-        Bad: \string\RequirePackage\{font package\}\space ^^J%
-        Bad: \string\setmainfont[features]\{font\}\sapce ^^J%
+        Bad: \string\renewcommand\string\rmdefault{font}\space ^^J%
+        Bad: \string\usepackage{font package}\space ^^J%
+        Bad: \string\RequirePackage{font package}\space ^^J%
+        Bad: \string\setmainfont[features]{font}\sapce ^^J%
         Those are incorrect in `novel' class. ^^J%
-        Use \string\SetParentFont[features]\{font\}\space instead. ^^J%
+        Use \string\SetParentFont[features]{font}\space instead. ^^J%
         See `novel' documentation.}%
       \fi
     }%

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-Footnotes.sty}%
-[2018/04/07 v1.50.4 LaTeX file (commands for footnotes and endnotes)]
+[2018/04/26 v1.52 LaTeX file (commands for footnotes and endnotes)]
 %%
 
 
@@ -189,7 +189,7 @@
   }{%
     \global\togglefalse{@usenomark}%
   }%
-  \gdef\footnoterule{\vfill\@fourem}% %%%%%
+  \gdef\footnoterule{\vfill\@fourem}%
   \begingroup%
   \def\footnotesize{% Not gdef. Local to footnote. Calculated during layout.
     \@setfontsize\footnotesize{\@myfootnotesizeN pt}{\@myfootnoteskipN pt}%

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-HeadFootStyles.sty}%
-[2018/04/07 v1.50.4 LaTeX file (header and footer layouts and styles)]
+[2018/04/26 v1.52 LaTeX file (header and footer layouts and styles)]
 %% 
 
 
@@ -465,7 +465,6 @@
   % END PRE-DEFINED LAYOUTS AND STYLES.
   % ---------------------------------------------------------------------------
   %
-%%%%%
   % Now put `fancyhdr' to work:
   \pagestyle{fancy} % default unless over-ridden by \thispagestyle{}
   %

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-Images.sty}%
-[2018/04/07 v1.50.4 LaTeX file (image placement)]
+[2018/04/26 v1.52 LaTeX file (image placement)]
 %%
 
 
@@ -215,7 +215,15 @@
 % With the starred command, the image occupies zero cursor width, so that
 %   anything following will overlie it.
 \DeclareDocumentCommand \InlineImage { s O{0pt} m }{%
-  \@TestImageExtension{#3}% 
+  \@TestImageExtension{#3}%
+  \@tempTFfalse%
+  \if at pdfxSEToff%
+    \@tempTFtrue%
+  \else%
+    \IfSubStr*{\@UnknownImages}{#3}{\@tempTFtrue}{}%
+    \IfSubStr*{\@AllGoodImages}{#3}{\@tempTFtrue}{}%
+  \fi%
+  \if at tempTF\else\@NovelInspectImage{#3}\fi%
   \StrDel{#2}{\space}[\@myila]%
   \StrCut{\@myila}{,}{\@myilxa}{\@myilya}%
   \ifthenelse{\equal{\@myilxa}{} \OR \equal{\@myilxa}{0}}{%
@@ -297,6 +305,14 @@
       {Header footer allow \string\InlineImage, but not \string\FloatImage.}%
   }{}%
   \@TestImageExtension{#3}%
+  \@tempTFfalse%
+  \if at pdfxSEToff%
+    \@tempTFtrue%
+  \else%
+    \IfSubStr*{\@UnknownImages}{#3}{\@tempTFtrue}{}%
+    \IfSubStr*{\@AllGoodImages}{#3}{\@tempTFtrue}{}%
+  \fi%
+  \if at tempTF\else\@NovelInspectImage{#3}\fi%
   % Sadly, parsing with `xstring' involves roundabout code:
   \StrDel{#2}{\space}[\@tempArgs]%
   \StrCut{\@tempArgs}{,}{\@tempArgA}{\@tempArgX}%
@@ -333,10 +349,28 @@
   \end at float\par%
   \floatlocation{figure}{!ht}% restore default float method
   \null%
-  \vspace{-\nbs}%
-  \vspace{\@NovelCaulk}%
+  \vspace{0.01pt plus 0pt minus 0.02pt} % caulk
 } %
 %
+
+%% Environment @floatimagegap. Only used by \@FloatImage command.
+% Creates a gap at fixed height, regardless of content.
+% Needs to compensate for prior line depth.
+\newcounter{@gaplines} % passes the argument down to environment end
+\DeclareDocumentEnvironment {@floatimagegap} { m } {%
+  \par%
+  \null%
+  \vspace*{-\nbs}%
+  \begin{textblock*}{\textwidth}[0,0](0pt,0pt)%
+  \setcounter{@gaplines}{#1}%
+  \strut\par%
+  \vspace*{-\nbs}%
+}{% close the environment:
+  \end{textblock*}%
+  \par%
+  \vspace*{#1\nbs}%
+} %
+%%
 \DeclareDocumentCommand \@FloatImage { m m m }{% DO NOT CALL DIRECTLY
   \global\@UsingNovelCommandtrue%
   \gdef\@mygraphic{\novel at sub@inclgr[scale=\@TMratio]{#3}}%
@@ -353,13 +387,13 @@
   % If a full-page image is too tall for a page, standard TeX float will
   %   delay it until the time that floats are cleared, typically by \clearpage.
   %   That would probably be at the end of a chapter.
-  % In `novel' this behaivor is hacked. Regardless of the image's actual
+  % In `novel' this behavior is hacked. Regardless of the image's actual
   %   height, it is treated as if its height does not exceed whatever will
   %   fit on a single page. Then, a full-page float will appear at the first
   %   opportunity, rather than being delayed. As a consquence, an oversized
   %   full-page float may overflow into the footer or bottom margin.
   %   To fix that (if it matters), you need to edit the image in graphics.
-  \begin{linegap}{\@allowmyoverflow}%
+  \begin{@floatimagegap}{\@allowmyoverflow}%
     \vspace*{-\nfs}%
     \null%
     {\centering%
@@ -369,7 +403,7 @@
       }%
       \par%
     }%
-  \end{linegap}%
+  \end{@floatimagegap}%
   \global\@UsingNovelCommandfalse%
 } % 
 % end Float Image
@@ -401,11 +435,131 @@
 %%
 
 
+%% New in version 1.52: read file bytes as plain text, for later parsing.
+% Output is comma-separated list of byte codes, decimal 0-255.
+% Returns -1 if requested start is more than file size.
+% Returns all bytes if requested number exceeds file size.
+% Does not test if file exists; error if not found.
+\DeclareDocumentCommand\novelgetbytes { m m m } {%
+  % filename, start byte number (0=beginning, e=up to end), number of bytes
+  \ifthenelse{\equal{#2}{e}}{% package xifthen
+    \long\edef\novelbytesare{%
+      \directlua{
+        inp = assert(io.open("#1", "rb"))
+        local e=inp:seek("end")
+        if #3>e+1 then
+          inp:seek("set")
+          local r=inp:read(e)
+          sep=""
+          for i,_ in string.bytes(r)
+          do
+          tex.sprint(sep)
+          sep=","
+          tex.sprint(i)
+          end
+        else
+          local b=e-2-math.min(e,#3)
+          local w=1+math.min(e,#3)
+          inp:seek("set",b)
+          local r=inp:read(w)
+          sep=""
+          for i,_ in string.bytes(r)
+          do
+          tex.sprint(sep)
+          sep=","
+          tex.sprint(i)
+          end
+        end
+      }%
+    }%
+  }{%
+    \long\edef\novelbytesare{%
+      \directlua{
+        inp = assert(io.open("#1", "rb"))
+        local e=inp:seek("end")
+        if #2>e then tex.sprint(-1) else
+          local w=math.min(#3,e-#2)
+          inp:seek("set",#2)
+          local r=inp:read(w)
+          sep=""
+          for i,_ in string.bytes(r)
+          do
+          tex.sprint(sep)
+          sep=","
+          tex.sprint(i)
+          end
+        end
+      }%
+    }%
+  }%
+} % end @novelgetbytes
 
- 
+%%
+% png bit depth is 8 for ordinary color or gray, 1 for b/w monochrome.
+% Although png allows more than 8, `novel' does not.
+\def\novelpngbitdepth#1{\novelgetbytes{#1}{24}{1}\novelbytesare}
+% png color type: 0=grayscale (incl. b/w).
+% `novel' only permits colortype 0 for non-color book interiors.
+% other: 2=rgb, 3=indexed rgb, 4=gray alpha, 6=rgb alpha.
+\def\novelpngcolortype#1{\novelgetbytes{#1}{25}{1}\novelbytesare}
+%%
 
+%%
+% Examine png or jpg image for novel-make as comment:
+% Known-good images, will not be inspected. Comma-separated list:
+\newcommand\SetKnownGoodImages[1]{
+  \gdef\@KnownGoodImages{#1}
+}
+\SetKnownGoodImages{} % default empty
+\gdef\@AllGoodImages{}
+\gdef\@UnknownImages{}
+%
+\gdef\@GatherGoodImages{% called \AtBeginDocument by `novel.cls'.
+  \let\SetKnownGoodImages\relax
+  \xdef\@AllGoodImages{\@KnownGoodImages\space \@AllGoodImages}
+  \if at pdfxSEToff
+    \xdef\@AllGoodImages{\@KnownGoodImages}
+    \xdef\@UnknownImages{}
+  \fi
+}
+% This is the (decimal) code string:
+\gdef\@novelmake{110,111,118,101,108,109,97,107,101}
+%
+\newcommand\@NovelInspectImage[1]{%
+  \StrRight{#1}{3}[\tempEXT]%
+  \ifthenelse{\equal{\tempEXT}{png} \OR \equal{\tempEXT}{PNG}}{%
+    \novelgetbytes{#1}{e}{256}%
+  }{% jpg or JPG:
+    \novelgetbytes{#1}{0}{256}%
+  }%
+  \IfSubStr{\novelbytesare}{\@novelmake}{%
+    \xdef\@AllGoodImages{\@AllGoodImages\space #1}%
+  }{%
+    \xdef\@UnknownImages{\@UnknownImages\space #1}%
+  }%
+}
+%%
 
+
+%% Called \AfterEndDocument by `novel.cls`:
+\long\gdef\@WarnUnknownImages{%
+  \@tempTFfalse%
+  \ifthenelse{\equal{\@UnknownImages}{}}{}{\@tempTFtrue}%
+  \if at pdfxSEToff\@tempTFfalse\fi%
+  \if at tempTF%
+      \typeout{^^JClass `novel' Alert: Some images not processed by scripts.^^J%
+       \space List of unprocessed images: \@UnknownImages ^^J%
+       \space Above list does not include any `known good' set by you. ^^J^^J}%
+      \ClassWarning{novel}{\@testintentional %
+      Some images may not meet PDF/X specifications. ^^J%
+      See near end of log file for `Some images not processed by scripts`. ^^J}%
+  \fi%
+}
 %%
+
+
+
+%%
 \endinput
 %%
 %% End of file `novel-Images.sty'.

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-LayoutSettings.sty}%
-[2018/04/07 v1.50.4 LaTeX file (layout settings)]
+[2018/04/26 v1.52 LaTeX file (layout settings)]
 %%
 
 
@@ -209,39 +209,44 @@
 %
 \@twocolumnfalse
 \@twosidetrue
-\@mparswitchtrue
+\setlength\columnsep{12pt} % not needed, picked something at random
+\setlength\columnseprule{0pt}
 %
+\@mparswitchtrue % irrelevant
+\setlength\marginparwidth{0pt} % no marginal paragraphs allowed
+\setlength\marginparsep{0pt}
+\setlength\marginparpush{0pt}
+%
+\global\@topnum \z@
 \setlength\abovedisplayskip{0pt}
 \setlength\abovedisplayshortskip{0pt}
 \setlength\belowdisplayshortskip{0pt}
 \setlength\belowdisplayskip{0pt}
-\global\@topnum \z@
-%
 \setlength\smallskipamount{0pt}
 \setlength\medskipamount{0pt}
 \setlength\bigskipamount{0pt}
+% `novel' uses grid setting. However, to allow for roundoff errors in
+% vertical position calculations, there is a tiny amount of wiggle room:
 \setlength\topsep{0pt}
 \setlength\partopsep{0pt}
 \setlength\parsep{0pt}
-\setlength\marginparwidth{0pt}
-\setlength\marginparsep{0pt}
-\setlength\marginparpush{0pt}
+\setlength\parskip{0pt}
 \setlength\floatsep{0pt}
 \setlength\textfloatsep{0pt}
 \setlength\dbltextfloatsep{0pt}
 \setlength\intextsep{0pt}
-% \topskip will be set as normal baslineskip, which must first be calculated.
+% \topskip will be set as normal baselineskip, which must first be calculated.
 % That is done in novel-CalculateLayout.sty.
-\widowpenalty 150 % same as TeX default
-\clubpenalty 150 % same as TeX default
 \setlength\lineskip{0pt}
 \setlength\normallineskip{0pt}
+\setlength\lineskiplimit{-2pt} % allows some limited vertical clash
 \renewcommand\baselinestretch{1} % multiplier
-\setlength\parskip{0pt}
+\widowpenalty 150 % same as TeX default
+\clubpenalty 150 % same as TeX default
 \@lowpenalty   51
 \@medpenalty  151
 \@highpenalty 301
-% Floats not allowed, but just in case:
+% Floats are limited, but just in case:
 \setcounter{topnumber}{2}
 \renewcommand\topfraction{.7}
 \setcounter{bottomnumber}{1}
@@ -261,8 +266,6 @@
 \DeclareOldFontCommand{\sl}{\normalfont\slshape}{\normalfont\slshape}
 \DeclareOldFontCommand{\sc}{\normalfont\scshape}{\normalfont\scshape}
 %
-\setlength\columnsep{12pt} % usually not needed, picked something at random
-\setlength\columnseprule{0pt}
 \pagestyle{empty} % will be over-ridden by fancyhead in separate file
 \pagenumbering{arabic} % may be over-ridden in document
 \flushbottom % best for continuous text
@@ -271,10 +274,6 @@
 
 
 
-
-
-
-
 %% FRONTMATTER, MAINMATTER. BUT NO BACKMATTER!
 %% ----------------------------------------------------------------------------
 %
@@ -343,20 +342,24 @@
 % but would interfere with the `novel' emphasis on constant line skip.
 % You may redefine the commands using your own Preamble code (discouraged).
 %
-\gdef\null{\hbox{\strut}} % May be important!
+%%%%%\gdef\null{\hbox{\strut}} % May be important!
 %
 % Standard LaTeX font sizes are ineffective:
+\gdef\@noSizeCommand#1{\ClassWarning{novel}{%
+  Standard LaTeX font sizes are ineffective in `novel' class. ^^J%
+  Your use of command `#1' was ignored. ^^J}%
+}
 \gdef\@DisableFontSizes{% called by `novel.cls' \AtBeginDocument
-  \let\HUGE\relax
-  \let\Huge\relax
-  \let\huge\relax
-  \let\LARGE\relax
-  \let\Large\relax
-  \let\large\relax
-  \let\small\relax
-  \let\footnotesize\relax
-  \let\scriptsize\relax
-  \let\tiny\relax
+  \gdef\HUGE{\@noSizeCommand{HUGE}}
+  \gdef\Huge{\@noSizeCommand{Huge}}
+  \gdef\huge{\@noSizeCommand{huge}}
+  \gdef\LARGE{\@noSizeCommand{LARGE}}
+  \gdef\Large{\@noSizeCommand{Large}}
+  \gdef\large{\@noSizeCommand{large}}
+  \gdef\small{\@noSizeCommand{small}}
+  \gdef\footnotesize{\@noSizeCommand{footnotesize}}
+  \gdef\scriptsize{\@noSizeCommand{scriptsize}}
+  \gdef\tiny{\@noSizeCommand{tiny}}
 } %
 % In `novel' there is no academic organization.
 % All these do is echo the argument, if any:
@@ -371,24 +374,44 @@
 % In some situations, the use will be interrupted:
 \DeclareDocumentCommand\@nodocommand { O{} +m } {%
   \ClassError{novel}{No command or environment `#1' in this class}%
-   {Many academic layout commands or environments are disabled in `novel'. ^^J%
-    #2.}%
+   {Many academic layout commands or environments are disabled in `novel'.}%
 }
+\DeclareDocumentCommand\@sandboxonly { m } {%
+  \ClassError{novel}{ ^^J%
+   Command or environment `#1' only allowed in `sandbox' mode. ^^J%
+   See `novel' documentation 2.2. ^^J
+   The offending command may have been called by another macro.}%
+   {Fix your code. If you do not, then compile will fail or be unexpected.}%
+}
 % Here is the interruption list:
-\long\gdef\maketitle\@nodocommand{maketitle}
-\long\gdef\makeindex\@nodocommand{makeindex}
-\long\gdef\tableofcontents\@nodocommand{tableofcontents}
-\long\gdef\listoftables\@nodocommand{listoftables}
-\long\gdef\listoffigures\@nodocommand{listoffigures}
-\long\gdef\thebibliography\@nodocommand{thebibliography}
-\long\gdef\theindex\@nodocommand{theindex}
-\long\gdef\titlepage\@nodocommand{titlepage}
-\long\gdef\description\@nodocommand{description}
-\long\gdef\caption\@nodocommand{caption}
-\long\gdef\abstract\@nodocommand{abstract}
-\long\gdef\table\@nodocommand[Use `sandbox' mode to create an image]{table}
-\long\gdef\figure\@nodocommand[Use `sandbox' mode to create an image]{figure}
+\long\gdef\maketitle{\@nodocommand{maketitle}}
+\long\gdef\makeindex{\@nodocommand{makeindex}}
+\long\gdef\tableofcontents{\@nodocommand{tableofcontents}}
+\long\gdef\listoftables{\@nodocommand{listoftables}}
+\long\gdef\listoffigures{\@nodocommand{listoffigures}}
+\long\gdef\thebibliography{\@nodocommand{thebibliography}}
+\long\gdef\theindex{\@nodocommand{theindex}}
+\long\gdef\abstract{\@nodocommand{abstract}}
+\if at sandbox\else
+  \DeclareDocumentCommand\caption{}{\@sandboxonly{caption}}
+  \DeclareDocumentEnvironment{tabular}{s o +m}{\@sandboxonly{tabular}}{}
+  \DeclareDocumentEnvironment{table}{s o}{\@sandboxonly{table}}{}
+  \DeclareDocumentEnvironment{figure}{s o}{\@sandboxonly{figure}}{}
+  \DeclareDocumentEnvironment{itemize}{s}{\@sandboxonly{itemize}}{}
+  \DeclareDocumentEnvironment{enumerate}{s}{\@sandboxonly{enumerate}}{}
+  \DeclareDocumentEnvironment{description}{s}{\@sandboxonly{description}}{}
+  \DeclareDocumentEnvironment{labeling}{s}{\@sandboxonly{labeling}}{}
+\fi
 %
+\newif \if at OnTitlePage % not really useful
+\DeclareDocumentEnvironment{titlepage}{s}{%
+  \clearpage
+  \thispagestyle{empty}
+  \global\@OnTitlePagetrue
+}{
+  \clearpage
+  \global\@OnTitlePagefalse
+}
 %% end disable or neutralize.
 
 

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-Obsolete.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-Obsolete.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-Obsolete.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-Obsolete.sty}%
-[2018/04/07 v1.50.4 LaTeX file (obsolete macros)]
+[2018/04/26 v1.52 LaTeX file (obsolete macros)]
 %%
 
 
@@ -243,6 +243,38 @@
 %%
 
 
+%% LINEGAP IS OBSOLETE CODE. NOT DOCUMENTED.
+%% ----------------------------------------------------------------------------
+% Allows text to be placed (potentially) off-grid, with grid resuming after.
+\newif \if at WithinLinegap % true within linegap environment
+\newcounter{currentlinegap} % 0 when not within linegap, >0 otherwise.
+\DeclareDocumentEnvironment {linegap} { m } {%
+  \FPifint{#1}\else%
+    \ClassError{novel}{Non-integer linegap on page \thepage}%
+     {Only integer >= 1 allowed for linegap.}%
+  \fi%
+  \FPiflt{#1}{1}%
+    \ClassError{novel}{Insufficient linegap on page \thepage}%
+     {Only integer >= 1 allowed for linegap.}%
+  \fi%
+  \par%
+  \null%
+  \vspace*{-\nbs}%
+  \global\@WithinLinegaptrue%
+  \begin{textblock*}{\textwidth}[0,0](0pt,0pt)%
+  \setcounter{currentlinegap}{#1}
+  \strut\par%
+  \vspace*{-\nbs}%
+}{% close the environment:
+  \end{textblock*}%
+  \global\@WithinLinegapfalse%
+  \par%
+  \vspace*{#1\nbs}%
+  \setcounter{currentlinegap}{0}%
+} % end linegap (obsolete)
+%%
+
+
 %% REWORK IS OBSOLETE CODE. NOT DOCUMENTED.
 %% ----------------------------------------------------------------------------
 %% \ReworkTrimSize retroactively changes Trim Size after layout.

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-PostLayout.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-PostLayout.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-PostLayout.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -12,7 +12,7 @@
 %% 
 %%
 \ProvidesFile{novel-PostLayout.sty}%
-[2018/04/07 v1.50.4 LaTeX file (post-layout modifications)]
+[2018/04/26 v1.52 LaTeX file (post-layout modifications)]
 %%
 
 %%

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-Sandbox.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-Sandbox.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-Sandbox.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -17,7 +17,7 @@
 %% 
 %%
 \ProvidesFile{novel-Sandbox.sty}%
-[2018/04/07 v1.50.4 LaTeX file (used only with sandbox class option)]
+[2018/04/26 v1.52 LaTeX file (used only with sandbox class option)]
 %%
 
 %%
@@ -25,12 +25,14 @@
 %% It provides support for tables, and a few other things that ordinarily
 %%   would be prohibited in `novel' due to possible layout incompatibility.
 %%
+%% Normally, `novel' sets many glues and lengths to zero, to maintain line grid.
+%% But `sandbox', sets the glues to values typical of other document classes.
+%% So, not only can you construct tables, they will look as expected.
+%%
 
 
 
 
-
-
 \setlength\leftmargini  {2.5em}
 \leftmargin  \leftmargini
 \setlength\leftmarginii  {2.2em}

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,7 +13,7 @@
 %% 
 %%
 \ProvidesFile{novel-TextMacros.sty}%
-[2018/04/07 v1.50.4 LaTeX file (text macros usable within document body)]
+[2018/04/26 v1.52 LaTeX file (text macros usable within document body)]
 %%
 
 
@@ -112,10 +112,10 @@
 %%
 
 %% \smcp{} and \textsc{} small caps (Open Type) and \allsmcp{}:
-\ExplSyntaxOn
 \DeclareDocumentCommand \smcp { +m } {% lowercase to small caps
   {\addfontfeature{Letters=SmallCaps}#1}%
 }
+\ExplSyntaxOn
 \DeclareDocumentCommand \allsmcp { +m } {% lowercase+uppercase to small caps
   \fontspec_if_feature:nTF {c2sc}{%
    {\addfontfeatures{Letters=UppercaseSmallCaps, Letters=SmallCaps}#1}%
@@ -231,7 +231,6 @@
 % Do not use \\ or \par inside \charscale. Sometimes you need \par after it.
 % If the text is in a font other than usual, place the font command
 %   outside \charscale, not inside.
-\ExplSyntaxOn
 \DeclareDocumentCommand \charscale { s O{1} m } {%
   % Allows empty or blank to be used, and still provide default values:
   \ifthenelse{\equal{#2}{}\OR\equal{#2}{\space}}{%
@@ -271,47 +270,107 @@
     \smash{\phantom{\scalebox{\@myscale}{#3}}}%
   }%
  }% end \charscale
-\ExplSyntaxOff
 %%
 
-%% Environment parascale.
-% If you really must change font size and baselineskip on a paragraph basis,
-%   then use an environment. For example, the text on your Copyright page might
-%   be smaller (and less baselineskip) than normal.
-% The following environment takes an optional argument, which is the scale
-%   of font size and baselineskip, relative to normal. Note that both size
-%   and skip are scaled together. The default is 1, meaning no change.
-% To get the rough equivalent of traditional \footnotesize, use 0.83 scale.
-% Example:
-%    \begin{parascale}[0.83]
-%    This text is like old footnotesize. It can go on for many lines.\par
-%    Be sure to end with the paragraph ending.\par
-%    You may need to manipulate whether anything indents.\par
-%    \end{parascale}
-% Normally you should NOT use this environment within the main text,
-%   as it will upset the baselineskip there. If you have to do that for
-%   a special effect, then use \vspace{} before and after the environment,
-%   so that the following normalsize text is re-aligned. You'll have to
-%   do the calculations yourself.
-\newenvironment{parascale}[1][1]
-{\begingroup%
-\FPmax{\@mytempDetailsN}{#1}{0.5}% must be at least half normal.
-\FPmul{\@mytempDetailsFontN}{\@mytempDetailsN}{\strip at pt\@SetFontSize}%
-\FPround{\@mytempDetailsFontN}{\@mytempDetailsFontN}{2}%
-\FPmul{\@mytempDetailsSkipN}{\@mytempDetailsN}{\strip at pt\baselineskip}%
-\FPround{\@mytempDetailsSkipN}{\@mytempDetailsSkipN}{2}%
-\fontsize{\@mytempDetailsFontN pt}{\@mytempDetailsSkipN pt}\selectfont%
-}%
-{\endgroup}
+
+% Note that \savepos is a luatex primitive, not a macro from gridset package.
+% Length \TotalYpos is measured from the very bottom of the page,
+% upward to the baseline of non-existent "line zero" in main text.
+% The first printed main text line is line 1.
+% Neither header nor footer influence this.
+\newlength\TotalYpos
+\gdef\@GetInitialYpos{% called by `novel.cls' \AtEndPreamble
+  \begingroup%
+    \savepos%
+    \protected at write\@auxout{}{%
+      \protect\@TotalYpos{\noexpand\number\lastypos}%
+    }%
+  \endgroup%
+}
+%
+\gdef\@TotalYpos#1{\gsetlength\TotalYpos{#1sp}}
+%
+
+
 %%
+\newlength\PosTolerance % How close is close enough?
+\setlength\PosTolerance{0.0625pt} % should be good enough
+%%
 
+
+%% Environment parascale. Scales one or more paragraphs. Modified in v. 1.52.
+% Warns when (as is often the case) the line after \end{parascale}
+%   will be off grid. Then, add some \vspace just before \end{parascale}.
+\newenvironment{parascale}[1][1]{% optional argument is scale, default 1.
+  \FPmax{\@mytempDetailsN}{#1}{0.5}% must be at least half normal.
+  \FPmul{\@mytempDetailsFontN}{\@mytempDetailsN}{\strip at pt\@SetFontSize}%
+  \FPround{\@mytempDetailsFontN}{\@mytempDetailsFontN}{2}%
+  \FPmul{\@mytempDetailsSkipN}{\@mytempDetailsN}{\strip at pt\baselineskip}%
+  \FPround{\@mytempDetailsSkipN}{\@mytempDetailsSkipN}{2}%
+  \FPsub{\@mytempSkipN}{\strip at pt\baselineskip}{\@mytempDetailsSkipN}%
+  \vspace{\@mytempSkipN pt}% puts first scaled line at normal baseline
+  \begingroup%
+  \fontsize{\@mytempDetailsFontN pt}{\@mytempDetailsSkipN pt}\selectfont%
+  \ignorespaces%
+}{%
+  \par\endgroup%
+  \vspace{-\nbs}%
+  \leavevmode\getParapos\par% detects if following line will be off-grid
+  \vspace{0.002\nbs plus 0pt minus 0.2pt}% math fudge factor, in case of roundoff
+}
+%
+\gdef\getParapos{%
+  \begingroup%
+    \savepos%
+    \protected at write\@auxout{}{%
+      \protect\@getParapos{\noexpand\number\lastypos}{\thepage}%
+    }%
+  \endgroup%
+}
+%
+\newlength\CurrentParapos
+\gdef\@getParapos#1#2{} % initialized to nothing, when reading aux at beginning
+\gdef\@RedefineParapos{ % called by `novel.cls' \AtBeginDocument
+  \gdef\@getParapos##1##2{% numerical position sp, page
+    \gsetlength\CurrentParapos{##1sp}% measured up from very bottom of page.
+    % Now change it, to measure downward from "line zero" of main text:
+    \gsetlength\CurrentParapos{\TotalYpos-\CurrentParapos}% calc package.
+    \FPdiv{\ParaHowdown}{\strip at pt\CurrentParapos}{\strip at pt\nbs}% package fp
+    \FPtrunc{\ParaLinesdown}{\ParaHowdown}{0}% integer number of lines down
+    \FPsub{\ParaResidual}{\ParaHowdown}{\ParaLinesdown}% portion of line
+    \FPdiv{\@PosTolerance}{\strip at pt\PosTolerance}{\strip at pt\nbs}%
+    \gdef\ParaComplain{yes}%
+    \FPifgt{\@PosTolerance}{\ParaResidual}%
+      \gdef\ParaComplain{no}% within tolerance
+    \fi%
+    \FPsub{\ParaDeficit}{\strip at pt\nbs}{\ParaResidual}%
+    \FPifgt{\@PosTolerance}{\ParaDeficit}%
+      \gdef\ParaComplain{no}%
+    \fi%
+    \FPsub{\ParaResidual}{1}{\ParaResidual}%
+    \FPifgt{\@PosTolerance}{\ParaResidual}%
+      \gdef\ParaComplain{no}% within tolerance
+    \fi%
+    \FPifgt{\@PosTolerance}{\ParaDeficit}%
+      \gdef\ParaComplain{no}%
+    \fi%
+    \FPround{\ParaResidual}{\ParaResidual}{3}%
+    \FPclip{\ParaResidual}{\ParaResidual}%
+    \ifthenelse{\equal{\ParaComplain}{yes}}{%
+      \ClassWarning{novel}{Line after parascale may be off-grid, page ##2. ^^J%
+       Appears to be \ParaResidual\string\nbs\space higher than expected.}%
+    }{}%
+  }
+} % end @RedefineParapos
+%%
+
+
 %% Environment toc (alternative table of contents):
 % optional argument: additional vspace (\nbs) after each \tocitem entry.
 % required: LR margin increase, to narrow the table (0pt = full textwidth).
 \newlength\@tocnumwid
 \newlength\@tocskip
-\newenvironment{toc}[2][0]%
-{%
+\newenvironment{toc}[2][0]{%
   \begin{adjustwidth}{#2}{#2}%
   \begingroup%
   \setlength\parindent{0pt}% local
@@ -335,7 +394,6 @@
     }%
   }%
   #2\,%
-  %%%%%\dotfill%
   \leaders\hbox to 0.3em{\hfil.\hfil}\hfill% Thanks to user daniel-j via GitHub.
   \,#3\par\vspace{\@tocskip}%
 }%
@@ -389,7 +447,7 @@
   }{}%
   \ifthenelse{\equal{#1}{}}{}{\FPround{\@tempLengthN}{\@tempLengthN}{#1}}%
   \@tempLengthN{#3}%
-}
+} %
 %% end \showlength
 
 %% \lnum for lining numbers.
@@ -396,36 +454,45 @@
 \gdef\lnum#1{{\addfontfeature{Numbers=Lining}#1}}
 %%
 
-%% Environment linegap.
-% Allows text to be placed (potentially) off-grid, with grid resuming after.
-\newif \if at WithinLinegap % true within linegap environment
-\newcounter{currentlinegap} % 0 when not within linegap, >0 otherwise.
-\ExplSyntaxOn % absorbs line returns here:
-\DeclareDocumentEnvironment {linegap} { m } {%
-  \FPifint{#1}\else
-    \ClassError{novel}{Non-integer~linegap~on~page~\thepage}%
-     {Only~integer~>=~1~allowed~for~linegap.}%
-  \fi
-  \FPiflt{#1}{1}
-    \ClassError{novel}{Insufficient~linegap~on~page~\thepage}%
-     {Only~integer~>=~1~allowed~for~linegap.}%
-  \fi
-  \par
-  \null
-  \vspace*{-\nbs}
-  \global\@WithinLinegaptrue
-  \begin{textblock*}{\textwidth}[0,0](0pt,0pt)
-  \setcounter{currentlinegap}{#1}
-  \strut\par
-  \vspace*{-\nbs}
-}{% close the environment:
-  \end{textblock*}
-  \global\@WithinLinegapfalse
-  \par
-  \vspace*{#1\nbs}
-  \setcounter{currentlinegap}{0}
-} %
-\ExplSyntaxOff
+
+%% For developer use: prints a number of yada yada lines.
+% Starred version adds extra smashed lines above and below.
+\newcount\yadacurrentcount
+\newcount\yadaendcount
+\DeclareDocumentCommand\novelyadayada { s O{1} }{%
+  \yadacurrentcount=1%
+  \yadaendcount=#2%
+  \ifthenelse{\equal{#2}{0}}{}{%
+    \IfBooleanTF{#1}{%
+      \def\@yadadblup{\charscale*[1,\normalparindent,2\nbs]{Dbl Raised yada}}%
+      \def\@yadaup{\charscale*[1,\normalparindent,\nbs]{Raised yada}}%
+      \def\@yadadown{%
+        \ifnum\yadacurrentcount=\yadaendcount%
+          \charscale*[1,\normalparindent,-\nbs]{Dropped yada}%
+        \fi%
+      }%
+      \def\@yadadbldown{%
+        \ifnum\yadacurrentcount=\yadaendcount%
+          \charscale*[1,\normalparindent,-2\nbs]{Dropped yada}%
+        \fi%
+      }%
+    }{%
+      \def\@yadadblup{}%
+      \def\@yadaup{}%
+      \def\@yadadown{}%
+      \def\@yadadbldown{}%
+    }%
+    \loop%
+      \noindent\@yadadblup\@yadaup\@yadadown\@yadadbldown%
+      \makebox[\normalparindent][l]{\the\yadacurrentcount.}%
+      Lotta yada.\par
+      \def\@yadaup{}%
+      \def\@yadadblup{}%
+      \advance\yadacurrentcount 1%
+    \ifnum\yadacurrentcount<\yadaendcount%
+    \repeat%
+  }%
+}
 %%
 
 
@@ -498,11 +565,10 @@
     \gsetlength\normalAringheight{\heightof{Å}}
   \newlength\normaldescender % depth of lowercase gjpqy
     \gsetlength\normaldescender{\depthof{gjpqy}}
-  \newlength\@NovelCaulk % fills gaps that would cause underfull vbox
-    \gsetlength{\@NovelCaulk}{0pt plus 0.999\nbs minus 1pt}
 }% end \@ActivateTextLengths
 %%
 
+
 %% More things that must wait:
 \gdef\@ActivateTextMacros{% called by `novel.cls' \AtBeginDocument
   % \forceindent and \backindent perform or remove indent, using \hspace{}.

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty	2018-04-29 23:01:28 UTC (rev 47492)
@@ -21,7 +21,7 @@
 %%
 \NeedsTeXFormat{LaTeX2e}
 \ProvidesFile{novel-pdfx.sty}%
-[2018/04/07 v1.50.4 LaTeX file (PDF/X support for novel class)]
+[2018/04/26 v1.52 LaTeX file (PDF/X support for novel class)]
 % This package supports, and is part of, class `novel'.
 % No support for anything but LuaLaTeX.
 
@@ -41,18 +41,18 @@
   \global\@pdfxISofftrue
 \fi
 %
-\AtBeginDocument{%
+\gdef\@AlertNoPDFX{% called by `novel.cls' AtBeginDocument
   \if at pdfxSEToff\else
     \ifdraftdoc
       \typeout{^^JClass `novel' Alert: No PDF/X in draft mode. ^^J%
-       Your document was processed with \string\SetPDFX\{off\}. ^^J}%
+       Your document was processed with \string\SetPDFX{off}. ^^J}%
     \fi
     \if at sandbox
       \typeout{^^JClass `novel' Alert: No PDF/X with sandbox option. ^^J%
-       Your document was processed with \string\SetPDFX\{off\}. ^^J}%
+       Your document was processed with \string\SetPDFX{off}. ^^J}%
     \fi
   \fi
-} %
+} % end @AlertNoPDFX
 %%
 
 

Modified: trunk/Master/texmf-dist/tex/lualatex/novel/novel.cls
===================================================================
--- trunk/Master/texmf-dist/tex/lualatex/novel/novel.cls	2018-04-29 23:01:08 UTC (rev 47491)
+++ trunk/Master/texmf-dist/tex/lualatex/novel/novel.cls	2018-04-29 23:01:28 UTC (rev 47492)
@@ -13,8 +13,9 @@
 %% 
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
 % Actually needs LuaLaTeX, at least version 0.95 from TeXLive 2016.
-\ProvidesClass{novel}[2018/04/07 v1.50.4 LaTeX document class]
+\ProvidesClass{novel}[2018/04/26 v1.52 LaTeX document class]
 %%
+%% Version 1.50.n (any n) incremental minor changes from 1.50.
 %% Version 1.50: Improved image handled, sandbox, scripts.
 %% Version 1.46.2: Now called "novel-old" version.
 %% Version 1.43: General cleanup of docs and code, for improved readbaility.
@@ -238,7 +239,7 @@
 %
 % New in version 1.50: sandbox option, for artwork and tables. Max 4 pages.
 \newif \if at sandbox
-\DeclareOption{sandbox}{\@sandbox}
+\DeclareOption{sandbox}{\@sandboxtrue}
 %
 %% Note that document size and normal font size are not class options.
 %% They are set by commands in the Preamble, and have default values.
@@ -251,6 +252,12 @@
   \global\@closecropfalse
 \fi
 %
+\if at testsuite
+  \gdef\@testintentional{Test suite intentionally generates this warning. ^^J}
+\else
+  \gdef\@testintentional{}
+\fi
+%
 \if at cropview
   \global\@cropmarksfalse
 \fi
@@ -292,7 +299,6 @@
 %% end class options
 
 
-
 \RequirePackage{noindentafter} % for unindented chapter and scene starts
 \RequirePackage{changepage} % provides block indents, etc. Do not use strict!
 \RequirePackage{magaz} % special treatment of first lines
@@ -459,13 +465,7 @@
   \RequirePackage{novel-CalculateLayout} % may load novel-ChangeLayout.sty
   \RequirePackage{novel-PostLayout} % calculates shademargins, cropmarks, etc.
   \RequirePackage{novel-pdfx}% also provides an \AtBeginDocument macro
-  \AtEndDocument{%
-    \if at coverart\else%
-      \if at sandbox\else%
-        \cleartoend% adds 1 or 2 blanks, for final verso blank
-      \fi%
-    \fi%
-  }
+  \@GetInitialYpos% in `novel-TextMacros.sty
 }%
 %% end AtEndPreamble
 
@@ -518,6 +518,12 @@
     }{}%
   } %
 \fi
+%
+\gdef\@needsandboxmsg{%
+  \ClassError{novel}{Need `sandbox' for picture, figure, table environments}%
+   {You cannot use picture, figure, or table environments in `novel' unless ^^J%
+    you use the `sandbox' document class option. See docs.}%
+}
 %% end messages.
 
 
@@ -524,17 +530,13 @@
 %% \AtBeginDocument finishes the setup
 %% ----------------------------------------------------------------------------
 %
-\gdef\@needsandboxmsg{%
-  \ClassError{novel}{Need `sandbox' for picture, figure, table environments}%
-   {You cannot use picture, figure, or table environments in `novel' unless ^^J%
-    you use the `sandbox' document class option. See docs.}%
-}
 \AtBeginDocument{ %
-  %% Mostly involve settings defaults:
+  \@RedefineParapos % in `novel-TextMacros.sty'
   \@ActivateTextLengths % in `novel-TextMacros.sty'
   \@ActivateDropCaps % in `novel-DropCaps.sty'
   \@ActivateChapterScene % in `novel-ChapterScene.sty'
   \@ActivateHeadFootStyles % in file `novel-HeadFootStyles.sty'
+  \@AlertNoPDFX % in file `novel-pdfx.sty'
   \@ActivatePDFInfo % in file `novel-pdfx.sty'
   \@ActivateTextMacros % in `novel-TextMacros.sty'
   \@ActivateFootnotes % in `novel-Footnotes.sty'
@@ -542,8 +544,10 @@
   \@DisableLayoutSettings % in file `novel-LayoutSettings.sty'
   \@DisableFileDataSettings % in file `novel-FileData.sty'
   \@DisableChapterSceneSettings % in file `novel-ChapterScene.sty'
+  \@RedefineBreakpos % in file `novel-ChapterScene.sty'
   \@DisableHeadFootSettings % in file `novel-HeadFootStyles.sty'
-  %% List of always-blocked packages (not exhaustive, since TeX has so many):
+  \@GatherGoodImages % in file `novel-Images.sty'.
+  % List of always-blocked packages (not exhaustive, since TeX has so many):
   \really at no{geometry}{its own layout commands.}{4}
   \really at no{pdfx}{built-in PDF/X capability.}{3.4}
   \really at no{xmpincl}{built-in PDF/X capability.}{3.4}
@@ -559,13 +563,13 @@
   \really at no{endnotes}{limited, built-in endnote methods.}{6.5}
   \really at no{acronym}{focus on paper books, not e-books.}{(top of file)}
   \really at no{embedfile}{incompatible print requirements.}{(top of file)}
-  %
-  \if at sandbox%
-    \RequirePackage{novel-Sandbox}%
-  \fi%
-  %
-  %% Potential problem packages, allowed in sandbox or with unblock:
-  \if at sandbox\else
+  \really at no{makeidx}{an incompatible layout method.}{1.2.5}
+  \really at no{gridset}{a command name conflict.}{4}
+  % Potential problem packages, allowed in sandbox or with unblock:
+  \if at sandbox
+    \RequirePackage{novel-Sandbox}
+  \else
+    \gdef\mplibcode{\@OnlySandbox{mplibcode}}
     % Related to floats:
     \sorry at no{floatflt}
     \sorry at no{floatfig}
@@ -621,21 +625,14 @@
     \sorry at no{scalerel}
     \sorry at no{pmgraph}
     \sorry at no{reflectgraphics}
-  \fi % end if sandbox.
-  %
-  %% Commands and environments, only allowed in sandbox:
-  \if at sandbox\else
-    \gdef\mplibcode{\@OnlySandbox{mplibcode}}
-  \fi
-  %
-  %% Alert packages, might cause minor layout problems, not enough to block:
+  \fi % end sandbox.
+  % Alert packages, might cause minor layout problems, not enough to block:
   \alert at nodisp{nth}
   \alert at nodisp{engord}
   \alert at nodisp{ulem}
   \alert at nodisp{soul}
   % end list of Alert packages.
-  %
-  %% Package `pagegrid' interacts with `shademargins' and `draft' options:
+  % Package `pagegrid' interacts with `shademargins' and `draft' options:
   \@ifpackageloaded{pagegrid}{ % that is, if permitted by sandbox or unblock
     \ifdraftdoc
       \if at shademargins
@@ -652,7 +649,30 @@
 %%
 
 
+%% AtEndDocument adds one or two blank pages, required by printers.
+% Also writes list of inspected, good images to aux, for later use:
+\AtEndDocument{%
+  \if at coverart\else%
+    \if at sandbox\else%
+      \immediate\write\@auxout{%
+        \string\xdef\string\@AllGoodImages{\@AllGoodImages}^^J%
+        \string\xdef\string\@UnknownImages{\@UnknownImages}^^J%
+      }%
+      \cleartoend% adds 1 or 2 blanks, for final verso blank
+    \fi%
+  \fi%
+}
+%%
 
+
+%% AfterEndDocument writes final message:
+\AfterEndDocument{
+  \@WarnUnknownImages % in `novel-Images.sty'.
+}
 %%
+
+
+
+%%
 %% End of file `novel.cls'
 



More information about the tex-live-commits mailing list