summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-10-19 21:28:46 +0000
committerKarl Berry <karl@freefriends.org>2017-10-19 21:28:46 +0000
commit65c87b552bf411a1a352dd55485976609b28911c (patch)
tree2aaa281526ee99e4550198fa55deddb342fc161e /Master/texmf-dist/tex/lualatex
parentb88e60ca81fae4479f3368d4741b6d314417aee8 (diff)
novel (19oct17)
git-svn-id: svn://tug.org/texlive/trunk@45558 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex')
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-CGATSTR001.clo2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty176
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty63
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-FOGRA39.clo2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty38
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty154
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty43
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-Images.sty15
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-JC200103.clo2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty104
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty33
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-glyphtounicode.tex4
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-microtype.cfg2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty6
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-xmppacket.sty2
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel.cls152
17 files changed, 347 insertions, 453 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-CGATSTR001.clo b/Master/texmf-dist/tex/lualatex/novel/novel-CGATSTR001.clo
index 4edbea6e07d..c82b29d78f9 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-CGATSTR001.clo
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-CGATSTR001.clo
@@ -1,4 +1,4 @@
-% Typically used in the USA. Novel file version 1.42
+% Typically used in the USA. Novel file version 1.43
% The values of the arguments are public industry standards.
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty b/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty
index 7ecb9641631..ed05e3f4118 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-CalculateLayout.sty
@@ -12,7 +12,7 @@
%%
%%
\ProvidesFile{novel-CalculateLayout.sty}%
-[2017/10/04 v1.42 LaTeX file (layout calculations)]
+[2017/10/19 v1.43 LaTeX file (layout calculations)]
%%
%%
@@ -20,7 +20,7 @@
%%
-\newlength\normalFontSize % becomes 1em in normal text.
+\newlength\normalFontSize % becomes 1em in normal text, also abbreviated as \nfs
\newlength\normalBaselineSkip % also abbreviated as \nbs
@@ -28,7 +28,7 @@
%% -----------------------------------------------------------------------------
%%
% Default Trim Size, if user does not set it. This is a popular size for
-% US softcover fiction, and is close to a popular British size.
+% USA softcover fiction, and is close to a popular British size.
\if@TrimSizeSet\else
\SetTrimSize{5.5in}{8.5in} % width, height
\fi
@@ -118,24 +118,30 @@
%% OLD, NEW, CURRENT, LIVE, TEXT MACRO DEFINITIONS
%% -----------------------------------------------------------------------------
-%%
-% The `novel' class has a \Rework feature. This allows the user to compile
-% a document using "old" settings" then re-compile using some "new" settings,
-% without changing the paragraph structure or pagination. Not for everyone!
-% The rework is done all at once, without requiring an additional pass.
-% Here, the old and new values are compared, and the effect predicted.
-% The reworked document has will have font size and baselineskip changed
-% to meet the new size requirements.
-%
-% "Old" values come from preset values, depending on class Trim Size option.
-% Or, the presets may be over-ridden using \Set---- commands.
+% The \Rework commands are special to `novel' class.
+% Situation: You compile the book with certain settings. Looks good.
+% But then you need to change the Trim Size and/or Margins, without affecting
+% paragraphs or pagination from what you had before.
+% Solution: Retain your existing settings for Trim Size and Margins.
+% Then, add \Rework commands, which instruct the layout engine to manipulate
+% font size (and, if necessary, baseline skip) so that paragraphs and
+% pagination remain as before. This is done dynamically, in a single pass.
+% How it works: Paragraph layout depends on ratio of text width to font size.
+% So, when text width changes, simply change font size in proportion.
+% Then, pagination simply depends on lines per page, unchanged.
+% But if the lines don't fit due any more, then both text width and font size
+% are further shrunk, to retain paragraphs and also allow enough line space.
+%
+% "Old" values are pre-configured values, depending on class Trim Size option.
+% However, the presets are over-ridden by user with using \Set---- commands.
% "New" values are initialized to "Old" or \Set---- as above.
-% Then, they can be over-ridden using \Rework---- commands.
-% "Current" values are the latest and greatest, as calculations progress.
-% They are initialized to "Old" values."
+% Then, they can be over-ridden by user with \Rework---- commands.
+% "Current" values are initialized to "Old" values. Then they change,
+% as calculations progress.
% Widths and Heights are lengths, stored by \setlength.
-% Expression ending in "Num" are pure numbers, suitable for FP calculations.
+% Expressions ending in "Num" are pure numbers, suitable for FP calculations.
% "Live" refers to the area available to text (including header/footer).
+% That is, the "live area" is the Trim Size, excluding the Margins.
%
% Find the Old and New Live Width and Height, and initialize
% Text Width and Height to Old Live. Initialize Font Size.
@@ -176,7 +182,6 @@
%% PRELIMINARY CALCULATION OF BASELINESKIP
%% -----------------------------------------------------------------------------
-%%
% Get values of \@gotHeader and \@gotFooter booleans:
\@reserveHFspace % defined in `novel-LayoutSettings.sty'.
% Adjusted LinesPerPage will include header, footer, and added separations:
@@ -216,7 +221,6 @@
%% FIT CurrentTextWidth TO NewLiveWidth
%% -----------------------------------------------------------------------------
-%%
\FPdiv{\my@TextRescaleNum}{\New@LiveWidthNum}{\Current@TextWidthNum}
\FPmul{\Current@FontSizeNum}{\Current@FontSizeNum}{\my@TextRescaleNum}
\setlength\Current@FontSize{\Current@FontSizeNum pt}
@@ -228,7 +232,6 @@
%% ADJUST CurrentBaselineSkip TO FIT NewLiveHeight
%% -----------------------------------------------------------------------------
-%%
% Test if New Text Height fits within New Live Height:
\FPifgt{\Current@TextHeightNum}{\New@LiveHeightNum} % does not fit, so fix it
\FPdiv{\my@NBSrescaleNum}{\New@LiveHeightNum}{\Current@TextHeightNum}
@@ -270,7 +273,6 @@
%% SET TEXTWIDTH, FONT SIZE, BASELINESKIP
%% -----------------------------------------------------------------------------
-%
\setlength\textwidth{\Current@TextWidthNum pt}
%
\setlength\normalFontSize{\Current@FontSizeNum pt}
@@ -347,7 +349,6 @@
%% BEGIN LAYOUT CALCULATIONS
%% -----------------------------------------------------------------------------
-%
\if@gotHeader
\setlength\headheight{\nbs}
\FPsub{\@headsepmul}{\@headjump}{1}
@@ -363,8 +364,6 @@
%
\setlength\paperwidth{\New@MediaWidth} % MediaWidth
\setlength\paperheight{\New@MediaHeight} % MediaHeight
-
-
%% The `closecrop' class option calculates layout, then removes most of the
%% margins. Draft mode only. Purpose is to create a file with just enough white
%% space around the text to be readable on a handheld device. Not an E-book!
@@ -372,9 +371,6 @@
\if@closecrop
\setlength\paperwidth{\textwidth+0.2in}
\fi
-%%
-
-
%
% Standard TeX \hoffset and \voffset is not relative to the MediaBox, but is
% relative to 1in from the top left corner of the MediaBox. Ouch.
@@ -408,14 +404,10 @@
\setlength\oddsidemargin{%
\New@InsideMargin+0.5\New@MediaWidth-0.5\New@TrimWidth-72.27pt}
\fi
-
-%%
+%
\if@closecrop
\setlength\oddsidemargin{-0.9in}
\fi
-%%
-
-
%
% \evensidemargin is at the left (outside edge) of verso pages.
% Calculation as above, but using \New@OutsideMargin
@@ -425,14 +417,10 @@
\setlength\evensidemargin{%
\New@OutsideMargin+0.5\New@MediaWidth-0.5\New@TrimWidth-72.27pt}
\fi
-
-%%
+%
\if@closecrop
\setlength\evensidemargin{-0.9in}
\fi
-%%
-
-
%
% \topmargin is measured from 1in below the top of the MediaBox, to the top of
% whatever comes first (header or textblock). May be negative.
@@ -445,8 +433,6 @@
\New@TopMargin+0.5\New@MediaHeight-0.5\New@TrimHeight-72.27pt}
\fi
%
-
-%%
\if@closecrop
\if@gotHeader
\setlength\topmargin{-1in}
@@ -455,8 +441,6 @@
\fi
\fi
%%
-
-
% Vertical position of the textblock is measured to the "top" of the first line
% of text. But that could be an X height, or an accented character height,
% an ascender, or something else, depending on the line's content.
@@ -466,15 +450,12 @@
% line start, it doesn't affect the height, since it is "smashed."
\setlength\topskip{\normalFontSize}
%
-% In `novel' class, footers are done in an unusal manner. The position of
+% In `novel' class, footers are done in an unusual manner. The position of
% the footer baseline is fixed, regardless of the desired jump between text
% and footer. Then, the content (if any) of the footer is relatively positioned
% using \smash and \raisebox.
\setlength\footskip{\nbs}
%
-
-
-%%
\if@closecrop
\if@gotFooter
\if@gotHeader
@@ -488,12 +469,21 @@
\setlength\paperheight{\textheight+\headsep+\headheight+0.1in}
\fi
\fi
-%%
-
-
+%
%% End layout calculations.
+%% Sanity check:
+\ifthenelse{%
+ \dimtest{\New@TrimWidth}{>}{\New@MediaWidth} %
+ \OR \dimtest{\New@TrimHeight}{>}{\New@MediaHeight}%
+}{%
+ \ClassError{novel}{Media Size too small for TrimSize}%
+ {You wrote \string\SetMediaSize\space with length(s) too small^^J%
+ for the default Trim Size or your values in \string\SetTrimSize.}%
+}{}
+%% end sanity check
+
% When Media Size exceeds Trim Size, this sets the position:
@@ -539,15 +529,14 @@
\setlength\adj@NewLiveHeight{\New@LiveHeight+0.3\normalFontSize}
%
\gdef\@getPageXY{
- \check@IsVerso % defined in novel-HeadFootStyles.sty
- \if@isVerso
- \setlength\Trim@Lx{\evensidemargin-\New@OutsideMargin+72.27pt}
- \setlength\Trim@Rx{\Trim@Lx+\New@TrimWidth}
- \setlength\Live@Lx{\evensidemargin+72.27pt}
- \else
+ \ifodd\c@page
\setlength\Trim@Lx{\oddsidemargin-\New@InsideMargin+72.27pt}
\setlength\Trim@Rx{\Trim@Lx+\New@TrimWidth}
\setlength\Live@Lx{\oddsidemargin+72.27pt}
+ \else
+ \setlength\Trim@Lx{\evensidemargin-\New@OutsideMargin+72.27pt}
+ \setlength\Trim@Rx{\Trim@Lx+\New@TrimWidth}
+ \setlength\Live@Lx{\evensidemargin+72.27pt}
\fi
\if@offcenterTrim
\setlength\Trim@By{\New@MediaHeight-\New@TrimHeight}
@@ -612,48 +601,47 @@
% in Preamble using \SetCropmarkGap{length}.
\if@cropmarks
\if@offcenterTrim
- \check@IsVerso
- \if@isVerso
- % H bottom left:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
- % V bottom left:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
+ \ifodd\c@page
+ % H bottom right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
+ % V bottom right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\Trim@Rx}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
\else
- % H bottom right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
- % V bottom right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\Trim@Rx}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
+ % H bottom left:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
+ % V bottom left:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
\fi
\else
- % H top left:
- \AddToShipoutPictureBG{\@getPageXY%
- \AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@Ty]{0.5in-\@mygap}{0.5pt}}}
- % H bottom left:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
- % H top right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@Ty]{0.5in-\@mygap}{0.5pt}}}
- % H bottom right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
- % V top left:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@Ty+\@mygap]{0.5pt}{0.5in-\@mygap}}}
- % V bottom left:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
- % V top right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\Trim@Rx}\rule[\Trim@Ty+\@mygap]{0.5pt}{0.5in-\@mygap}}}
- % V bottom right:
- \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
- \hspace{\Trim@Rx}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
+ % H top left:
+ \AddToShipoutPictureBG{\@getPageXY%
+ \AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@Ty]{0.5in-\@mygap}{0.5pt}}}
+ % H bottom left:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5in}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
+ % H top right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@Ty]{0.5in-\@mygap}{0.5pt}}}
+ % H bottom right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Rx+\@mygap}\rule[\Trim@By-0.5pt]{0.5in-\@mygap}{0.5pt}}}
+ % V top left:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@Ty+\@mygap]{0.5pt}{0.5in-\@mygap}}}
+ % V bottom left:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx-0.5pt}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
+ % V top right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\Trim@Rx}\rule[\Trim@Ty+\@mygap]{0.5pt}{0.5in-\@mygap}}}
+ % V bottom right:
+ \AddToShipoutPictureBG{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\Trim@Rx}\rule[\Trim@By-0.5in]{0.5pt}{0.5in-\@mygap}}}
\fi
\fi
%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty b/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty
index 9a4b197f2aa..4f5531b7b49 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-ChapterScene.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-ChapterScene.sty}%
-[2017/10/04 v1.42 LaTeX file (chapter and scene macros)]
+[2017/10/19 v1.43 LaTeX file (chapter and scene macros)]
%%
@@ -22,7 +22,7 @@
\gdef\maketitle{%
\ClassError{novel}{\string\maketitle does not exist in this class}%
{Sorry, but there is no \string\maketitle command in `novel' class.^^J%
- You must make your own title pages!^^J}%
+ You must make your own title pages! See documentation.^^J}%
}
%
@@ -37,7 +37,7 @@
% \scenestars centers three widely-spaced asterisks.
% Default behavior is \noindent for following paragraph.
% Use \SetScenebreakIndent{true or false} in Preamble to change this globally.
-% Either way, the local behavior can be changed using \indent or \noindent.
+% Either way, local behavior can be changed using \forceindent or \backindent.
\newcommand\scenebreak{\null}
%
\newcommand\sceneline{%
@@ -69,10 +69,18 @@
%%
+%% Chapter number count. New in version 1.44. See documentation.
+%% Do NOT use for "chapter-like" sections, only numbered chapters.
+\newcounter{novelcn}
+\setcounter{novelcn}{1}
+%%
+
%% ChapterStart environment.
% The most useful way to start a new chapter. Occupies a fixed amount of
% vertical space. Also self-adjust when used with dropfolio. Automatically
% calls \thispagestyle if set for all chapter displays.
+% This environment is not restricted to chapters. It is also used for chapter-like
+% sections in front matter or main matter, as long as they are styled like a chapter.
\newif \if@addCTline \@addCTlinetrue
\newcounter{@linequarter}
\newif \if@csalignok \@csalignokfalse
@@ -129,48 +137,6 @@
\ExplSyntaxOff % end ChapterStart environment
-
-%%%%%
-\newenvironment{OldChapterStart}[1][\@setchapterstartheight] % default 10
-{%
- \setlength\@oldparindent{\parindent}%
- \global\@oldparindent=\@oldparindent%
- \setlength\parindent{0pt}%
- \global\parindent=\parindent%
- \FPsub{\@fixlines}{#1}{2}%
- \FPsub{\@fixlines}{\@fixlines}{0.001}% fudge to avoid rounding problems
- \if@thispagestyleset\else\thispagestyle{\@setchapterstart}\fi%
- \ResetFootnoteSymbol% resets symbolic markers, but not numerical markers
- \null%
- \setcounter{@linequarter}{0}%
- \begin{textblock*}{\textwidth}[0,0](0pt,0pt)%
-}{% close the environment:
- \ifthenelse{%
- \equal{\value{@linequarter}}{1} \OR \equal{\value{@linequarter}}{5}%
- \OR \equal{\value{@linequarter}}{9} \OR \equal{\value{@linequarter}}{13}%
- }{\vspace{0.75\nbs}}{}%
- \ifthenelse{%
- \equal{\value{@linequarter}}{2} \OR \equal{\value{@linequarter}}{6}%
- \OR \equal{\value{@linequarter}}{10} \OR \equal{\value{@linequarter}}{14}%
- }{\vspace{0.5\nbs}}{}%
- \ifthenelse{%
- \equal{\value{@linequarter}}{3} \OR \equal{\value{@linequarter}}{7}%
- \OR \equal{\value{@linequarter}}{11} \OR \equal{\value{@linequarter}}{15}%
- }{\vspace{0.25\nbs}}{}%
- \end{textblock*}%
- \vspace{\@fixlines\nbs}%
- \if@addCTline\null\fi%
- \setlength\parindent{\@oldparindent}%
- \global\parindent=\parindent%
- \nov@AfterGroup\NoIndentAfterThis% etextools and noindentafter
-}
-%%%%%
-
-
-
-
-
-
%%
\LetLtxMacro\ChapterDisplay\ChapterStart\relax % deprecated
\LetLtxMacro\endChapterDisplay\endChapterStart\relax % deprecated
@@ -211,21 +177,22 @@
\newcommand\ChapterDeco[2][c1]{% optional alignment and scale, either order
\StrDel{#1}{ }[\temp@cds]% may use space separator
\StrDel{\temp@cds}{,}[\temp@cd]% may use comma separator
- \IfSubStr{#1}{l}{%
+ \IfSubStr{#1}{l}{% left align
\let\@csalign\relax\@csalignoktrue%
\StrDel{\temp@cd}{l}[\temp@cd]%
}{}%
- \IfSubStr{#1}{c}{%
+ \IfSubStr{#1}{c}{% centered
\let\@csalign\centering\relax\@csalignoktrue%
\StrDel{\temp@cd}{c}[\temp@cd]%
}{}%
- \IfSubStr{#1}{r}{%
+ \IfSubStr{#1}{r}{% right align
\let\@csalign\hfill\relax\@csalignoktrue%
\StrDel{\temp@cd}{r}[\temp@cd]%
}{}%
\if@csalignok\else%
\let\@csalign\centering\relax\@csalignoktrue%
\fi%
+ % Now for scaling, with adjusted vertical position:
\IfEndWith{\temp@cd}{.}{\StrSubstitute{\temp@cd}{.}{.0}[\temp@cd]}{}%
\IfBeginWith{\temp@cd}{.}{\StrSubstitute{\temp@cd}{.}{1.}[\temp@cd]}{}%
\IfDecimal{\temp@cd}{\def\@thisScale{\temp@cd}}{\def\@thisScale{1}}%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-FOGRA39.clo b/Master/texmf-dist/tex/lualatex/novel/novel-FOGRA39.clo
index 8da9238f56f..53297bce2f7 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-FOGRA39.clo
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-FOGRA39.clo
@@ -1,4 +1,4 @@
-% Typically used in Europe. Novel file version 1.42
+% Typically used in Europe. Novel file version 1.43
% The values of the arguments are public industry standards.
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty b/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
index 1d04135a546..c64173d5433 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-FileData.sty
@@ -13,47 +13,40 @@
%%
%%
\ProvidesFile{novel-FileData.sty}%
-[2017/10/04 v1.42 LaTeX file (File Data settings)]
+[2017/10/19 v1.43 LaTeX file (File Data settings)]
%%
-%% FILE DATA (see class documentation for technical meaning of this term).
+%% FILE DATA (PDF Metadata)
%% -----------------------------------------------------------------------------
%%
% \title{} or \SetTitle{}
-% Must be used immediately after \documentclass[options]{novel}.
-% Copied to metadata at end of preamble, unless not set or over-ridden.
-% May be over-ridden in metadata using \metatitle{}.
-% May be re-set in body, but not in metadata.
-% Provides \thetitle anywhere.
+% Copied to File Data at end of Preamble, unless not set.
+% Provides \theTitle anywhere.
% If not set, PDF cannot conform to PDF/X.
\gdef\SetTitle#1{\gdef\@title{#1}} % for stylistic consistency
\gdef\title#1{\gdef\@title{#1}}
-\gdef\thetitle{\@title}
+\gdef\thetitle{\@title} % for convenience
\gdef\theTitle{\@title}
-\title{}
+\SetTitle{}
%
% \author{} or \SetAuthor{}
-% Copied to metadata at end of preamble, unless not set or over-ridden.
-% May be over-ridden in metadata using \metaauthor{}.
-% May be re-set in body, but not in metadata.
-% Provides \theauthor anywhere.
+% Copied to File Data at end of preamble, unless not set.
+% Provides \theAuthor anywhere.
\gdef\SetAuthor#1{\gdef\@author{#1}} % for stylistic consistency
\gdef\author#1{\gdef\@author{#1}}
-\gdef\theauthor{\@author}
+\gdef\theauthor{\@author} % for convenience
\gdef\theAuthor{\@author}
-\author{}
+\SetAuthor{}
%
% \subtitle{} or \SetSubtitle{} (if any)
-% Not copied to metadata by itself, as there is no such metadata entry.
-% May appear in metadata along with title, using \metatitle{}. See below.
-% May be re-set in body.
-% Provides \thesubtitle anywhere.
+% Not copied to File Data by itself, as there is no such metadata entry.
+% Provides \theSubtitle anywhere.
\gdef\SetSubtitle#1{\gdef\@subtitle{#1}} % for stylistic consistency
\gdef\subtitle#1{\gdef\@subtitle{#1}}
-\gdef\thesubtitle{\@subtitle}
+\gdef\thesubtitle{\@subtitle} % compatibility
\gdef\theSubtitle{\@subtitle}
-\subtitle{}
+\SetSubtitle{}
%
% \SetApplication{} (rarely used)
% Also known as CreatorTool.
@@ -72,6 +65,8 @@
%
% Although some other data fields could have been added,
% they do not pertain to fiction, especially if your book is print-on-demand.
+% For example, subject, keywords and description are not read from PDF metadata,
+% you enter them in a form, when you obtain the ISBN.
% No need to set copyright in metadata, since your book is only for use by
% the print service, and is not being distributed as a PDF e-book.
% Your copyright notice is on the printed page, where it should be.
@@ -165,7 +160,6 @@
\fi
} % end \@setpdfx
%
-
%%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty b/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty
index 0faee6bd09f..c715ed5bc61 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-FontDefaults.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-FontDefaults.sty}%
-[2017/10/04 v1.42 LaTeX file (default fonts)]
+[2017/10/19 v1.43 LaTeX file (default fonts)]
%%
@@ -21,23 +21,52 @@
%% This file is loaded \AtEndPreamble.
%%
+%%%%%
%% Most TeX installations will use Latin Modern or Computer Modern
%% as default fonts. These are unsuitable for commercial fiction.
%% But `novel' class uses Libertinus as defaults.
%% Change them using \SetParentFont and other fontspec commands, in Preamble.
% Libertinus Serif has Regular, Italic, Bold, Bold Italic.
-% Here, Semibold over-rides Bold.
+% But here, Semibold over-rides Bold.
%
%% Now to activate the font definitions:
-%
-\defaultfontfeatures{} % reset
-%
-% The mono font:
-\defaultfontfeatures[\ttfamily]{% monofont has no kerning or common ligatures
- SmallCapsFeatures={Renderer=Basic},Ligatures=TeX,%
+%% The parent font, ancestor of the main font, and some others:
+\ifthenelse{\equal{\rmdefault}{lmr}}{%
+ % At this point, if \rmdefault is lmr, it means that the user did not choose
+ % a different font. Then, Libertinus Serif or Latin Modern Roman
+ % will be automatically set as \rmdefault:
+ \IfFontExistsTF{Libertinus Serif}{ % preferred default
+ \SetParentFont[%
+ BoldFont=libertinusserif-semibold.otf,%
+ BoldItalicFont=libertinusserif-semibolditalic.otf,%
+ ]{Libertinus Serif}
+ }{ % backup default:
+ \SetParentFont[%
+ SmallCapsFont={Latin Modern Roman Caps}%
+ ]{Latin Modern Roman}% only because it comes with LaTeX
+ \let\scshape\oldscshape % or small caps won't work
+ \let\smcp\oldscshape % ditto
+ }%
+}{% However, if \rmdefault is not lmr, it means that the user chose the font.
+ % If the choice was made via \SetParentFont, no problem. But if done by
+ % incorrect method such as \setmainfont, \renewcommand\rmdefault,
+ % or \usepackage{fontname}, then an error is thrown (warning prior to v 1.44):
+ \if@parentfontset\else
+ \ClassError{novel}{Wrong command used to set main font}%
+ {You attempted to define the main document font using a command such as^^J%
+ \string\renewcommand\string\rmdefault\space or \string\usepackage^^J%
+ or \string\setmainfont. These are incorrect in `novel' class.^^J%
+ Use \string\SetParentFont\space instead. See `novel' documentation.^^J}%
+ \fi
}%
-\ifthenelse{\equal{\ttdefault}{lmtt}\OR\equal{\ttdefault}{cmtt}}{% over-ride:
+% Now we are ready to set the main font:
+\setmainfont[\parentfontfeatures]{\parentfontname}
+\let\mainfont\rmfamily\relax % compatibility
+%%
+
+% The mono font:
+\ifthenelse{\equal{\ttdefault}{lmtt}}{% over-ride:
\IfFontExistsTF{Libertinus Mono}{
\setmonofont[%
ItalicFont={},% Doesn't have these.
@@ -45,104 +74,44 @@
BoldItalicFont={},%
]{Libertinus Mono}
}{
- \IfFontExistsTF{Linux Libertine Mono O}{
- \setmonofont{Linux Libertine Mono O}
- }{
- \setmonofont{Latin Modern Mono}% Eeek! Only because you have it!
- }
+ \setmonofont{Latin Modern Mono}% Eeek! Only because you have it!
}
}{} % User \setmonofont, so leave alone.
%%
-\defaultfontfeatures{} % reset
-% Main and sans fonts: kerning, ligatures, and OldStyle numbers if available:
-\defaultfontfeatures[\rmfamily,\sffamily]{%
- SmallCapsFeatures={Renderer=Basic},Kerning=On,Numbers=OldStyle,%
- Ligatures=Common,Ligatures=TeX,%
-}%
% The sans font:
-\ifthenelse{\equal{\sfdefault}{lmss}\OR\equal{\sfdefault}{cmss}}{ % override:
+\ifthenelse{\equal{\sfdefault}{lmss}}{ % override:
\IfFontExistsTF{Libertinus Sans}{
\setsansfont{Libertinus Sans}
}{
- \IfFontExistsTF{Linux Biolinum O}{
- \setsansfont{Linux Biolinum O}
- }{
- \setsansfont{Latin Modern Sans}% Eeek! Only because you have it!
- }
+ \setsansfont{Latin Modern Sans}% Eeek! Only because you have it!
}
}{} % User \setsansfont, so leave alone.
%%
-% At this point, if \rmdefault is something other than lmr, it means
-% that the user attempted to set the main font using ordinary TeX commands,
-% or via fontspec's \setmainfont. But those are ineffective in this class,
-% because without \SetParentFont the prior command will be over-written.
-\ifthenelse{\equal{\rmdefault}{\@noveloldrmdefault}}{}{%
- \ClassWarning{novel}{^^JBIG BAD WARNING:^^J%
- You attempted to define the main document font using a command such as^^J%
- \string\renewcommand\string\rmdefault\space or \string\usepackage{font}^^J%
- or \string\setmainfont. These are incorrect in `novel' class.^^J%
- Use \string\SetParentFont\space instead. See `novel' documentation.^^J}%
-}%
-% The parentfont: (from v.1.1. Known as masterfont in prior versions)
-\if@parentfontset\else
- \IfFontExistsTF{Libertinus Serif}{
- \SetParentFont[%
- BoldFont=libertinusserif-semibold.otf,%
- BoldItalicFont=libertinusserif-semibolditalic.otf,%
- ]{Libertinus Serif}
- }{
- \IfFontExistsTF{Linux Libertine O}{
- \SetParentFont[%
- BoldFont=LinLibertine_RZ.otf,%
- BoldItalicFont=LinLibertine_RZI.otf,%
- ]{Linux Libertine O}
- }{
- \SetParentFont[%
- SmallCapsFont={Latin Modern Roman Caps}%
- ]{Latin Modern Roman}% Eeek! Only because you have it!
- \let\scshape\oldscshape % or small caps won't work
- \let\smcp\oldscshape % ditto
- }
- }
-\fi
-% Now we are ready to set the main font:
-\setmainfont[\@parentfontfeatures]{\@parentfontname}
-\let\textfont\rmfamily\relax % compatibility
-\let\mainfont\rmfamily\relax % compatibility
-%
+
%%
-\defaultfontfeatures{} % reset
% New in version 1.38, \straightquote and \straightdblquote:
\gdef\straightquote{{\addfontfeature{Ligatures=ResetAll}'}}
\gdef\straightdblquote{{\addfontfeature{Ligatures=ResetAll}"}}
-%
-% The novel-specific display fonts use these defaults:
-\defaultfontfeatures{%
- SmallCapsFeatures={Renderer=Basic},Kerning=On,%
- Ligatures=TeX,Ligatures=CommonOff,Numbers=Lining,%
-}%
+%%
+
%% The novel-specific fonts:
\if@chapterfontset\else
- \SetChapterFont[\@parentfontfeatures,Scale=1.6]{\@parentfontname}
+ \SetChapterFont[\parentfontfeatures,Scale=1.6]{\parentfontname}
\fi
\newfontfamily\chapterfont[\@chapterfontfeatures]{\@chapterfontname}
%%
\if@subchfontset\else
- \SetSubchFont[\@parentfontfeatures,Scale=1.2]{\@parentfontname}
+ \SetSubchFont[\parentfontfeatures,Scale=1.2]{\parentfontname}
\fi
\newfontfamily\subchfont[\@subchfontfeatures]{\@subchfontname}
%%
\newif \if@headfontdefault
\if@headfontset\else
- \SetHeadFont[Letters=SmallCaps,\@parentfontfeatures,Scale=0.92]{\@parentfontname}
+ \SetHeadFont[Letters=SmallCaps,\parentfontfeatures,Scale=0.92]{\parentfontname}
\global\@headfontdefaulttrue
\fi
\newfontfamily\headfont[\@headfontfeatures]{\@headfontname}
%%
-\defaultfontfeatures{} % reset
-\defaultfontfeatures{% for decofont
- SmallCapsFeatures={Renderer=Basic},Kerning=On,Ligatures=TeX,%
-}%
%% The decofont must be NovelDeco.otf or a user modification of that font:
\if@decofontset\else
\IfFontExistsTF{NovelDeco.otf}{
@@ -196,17 +165,18 @@
%
\fi% end \if@gotdeco
%
-%
-%%
-% Any other fonts will use these defaults:
-\defaultfontfeatures{} % reset
-% The novel-specific display fonts use these defaults:
-\defaultfontfeatures{%
- SmallCapsFeatures={Renderer=Basic},%
- Ligatures=TeX,
- Kerning=On,%
+% Math font is not needed, because `novel' does not typeset math.
+% If you have the Libertinus fonts installed, might as will specify for math.
+% Then Latin Modern Math if installed.
+% If not, NovelDeco.otf "fakes" math capability, just to fool the fontloader:
+\IfFontExistsTF{Libertinus Math}{
+ \setmathfont[BoldFont={libertinusmath-regular.otf}]{libertinusmath-regular.otf}
+}{
+ \IfFontExistsTF{Latin Modern Math}{}{% already set as default by unicode-math.
+ }{
+ \setmathfont[BoldFont={NovelDeco.otf}]{NovelDeco.otf}
+ }
}%
-%
%%
@@ -219,13 +189,15 @@
\gdef\@mymicrotypeset{\@mymicrotypesetup}
}{ % default to novel's config file
\gdef\@mymicrotypeset{%
- config=novel-microtype,\@mymicrotypesetup}
+ config=novel-microtype,final,\@mymicrotypesetup}
}
\else % user did not write \microtypesetup{} in Preamble
\gdef\@mymicrotypeset{%
- config=novel-microtype,stretch=20,shrink=20,final}
+ config=novel-microtype,final,stretch=20,shrink=20}
+\fi
+\if@mtoff\else
+ \RequirePackage[\@mymicrotypeset]{microtype}
\fi
-\RequirePackage[\@mymicrotypeset,final,tracking]{microtype}
%
%%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty b/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty
index 15babf9adb7..819a3916f90 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-Footnotes.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-Footnotes.sty}%
-[2017/10/04 v1.42 LaTeX file (commands for footnotes and endnotes)]
+[2017/10/19 v1.43 LaTeX file (commands for footnotes and endnotes)]
%%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty b/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
index 12b692a3ca1..81da425c8c5 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-HeadFootStyles.sty}%
-[2017/10/04 v1.42 LaTeX file (header and footer layouts and styles)]
+[2017/10/19 v1.43 LaTeX file (header and footer layouts and styles)]
%%
@@ -27,27 +27,14 @@
%% Note that `style' sometimes means `layout`.
-% @isVerso true = even page, false = odd page. Only accurate during shipout.
-% Not to be used in commands that are inserted in main text!
-\newif \if@isVerso \@isVersofalse
-\def\check@IsVerso{%
- \def\my@PageNum{\arabic{page}}%
- \FPdiv{\my@HalfPageNum}{\my@PageNum}{2}%
- \FPifint{\my@HalfPageNum}%
- \global\@isVersotrue%
- \else%
- \global\@isVersofalse%
- \fi%
-}
-%
-\newtoggle{@inheadfoot} % true in header or footer
-%%
-
%% INITIALIZE FANCYHDR
%% -----------------------------------------------------------------------------
%% Before now now, space was reserved for header/footer.
% Start by loading package `fancyhdr' and blanking everything:
+%
+\newtoggle{@inheadfoot} % true in header or footer
+%
\RequirePackage{fancyhdr}
\renewcommand\headrulewidth{0pt}
\renewcommand\footrulewidth{0pt}
@@ -292,16 +279,15 @@
\dimexpr\New@BottomMargin+0.5\New@MediaHeight-0.5\New@TrimHeight}%
\global\temp@pgnumraise=\temp@pgnumraise%
\fi%
- \check@IsVerso%
- \if@isVerso%
- \AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx+\New@OutsideMargin+0.5\textwidth-0.5\temp@pgnumwidth}\raisebox{%
- \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
- \else%
+ \ifodd\c@page%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@InsideMargin-0.5\temp@pgnumwidth}%
\charscale[1,0.5\textwidth,\temp@pgnumraise]{%
{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
+ \else%
+ \AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx+\New@OutsideMargin+0.5\textwidth-0.5\temp@pgnumwidth}\raisebox{%
+ \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\fi%
} % end \@dropfolioinside
%
@@ -320,16 +306,15 @@
\setlength\temp@pgnumraise{%
\New@BottomMargin-\nbs+0.5\New@MediaHeight-0.5\New@TrimHeight}%
\fi%
- \check@IsVerso%
- \if@isVerso%
- \AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
- \hspace{\dimexpr\Trim@Lx+\New@OutsideMargin-0.5\temp@pgnumwidth}\raisebox{%
- \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
- \else%
+ \ifodd\c@page%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@InsideMargin-0.5\temp@pgnumwidth}%
\charscale[1,0.5\textwidth,\temp@pgnumraise]{%
{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
+ \else%
+ \AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
+ \hspace{\dimexpr\Trim@Lx+\New@OutsideMargin-0.5\temp@pgnumwidth}\raisebox{%
+ \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\fi%
} % end \@dropfoliobeneath
%%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty b/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
index e5fb439ca4f..b6bad81642c 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-Images.sty}%
-[2017/10/04 v1.42 LaTeX file (image placement)]
+[2017/10/19 v1.43 LaTeX file (image placement)]
%%
@@ -252,19 +252,6 @@
-% Returns 1 for monochrome, 8 for grayscale (or rgb). EXPERIMENTAL.
-% Not documented. Not used as part of any other commands.
-\gdef\imagecolordepth{%
- \ifthenelse{\equal{\imagefilename}{unknown}}{unknown}{%
- \directlua{%
- img1=img.scan{filename="\imagefilename"}%
- tex.print(tostring(img1.colordepth))%
- }%
- }%
-}
-%
-
-
%%
%% End of file `novel-Images.sty'.
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-JC200103.clo b/Master/texmf-dist/tex/lualatex/novel/novel-JC200103.clo
index a3b7974ea56..9c0492557c5 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-JC200103.clo
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-JC200103.clo
@@ -1,4 +1,4 @@
-% Typically used in Japan. Novel file version 1.42
+% Typically used in Japan. Novel file version 1.43
% The values of the arguments are public industry standards.
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty b/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
index debfd50c6db..929fd9718de 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
@@ -13,11 +13,11 @@
%%
%%
\ProvidesFile{novel-LayoutSettings.sty}%
-[2017/10/04 v1.42 LaTeX file (layout settings)]
+[2017/10/19 v1.43 LaTeX file (layout settings)]
%%
-%% Note that nearly all layout settings are preconfigured based on Trim Size.
+%% Note that nearly all layout settings are pre-configured based on Trim Size.
%% In general, these user commands may be used to over-ride the presets.
\newlength\Old@TrimWidth % finished width of printed book
@@ -65,8 +65,6 @@
% Note: This class does not ask you to set the width/height of the textblock.
% Instead, these values are automatically calculated from other dimensions.
%
-
-%
% \SetTrimSize{}{} width and height of printed book.
\newcommand\SetTrimSize[2]{%
\global\@TrimSizeSettrue
@@ -346,6 +344,22 @@
%%
+%% New in version 1.44: flexible images (without built-in resolution dpi)
+\gdef\@novimgres{300} % default (can only be set once)
+\gdef\@novereserror{%
+ \ClassError{novel}{\string\SetFlexResolution\space bad value}%
+ {Resolution must be integer from 200 to 9600. Default 300.}%
+}
+\newcommand\SetFlexResolution[1]{
+ \IfInteger{#1}{ %
+ \FPiflt{#1}{200}\@novereserror\else\fi %
+ \FPifgt{#1}{9600}\@novereserror\else\fi %
+ \gdef\@novimgres{#1} %
+ }{\@novreserror}
+}
+%
+
+
%% Markers (superscript, subscripts):
\newtoggle{@usesymbolmark} % true when footnote markers are symbolic
\newtoggle{@realmarker} % true when OT features sups, sinf, subs requested
@@ -495,57 +509,43 @@
%% --------------------------------------------------------------------------
%% Prior to v. 1.1, parentfont was known as masterfont. Backwards compatible.
%
-\providecommand\rmdefault{lmr} % should be lmr anyway, at this point.
-\LetLtxMacro\@noveloldrmdefault\rmdefault\relax % stored for later comparison.
+% These are the LaTeX defaults, which should already be built-in by now.
+% But just in case they are undefined, here they are set to LaTeX defaults:
+\providecommand\rmdefault{lmr}
+\providecommand\sfdefault{lmss}
+\providecommand\ttdefault{lmtt}
% The `no-math' option prevents fontspec from tracking certain font changes.
% This is probably necessary, since novel does some of its own font tracking:
\RequirePackage[no-math]{fontspec} % For LuaLaTeX. NOT package `fontenc'.
-% You shouldn't be doing math! You can use \setmathfont, if you wish.
-% If you must load a math font package, it should be done using
-% \RequirePackage before (yes, before) calling the document class.
-\RequirePackage{unicode-math}
-%
-% Math font no kern:
+\defaultfontfeatures{} % reset
\defaultfontfeatures{SmallCapsFeatures={Renderer=Basic},Ligatures=TeX,}
+% Main and sans fonts: kerning, ligatures, and OldStyle numbers if available:
+\defaultfontfeatures[\rmfamily,\sffamily]{Kerning=On,Numbers=OldStyle,Ligatures=Common}
+% Package `unicode-math' uses Latin Modern Math as default math font:
+\RequirePackage{unicode-math}
%
-\IfFontExistsTF{Libertinus Math}
-{\setmathfont{Libertinus Math}}
-{\IfFontExistsTF{Asana Math}
- {\setmathfont{Asana Math}}
- {\IfFontExistsTF{STIX Math}
- {\setmathfont{STIX Math}}
- {\setmathfont{Latin Modern Math}} % last choice
- }
-}% end \IfFontExistsTF nest.
-% For user-created font commands:
-\defaultfontfeatures{SmallCapsFeatures={Renderer=Basic},Kerning=On,Ligatures=TeX,}%
-%%
%% This could have been easier, but fontspec allows mandatory and optional
% arguments to appear in either order. We wish to store the fontnames
% and arguments, but need Expl syntax to tell which is which.
-\ExplSyntaxOn
%% Store settings for the parent font:
% \AtEndPreamble, the parent font becomes becomes
% the default ancestor of all novel-defined fonts, except the deco font.
\newif \if@parentfontset
-\gdef\@parentfontfeatures{}
-\gdef\@parentfontname{}
-\gdef\parentfontfeatures{} % for convenience
-\gdef\parentfontname{} % for convenience
+\gdef\parentfontfeatures{}
+\gdef\parentfontname{}
\DeclareDocumentCommand \SetParentFont { O{} m O{} } {% from version 1.1.
\novel@checkfeatures{#1,#3}
- \gdef\@parentfontfeatures{#1,#3}
- \gdef\@parentfontname{#2}
- \gdef\parentfontfeatures{#1,#3} % for convenience
- \gdef\parentfontname{#2} % for convenience
+ \gdef\parentfontfeatures{#1,#3}
+ \gdef\parentfontname{#2}
\global\@parentfontsettrue
}%
\DeclareDocumentCommand \SetMasterFont { O{} m O{} } {% DEPRECATED
\novel@checkfeatures{#1,#3}
- \gdef\@parentfontfeatures{#1,#3}
- \gdef\@parentfontname{#2}
+ \gdef\parentfontfeatures{#1,#3}
+ \gdef\parentfontname{#2}
\global\@parentfontsettrue
}%
+
%% Store settings for the chapterfont:
% The chapter font is used by the \ChapterTitle{} command.
\newif \if@chapterfontset
@@ -553,7 +553,7 @@
\gdef\@chapterfontname{}
\DeclareDocumentCommand \SetChapterFont { O{} m O{} } {%
\novel@checkfeatures{#1,#3}
- \gdef\@chapterfontfeatures{#1,#3}
+ \gdef\@chapterfontfeatures{Numbers=Lining,#1,#3}
\gdef\@chapterfontname{#2}
\global\@chapterfontsettrue
}%
@@ -564,7 +564,7 @@
\gdef\@subchfontname{}
\DeclareDocumentCommand \SetSubchFont { O{} m O{} } {%
\novel@checkfeatures{#1,#3}
- \gdef\@subchfontfeatures{#1,#3}
+ \gdef\@subchfontfeatures{Numbers=Lining,#1,#3}
\gdef\@subchfontname{#2}
\global\@subchfontsettrue
}%
@@ -573,9 +573,10 @@
\newif \if@headfontset
\gdef\@headfontfeatures{}
\gdef\@headfontname{}
-\DeclareDocumentCommand \SetHeadFont { O{} m O{} } {%
+\DeclareDocumentCommand \SetHeadFont { O{} m O{} } {% revised v 1.40.3
\novel@checkfeatures{#1,#3}
- \gdef\@headfontfeatures{WordSpace=\@looseheadword,LetterSpace=\@loosehead,#1,#3} % revised in v. 1.40.3.
+ \gdef\@headfontfeatures{Numbers=Lining,%
+ WordSpace=\@looseheadword,LetterSpace=\@loosehead,#1,#3}
\gdef\@headfontname{#2}
\global\@headfontsettrue
}%
@@ -588,29 +589,22 @@
\gdef\@decofontname{}
\DeclareDocumentCommand \SetDecoFont { O{} m O{} } {%
\novel@checkfeatures{#1,#3}
- \gdef\@decofontfeatures{#1,#3}
\gdef\@decofontname{#2}
\global\@decofontsettrue
\global\@gotdecotrue
\newfontface\decofont[#1,#3]{#2}
}%
-%
-\msg_set:nnnn {fontspec} {font-not-found} { % rewrites the standard message
- Font~ "#1"~ cannot~ be~ found.
- }{
- If~the~missing~font~is~Libertinus~or~Libertine~or~Biolinum~or~NovelDeco,\\
- see~the~`novel'~class~documents~for~help.\\
- If~the~missing~font~is~anything~else,~then~the~missing~font~is\\
- not~caused~by~`novel'~class.\\
-}%
%% For syntax consistency:
+\ExplSyntaxOn
\cs_new_eq:NN \NewFontFamily \newfontfamily
\cs_new_eq:NN \NewFontFace \newfontface
\cs_new_eq:NN \SetSansFont \setsansfont
\cs_new_eq:NN \SetMonoFont \setmonofont
+
\cs_new_eq:NN \SetMathFont \setmathfont
\cs_new_eq:NN \AddFontFeatures \addfontfeatures
\cs_new_eq:NN \AddFontFeature \addfontfeatures
+\ExplSyntaxOff
%%
%% \CreateFontFeature{substitutions}{feature code}
% Problem: Font has one or more alternate glyphs that you would like to use,
@@ -649,8 +643,6 @@
}
} %% end \CreateFontFeature. Above thanks to fontspec 2016.
%%
-\ExplSyntaxOff
-%%
%% end definition of parent and other fonts.
@@ -765,7 +757,15 @@
%% polyglossia
% Language-specific settings:
-\RequirePackage{polyglossia} % loading order changed in v. 1.40.3.
+\if@polyoff % polyoff is new in v 1.44.
+ \ClassWarning{novel}{^^JYou chose the `polyoff' class option.^^J%
+ So, the polyglossia package was not loaded. But like it or not,^^J%
+ the babel package was loaded, with generic hyphenation.^^J%
+ This behavior, or choice of language, cannot be changed.^^J%
+ If you want a specific language, you will have to use polyglossia.^^J}%
+\else
+ \RequirePackage{polyglossia} % loading order changed in v. 1.40.3.
+\fi
%% end polyglossia
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty b/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty
index 16510e8d366..3536e4cc35d 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-TextMacros.sty
@@ -13,7 +13,7 @@
%%
%%
\ProvidesFile{novel-TextMacros.sty}%
-[2017/10/04 v1.42 LaTeX file (text macros usable within document body)]
+[2017/10/19 v1.43 LaTeX file (text macros usable within document body)]
%%
@@ -26,23 +26,21 @@
%% The following commands were defined in other files of `novel' class:
%% -----------------------------------------------------------------------------
-% \thetitle or \theTitle returns string set by \title{} or \SetTitle{} -- See novel-LayoutSettings.sty.
-% \theauthor or \theAuthor returns string set by \author or \SetAuthor{} -- See novel-LayoutSettings.sty.
-% \normalFontSize length of main font setting. May be tweaked during rework. -- See novel-CalculateLayout.sty.
-% \normalBaselineSkip and \nbs (calculated) length of main baselineskip. -- See novel-CalculateLayout.sty.
-% \thesubtitle or \theSubtitle returns string set by \subtitle{} or \SetSubtitle{} -- See novel-LayoutSettings.sty.
-% \InlineImage, \BlockImage, \ClearImage -- See novel-Images.sty.
+% \theTitle returns string set by \SetTitle{} -- See novel-LayoutSettings.sty.
+% \theAuthor returns string set by \SetAuthor{} -- See novel-LayoutSettings.sty.
+% \nfs normal font size. May be tweaked during rework. -- See novel-CalculateLayout.sty.
+% \nbs (calculated) normal baselineskip. May be tweaked during rework. -- See novel-CalculateLayout.sty.
+% \theSubtitle returns string set by \SetSubtitle{} -- See novel-LayoutSettings.sty.
+% \InlineImage, \BlockImage -- See novel-Images.sty.
% \scenebreak, \sceneline, \scenestars -- See novel-ChapterScene.sty.
% ChapterStart, \ChapterTitle{}, \ChapterSubtitle{}, \ChapterDeco{} -- See novel-ChapterScene.sty.
-% \DecoChapterTitle{}{}, \SideDecoChapterTitle{}, ModernChapterTitle[]{}{} -- See novel-ChapterScene.sty.
% {\chapterfont text} and other pre-defined font selection commands -- See novel-LayoutSettings.sty.
% \decoglyph{} and \acronym{} -- See novel-FontDefaults.sty.
% \frontmatter, \mainmatter -- See novel-LayoutSettings.sty.
% \footnote[]{}, \endnote, \endnotetext[]{} -- See novel-Footnotes.sty.
-% \thispagestyle{choice} and \dropfolio -- See novel-HeadFootStyles.sty.
-% \NewVersoHeadText{}, \NewRectoHeadText{} Also \Set and \Renew forms. -- See novel-HeadFootStyles.sty.
+% \thispagestyle{choice} -- See novel-HeadFootStyles.sty.
+% \SetVersoHeadText{}, \SetRectoHeadText{} -- See novel-HeadFootStyles.sty.
% \CreateFontFeature{substitutions}{feature code} fakes an Open Type feature -- See novel-LayoutSettings.sty.
-% \Epigraph[align,scale,width]{text} creates an Epigraph -- See novel-ChapterScene.sty.
@@ -56,13 +54,15 @@
% parascale environment for long change in text size. Will go off-grid.
% toc environment for table of contents.
% \tocitem[]{}{} and \tocitem*[]{}{} for one-line entries in toc.
-% legalese environment uses ragged right, disables hyphenation, and reduces microtype tweaks.
+% legalese environment uses ragged right, disables hyphenation.
% \showlength[round]{length}{units} returns the length, re-calculated in units, rounded.
% \supersub{raise}{scale}{text} alternative to superscript and subscript commands.
% \sups{text}, \subs{text}, and \sinf{text} other alternatives to super/subscripts.
% \bigemdash[raise,thickness] provides a raised rule of flexible length, a "big em dash."
% \stake inserts zero-width rule, 1pt thick, as placeholder.
% \color and \textcolor (from package xcolor) have been modified to ensure black, or grayscale when permitted.
+% \hangleft{text} -- places text to left of its usual block position. Do not place text in margins!
+% \lnum{number} -- lining numbers
% \squeeze{} and \crush{} for emergency text adjustment.
@@ -71,7 +71,7 @@
%% They are listed here as a reminder of their existence. Not a complete list.
%% A description is only provided here, when it is brief and simple.
%
-% {\centering text\par} centers text. Needs the \par to finish. May also use internal \\ or \par. Avoid center environment.
+% {\centering text\par} centers text. Needs the \par to finish. May also use internal \\ or \par.
% \makebox[length][alignment]{text}
% \hspace{length}
% \vspace{length} Caution: may disrupt text line grid!
@@ -401,12 +401,7 @@
\newenvironment{legalese}
{\raggedright\hyphenpenalty=10000\exhyphenpenalty=10000}
{}
-%% poem environment. Optional argument is left margin.
-\newenvironment{poem}[1][0pt]
-{\begin{adjustwidth}{#1}{0pt}%
-\raggedright\hyphenpenalty=10000\exhyphenpenalty=10000}
-{\end{adjustwidth}\par}
-%%
+%
\gdef\hangleft#1{% places content to left of usual position.
\newlength\@temphangl%
\setlength\@temphangl{\widthof{#1}}%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-glyphtounicode.tex b/Master/texmf-dist/tex/lualatex/novel/novel-glyphtounicode.tex
index fcf5799c1d4..30d7eb84d85 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-glyphtounicode.tex
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-glyphtounicode.tex
@@ -14,9 +14,11 @@
%%
%%
\ProvidesFile{novel-gyphtounicode.tex}%
-[2017/10/04 v1.42 LaTeX file (additional glyph to unicode)]
+[2017/10/19 v1.43 LaTeX file (additional glyph to unicode)]
%%
+%% I am not sure if this is useful. But it doesn't hurt.
+
\begingroup
\catcode`\_=12 % so that underscore can be used in ligature names
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-microtype.cfg b/Master/texmf-dist/tex/lualatex/novel/novel-microtype.cfg
index 29729f41b3f..ad2538a1f37 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-microtype.cfg
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-microtype.cfg
@@ -19,7 +19,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{novel-microtype.cfg}%
-[2017/10/04 v1.42 LaTeX file (microtype configuration file for novel class)]
+[2017/10/19 v1.43 LaTeX file (microtype configuration file for novel class)]
%%% -----------------------------------------------------------------------
%%% FONT SETS
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty b/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty
index cd80916ab04..f964eaa0e49 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-pdfx.sty
@@ -24,7 +24,7 @@
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesFile{novel-pdfx.sty}%
-[2017/10/04 v1.42 LaTeX file (PDF/X support for novel class)]
+[2017/10/19 v1.43 LaTeX file (PDF/X support for novel class)]
% This package supports, and is part of, class `novel'.
% No support for anything but LuaLaTeX.
@@ -36,7 +36,7 @@
%
-% Hyperref options for PDF/X with LuaTeX:
+% Hyperref options for PDF/X with LuaLaTeX:
\def\pdfx@pdfX@opts@luatex{%
draft,pdftex,pdfpagemode=UseNone,bookmarks=false,hyperfootnotes=false,%
hyperindex=false,implicit=false,pdfversion=1.\the\pdfminorversion,%
@@ -51,7 +51,7 @@
\Hy@bookmarksfalse
%
\newif \if@gottitle \@gottitlefalse % refers to PDF File Data
-% Was \title{} called prior to this step? If so:
+% Was \SetTitle{} called prior to this step? If so:
\ifthenelse{\equal{\@title}{} \OR \equal{\@title}{ }}{}{\@gottitletrue}
%
% Sanity check: If title is missing at this step, then compliance must be off:
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-xmppacket.sty b/Master/texmf-dist/tex/lualatex/novel/novel-xmppacket.sty
index 980ef2e2abf..f1b1477b743 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel-xmppacket.sty
+++ b/Master/texmf-dist/tex/lualatex/novel/novel-xmppacket.sty
@@ -22,7 +22,7 @@
%%
%%
\ProvidesFile{novel-xmppacket.sty}%
-[2017/10/04 v1.42 LaTeX file (novel XMP packet template)]
+[2017/10/19 v1.43 LaTeX file (novel XMP packet template)]
%%
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel.cls b/Master/texmf-dist/tex/lualatex/novel/novel.cls
index bd4b0afc0d5..6b8ffb8da87 100644
--- a/Master/texmf-dist/tex/lualatex/novel/novel.cls
+++ b/Master/texmf-dist/tex/lualatex/novel/novel.cls
@@ -17,29 +17,27 @@
%%
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
% Actually needs LuaLaTeX, at least version 0.95 from TeXLive 2016.
-\ProvidesClass{novel}[2017/10/04 v1.42 LaTeX document class]
+\ProvidesClass{novel}[2017/10/19 v1.43 LaTeX document class]
%%
-
+%% Version 1.44: General cleanup of docs and code, for improved readbaility.
+%% Version 1.42: Greatly improved HTML documentation.
+%% Version 1.41: Improved HTML documentation.
+%% Versions 1.40.x: Incremental minor changes, leading to 1.42.
%% Version 1.40: removed `debug' option (was not useful). Major docs rewrite.
-%% Versions 1.40.x: Incremental changes, leading to 1.42.
-
+%% This version was successfully used for a P.O.D. novel, with cover.
%% Version 1.38: corrected offset in cover artwork; some docs modified.
-
%% Version 1.36: minor documentation correction.
-
%% Version 1.34: Added debug class option and related code. [Later removed.]
-
%% Version 1.32 includes a minor documentation fix, and a major bug fix
-%% concerning looose text tracking. The bug occasionally appeared when
-%% page headings were compiled, but gave a cryptic error message
-%% about MT@res@a. The fix is expected to be permanent.
-
+%% concerning looose text tracking. The bug occasionally appeared when
+%% page headings were compiled, but gave a cryptic error message
+%% about MT@res@a. The fix is expected to be permanent.
%% Version 1.2: Added capability for cover artwork.
-
-%% Versions 1.1.x: First general release, occasional documantation changes.
+%% Versions 1.1.x: First general release, occasional documentation changes.
%% DESCRIPTION:
+%% -----------------------------------------------------------------------------
%% Class `novel' is designed for print fiction: novels or short stories.
%% It cannot be used for e-books or for journal publication.
%% It is not suitable for most non-fiction, because routine academic features
@@ -86,7 +84,7 @@
\FPmessagesfalse % eliminates numerous friendly messages from the log
%
\pdfminorversion=3 % might be reset later, depending on settings
-\gdef\thepdfminorversion{\pdfminorversion}
+\gdef\thepdfminorversion{\pdfminorversion} % compatibility
%
\RequirePackage{silence} % Used here:
% hyperref draft mode is always on, even when novel is not in draft mode:
@@ -98,11 +96,10 @@
\RequirePackage[relative]{textpos} % for inserting images
\RequirePackage{noindentafter} % for unindented chapter and scene starts
\RequirePackage{calc} % allows length expression calculations
-\RequirePackage{changepage} % block indents, etc.
+\RequirePackage{changepage} % provides block indents, etc. Do not use strict!
\RequirePackage{atbegshi} % for one-page header changes. Also used by hyperref.
\RequirePackage{letltxmacro} % for re-defining some macros
\RequirePackage{magaz} % special treatment of first lines
-\RequirePackage{changepage} % for adjusted text widths. Do not use strict!
\RequirePackage{xparse} % for writing cool-looking commands
%
% In addition, the following packages are required, but they are not loaded now.
@@ -110,7 +107,6 @@
% with suitable arguments, when the time comes:
% fontspec -- in novel-LayoutSettings.sty
% unicode-math -- in novel-LayoutSettings.sty
-% eso-pic -- in novel-CalculateLayout.sty
% polyglossia -- in novel-LayoutSettings.sty
% microtype -- in novel-FontDefaults.sty
% hyperref -- in novel-pdfx.sty
@@ -118,7 +114,7 @@
% xcolor -- lower in this page
% adjustbox -- lower on this page
% eso-pic -- lower on this page
-% lipsum -- later on this page
+% lipsum -- lower on this page
%%
@@ -127,7 +123,8 @@
% Allowed option list:
% draft xml shademargins graytext greytext cropmarks cropview closecrop
% coverart unblock
-% Yes, I realize that this could have been done another way:
+% Yes, I realize that this could have been done another way, but I want
+% to issue error messages from `novel' rather than (say) `keyval':
\gdef\@mycol{\@classoptionslist}
\StrDel{\@mycol}{ }[\@mycol]
\StrDel{\@mycol}{,}[\@mycol]
@@ -140,15 +137,16 @@
\StrDel{\@mycol}{cropview}[\@mycol]
\StrDel{\@mycol}{closecrop}[\@mycol]
\StrDel{\@mycol}{coverart}[\@mycol]
-\StrDel{\@mycol}{debug}[\@mycol] % obsolete
\StrDel{\@mycol}{unblock}[\@mycol]
+\StrDel{\@mycol}{mtoff}[\@mycol]
+\StrDel{\@mycol}{polyoff}[\@mycol]
%
\ifthenelse{\equal{\@mycol}{}}{}{
\ClassWarning{novel}{Unrecognized class option: \@mycol^^J%
The unrecognized option was ignored!^^J%
If `debug' it is obsolete from v.1.40.^^J%
- Note that font point size and document size^^J%
- are not novel class options. See documentation.}%
+ Note that font size, document size, and language^^J%
+ are not `novel' class options. See documentation.}%
}
%
% If used, option `draft' shows overflow rule.
@@ -161,7 +159,8 @@
}
% If used, option `xml' creates a file `\jobname-XMPasXML.xml` that contains
% the XMP metadata with an xml declaration and comments at top.
-% Only works when \SetPDFX is not `off'.
+% Only works when \SetPDFX is not `off'. Note that you do not need to use
+% this option to get PDF/X. It is only for your own usage.
\newif \if@wantXMPasXML
\DeclareOption{xml}{
\@wantXMPasXMLtrue
@@ -186,19 +185,21 @@
\DeclareOption{greytext}{
\@graytexttrue
}
-% Usually you do NOT want crop (trim) marks. Configurable by \SetCropMarks[]{}.
+% Usually you do NOT want crop (trim) marks!
+% Configurable by \SetCropMarks[]{}.
\newif \if@cropmarks
\DeclareOption{cropmarks}{
\@cropmarkstrue
}
-% The cropview sets PDF CropBox equal to TrimBox instead of MediaBox.
+% PDF viewers display CropBox, which normally is identical to MediaBox.
+% Option `cropview', sets CropBox to TrimBox instead, so that's all you see.
% Only makes a difference when MediaBox is larger than TrimBox.
% Ignored unless in draft mode.
\newif \if@cropview
\DeclareOption{cropview}{
\@cropviewtrue
}
-% With closecrop, the TrimSize and margins are re-sized, to preserve the
+% With `closecrop', the TrimSize and margins are re-sized, to preserve the
% live area, but with reduced margins on all sides (same for verso/recto).
% This option is available only in draft mode, and disables shademargins.
% The purpose is to create a PDF that is more easily read on a handheld device,
@@ -208,9 +209,9 @@
\DeclareOption{closecrop}{
\@cropviewtrue\@closecroptrue
}
-% New in version 1.2: coverart option. See documentation page 10.
+% New in version 1.2: `coverart' option. See documentation.
% This is used to create a 1-page file with no text, just an image.
-% Intended purpose is PDF/X for novel cover. See docs page 10.
+% Intended purpose is PDF/X for novel cover.
\newif \if@coverart
\DeclareOption{coverart}{
\@coverarttrue
@@ -225,6 +226,19 @@
\DeclareOption{unblock}{
\@novelunblocktrue
}
+% New in version 1.44: mtoff option, primarily for developer use.
+% With mtoff, the microtype package is not loaded.
+\newif \if@mtoff
+\DeclareOption{mtoff}{
+ \@mtofftrue
+}
+% New in version 1.44: polyoff option, primarily for developer use.
+% With polyoff, the polyglossia package is not loaded.
+% You may need to load babel, or not, via \RequirePackage[options]{babel}.
+\newif \if@polyoff
+\DeclareOption{polyoff}{
+ \@polyofftrue
+}
%% Note that document size and normal font size are not class options.
%% They are set by commands in the Preamble, and have default values.
%
@@ -258,12 +272,13 @@
%% Activate xcolor, adjustbox, and eso-pic:
%% -----------------------------------------------------------------------------
-% The final book must be monochrome (black and white only) for all text
-% and vector graphics, unless option `graytext' is used.
-% Vector graphics are discouraged, in any case. See Page 9.
-% You can use grayscale (single channel, not RGB gray) raster images.
-% In draft mode only, the `shademargins' option
-% requires grayscale, so it is temporarily enabled.
+% The final book must be monochrome (black and white only) for all text,
+% unless option `graytext' is used. Then, grayscale text is permitted.
+% Interior images must be raster monochrome or grayscale, whether or not
+% the `graytext' option is used. See documentation.
+% Vector graphics are strongly discouraged, in any case.
+% In draft mode only, the `shademargins' option requires `grayscale',
+% which will be temporarily enabled, even if not specifically requested.
\newif \if@grayenabled
%
\if@useDraftMode
@@ -288,6 +303,8 @@
%% -----------------------------------------------------------------------------
%% This normalsize is temporary, so that packages can load without complaint.
%% It will be modified later, during layout calculations.
+%% Actual default font size will be 11pt-12pt, with 11.4pt average.
+%% But that is for typical book-weight fonts. The closest LMR eqivalent is 10pt.
\def\Current@FontSizeNum{10}
\def\Current@BaselineSkipNum{13}
\renewcommand\normalsize{%
@@ -295,7 +312,7 @@
}
\normalsize
%
-\RequirePackage{lipsum} % for examples
+\RequirePackage{lipsum} % generates dummy text for examples
%
%% end temporary normal point size and baselineskip
@@ -303,50 +320,47 @@
%% Define commands used for File Data, including PDF/X Settings.
%% -----------------------------------------------------------------------------
%% As used here, `File Data' refers to PDF metadata as found in PDF/Info
-%% and in XMP. This class does not write it to the Catalog.
-%% Defines commands such as \title{}, not necessarily the same as other TeX.
+%% and in XMP. This class does not write it to the PDF Catalog.
\RequirePackage{novel-FileData}
-%
%%
%% Physical Layout Commands and Settings.
%% -----------------------------------------------------------------------------
-%% Define commands that over-ride the class option pre-configured settings.
-%% Variety of miscellaneous layout settings such as \parsep, \parindent, etc.
+%% Define user commands that over-ride the class option pre-configured settings.
+%% Also sets a variety of miscellaneous lengths:s \parsep, \parindent, etc.
\RequirePackage{novel-LayoutSettings}
-%
%%
%% Additional Preamble Settings and Commands.
%% -----------------------------------------------------------------------------
-%%
% Macros for use in document body:
-\RequirePackage{novel-TextMacros} % part of novel class
-% Standard `fancyhdr' header footer styles:
-\RequirePackage{novel-HeadFootStyles} % part of novel class
+\RequirePackage{novel-TextMacros}
+% Standard header footer styles, based on `fancyhdr':
+\RequirePackage{novel-HeadFootStyles}
% Chapter and Scene styles:
\RequirePackage{novel-ChapterScene}
% Image placement:
-\RequirePackage{novel-Images} % part of novel class
+\RequirePackage{novel-Images}
% Footnotes and endnotes:
-\RequirePackage{novel-Footnotes} % part of novel class
+\RequirePackage{novel-Footnotes}
%%
-
%% \AtEndPreamble sets defaults and calculates layout
%% -----------------------------------------------------------------------------
-%
\AtEndPreamble{
+ % New in v. 1.44. Sets default resolution for images without internal dpi:
+ \pdfimageresolution=\@novimgres % from \SetFlexResolution. Default 300.
% If user did not choose language, default is here. Sorry, Brits:
% Macro \xpg@main@language is gdef'd by \setdefaultlanguage in polyglossia.
- \@ifundefined{xpg@main@language}{\setdefaultlanguage[variant=american]{english}}{}
+ \if@polyoff\else % polyoff v 1.44.
+ \@ifundefined{xpg@main@language}{\setdefaultlanguage[variant=american]{english}}{}
+ \fi
\RequirePackage{novel-CalculateLayout}
\RequirePackage{novel-FontDefaults}
- \renewcommand\textls[2][]{#2%
- \typeout{Class `novel' Alert: \string\textls\space ignored on pg \thepage.}%
- } % nullifies this microtype command (problems)
+ \providecommand\textls[2][]{#2} % when mtoff option
+ \renewcommand\textls[2][]{#2} % nullifies this microtype command (problems)
\RequirePackage{novel-pdfx}%
}
%%
@@ -354,15 +368,7 @@
%% \AtBeginDocument finishes the setup
%% -----------------------------------------------------------------------------
-%
\AtBeginDocument{ %
- \defaultfontfeatures{} % reset
- % Any other fonts will use these defaults:
- \defaultfontfeatures{%
- SmallCapsFeatures={Renderer=Basic},Kerning=On,%
- Ligatures=TeX,%
- }%
- %
% Find some useful measurements:
\gdef\@normalxheight{\heightof{x}}
\setlength\normalxheight{\@normalxheight}
@@ -397,7 +403,7 @@
}{}%
}
\fi
- %
+ % List of blocked packages (not exhaustive, since TeX has so many):
\sorry@no{pdfx}
\sorry@no{xmpincl}
\sorry@no{hyperxmp}
@@ -426,8 +432,6 @@
\sorry@no{engord}
\sorry@no{endnotes}
%%
-
- %%
%% Pertains to novel-LayoutSettings.sty:
\ifcsname pagenumberstyle\endcsname\else
\SetPageNumberStyle{\thepage}
@@ -509,19 +513,19 @@
\ifthenelse{\equal{\@myfnsymbols}{†}}{\setcounter{@maxfnsymbol}{6}}{}
%%
}
-%%
+%% end AtBeginDocument
-%% New in version 1.2, coverart option. See docs page 10.
+%% New in version 1.2, coverart option. See documentation.
\AfterEndPreamble{
- \if@coverart
- \AddToShipoutPictureBG{%
- \AtPageUpperLeft{%
- \InlineImage{\novelcoverimage}% Version 1.38 corrected erroneous starred command here.
- }%
- }
- \null% without this, page has no "content"
- \fi
+ \if@coverart
+ \AddToShipoutPictureBG{%
+ \AtPageUpperLeft{%
+ \InlineImage{\novelcoverimage}%
+ }%
+ }
+ \null% without this, page has no "content"
+ \fi
}
%%