summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty')
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty144
1 files changed, 71 insertions, 73 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty b/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty
index 0e6215ddfcd..e10c1cada65 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/03/27 v1.0.10 LaTeX file (layout settings)]
+[2017/04/12 v1.1 LaTeX file (layout settings)]
%%
-%% Note that nearly all layout settings are pre-configured based on Trim Size.
+%% Note that nearly all layout settings are preconfigured 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
@@ -57,12 +57,12 @@
%% SIZE-RELATED COMMANDS AVAILABLE IN PREAMBLE.
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
%% Use if necessary for customization.
%% If you like a class option that pre-sets these values,
%% then you do not have to use any of these commands.
%
-% Note: This class does not ask you to set the width or height of the textblock.
+% Note: This class does not ask you to set the width/height of the textblock.
% Instead, these values are automatically calculated from other dimensions.
%
@@ -166,11 +166,11 @@
}
\ifthenelse{\equal{#1}{edge}}{\@offcenterTrimtrue}{}
}
-% \SetLinesPerPage{} may be limited due to fontsize and Trim Size constraints.
+% \SetLinesPerPage{} limited due to fontsize and Trim Size constraints.
% There is no `rework' command, because as long as the number of lines fit,
% the line spacing will be automatically changed to fit a reworked size.
% The only possible problem is if lines were originally so tight that
-% a reworked size cannot fit. In that case, the user's best plan is to remove
+% a reworked size cannot fit. In that case, the user's best plan is remove
% header or footer (if possible), or reduce vertical margins (if possible).
\newcommand\SetLinesPerPage[1]{
\global\@LinesPerPageSettrue
@@ -196,13 +196,13 @@
%% RESERVE SPACE FOR HEADER/FOOTER, AND SET DEFAULT CHAPTER DISPLAY PAGE
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
%% At this point, `novel' needs to know whether or not header/footer used,
%% so that space can be reserved at top/bottom. Actual styling comes later.
%
% If the user wishes to tweak layout, these Preamble commands store info,
% that will be used in novel-CalculateLayout.sty.
-% The jumps are scale factors, which increase or decrease headsep and footskip
+% The jumps are scale factors, which increase/decrease headsep and footskip
% relative to normal baselineskip. Do not use \setlength\headsep or
% \setlength\footskip directly, because direct settings will lead to
% improper calculations.
@@ -295,7 +295,7 @@
\ifthenelse{\equal{\@setchapterstart}{dropfolio}}{% no footnote there
\def\@setchapterstartOK{true}%
}{}%
- \ifthenelse{\equal{\@setchapterstart}{dropfoliolater}}{% has footnote(s) there
+ \ifthenelse{\equal{\@setchapterstart}{dropfoliolater}}{% footnote(s) there
\def\@setchapterstartOK{true}%
}{}%
\ifthenelse{\equal{\@setchapterstart}{foliobeneath}}{%
@@ -324,9 +324,11 @@
\newcommand\SetMarkerStyle[2][real]{
\def\@goodfnm{no}
\ifthenelse{\equal{#2}{asterisk}}{%
- \def\@goodfnm{yes}\global\toggletrue{@usesymbolmark}\gdef\@myfnsymbols{*}}{}
+ \def\@goodfnm{yes}\global\toggletrue{@usesymbolmark}%
+ \gdef\@myfnsymbols{*}}{}
\ifthenelse{\equal{#2}{dagger}}{%
- \def\@goodfnm{yes}\global\toggletrue{@usesymbolmark}\gdef\@myfnsymbols{†}}{}
+ \def\@goodfnm{yes}\global\toggletrue{@usesymbolmark}%
+ \gdef\@myfnsymbols{†}}{}
\ifthenelse{\equal{#2}{number}}{%
\def\@goodfnm{yes}\global\togglefalse{@usesymbolmark}}{}
\def\@goodfnk{no}
@@ -369,7 +371,7 @@
%% MISCELLANOUS SETTINGS. Mostly remove "glue". Best to leave as-is.
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
%%
%
\@twocolumnfalse
@@ -430,8 +432,8 @@
%% End miscellaneous settings.
-% The following might become unnecessary if fontspec adds the capability
-% to disable keys. For now: Color and Opacity cannot be used as font features,
+% The following might become unnecessary if fontspec adds the capability to
+% disable keys. For now: Color and Opacity cannot be used as font features,
% for a black/white printed book. Alas, fontspec over-rules xcolor.
% So, this code over-rules fontspec:
\gdef\novel@checkfeatures#1{%
@@ -452,11 +454,13 @@
-%% DEFINITION OF MASTER AND OTHER FONTS
-%% -----------------------------------------------------------------------------
-%%
+%% DEFINITION OF PARENT AND OTHER FONTS
+%% --------------------------------------------------------------------------
+%% Prior to v. 1.1, parentfont was known as masterfont. Backwards compatible.
+%
+\providecommand\rmdefault{lmr} % should be lmr anyway, at this point.
% The `no-math' option prevents fontspec from tracking certain font changes.
-% This is probably necessary, since novel does some of its own font tracking:
+% This is probably necessary, since novel does some of its own font tracking:
\RequirePackage[no-math]{fontspec} % For LuaLaTeX. NOT package `fontenc'.
\defaultfontfeatures{} % reset
% User-created fonts (not standard, not novel-specific defaults:
@@ -464,38 +468,32 @@
SmallCapsFeatures={Renderer=Basic},Kerning=On,%
Ligatures=TeX,%
}%
-% Latin Modern Math (Open Type) fonts will be selected by default, for math.
% 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.
+% If you must load a math font package, it should be done using
+% \RequirePackage before (yes, before) calling the document class.
\RequirePackage{unicode-math}
%%
%% 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.
-\let\@setmainfont\setmainfont\relax
-\def\setmainfont{%
- \ClassError{novel}{Use \string\SetMasterFont\space not \string\setmainfont}%
- {The \string\setmainfont\space command is not in this document class.^^J%
- Use \string\SetMasterFont\space to get what you need.^^J%
- You may see this message if you \string\usepackage{some font}^^J%
- in the Preamble. Do not do that. If you wish to use that font, and if^^J%
- it is Open Type (or TrueType) format, and installed, then instead of^^J%
- \string\usepackage\space use \string\SetMasterFont. See `novel' docs.^^J%
- Any attempt to continue without fixing is doomed to failure!}%
-}
\ExplSyntaxOn
-%% Store settings for the master font:
-% The master font will become the main font AtEndPreamble. It will also become
+%% 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@masterfontset
-\gdef\@masterfontfeatures{}
-\gdef\@masterfontname{}
-\DeclareDocumentCommand \SetMasterFont { O{} m O{} } {%
+\newif \if@parentfontset
+\gdef\@parentfontfeatures{}
+\gdef\@parentfontname{}
+\DeclareDocumentCommand \SetParentFont { O{} m O{} } {% from version 1.1.
+ \novel@checkfeatures{#1,#3}
+ \gdef\@parentfontfeatures{#1,#3}
+ \gdef\@parentfontname{#2}
+ \global\@parentfontsettrue
+}%
+\DeclareDocumentCommand \SetMasterFont { O{} m O{} } {% DEPRECATED
\novel@checkfeatures{#1,#3}
- \gdef\@masterfontfeatures{#1,#3}
- \gdef\@masterfontname{#2}
- \global\@masterfontsettrue
+ \gdef\@parentfontfeatures{#1,#3}
+ \gdef\@parentfontname{#2}
+ \global\@parentfontsettrue
}%
%% Store settings for the chapterfont:
% The chapter font is used by the \ChapterTitle{} command.
@@ -564,7 +562,7 @@
\cs_new_eq:NN \AddFontFeature \addfontfeatures
%%
%% \CreateFontFeature{substitutions}{feature code}
-% Problem: The font has one or more alternate glyphs that you would like to use,
+% Problem: Font has one or more alternate glyphs that you would like to use,
% but they are not listed in a feature set for the font.
% Solution: Create your own feature set, with \CreateFontFeature. The created
% feature may then be used like a real feature, in any font definition.
@@ -583,7 +581,7 @@
% a style set such as ss03 if you are sure that the font in question
% do not already have ss03 (but this is taking a chance).
% Once defined, you may use it like this (for example):
-% \SetMasterFont[RawFeature=+myfs]{fontname}
+% \SetParentFont[RawFeature=+myfs]{fontname}
% \NewFontFamily\myfake[RawFeature=+myfs]{fontname}
% In the document body: {\addfontfeature{myfs} text}
\DeclareDocumentCommand \CreateFontFeature { m m } {%
@@ -602,12 +600,12 @@
%%
\ExplSyntaxOff
%%
-%% end definition of master and other fonts.
+%% end definition of parent and other fonts.
%% FAKE POLYGLOSSIA COMMANDS
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
% The polyglossia package is not loaded until \AtEndPreamble.
% So, its commands are not directly available in the Preamble.
% These fake commands store the data. Later, the commands will be relaxed,
@@ -643,7 +641,7 @@
%% FRONTMATTER, MAINMATTER, BACKMATTER
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
%
\newif \ifWithinFrontmatter \WithinFrontmatterfalse
\newif \ifWithinMainmatter \WithinMainmatterfalse
@@ -658,14 +656,14 @@
{You issued \string\frontmatter\ more than once.^^J}%
\fi
\ifWithinMainmatter
- \ClassError{novel}{\string\frontmatter\ cannot follow \mainmatter}%
- {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
- but you do not need all of them.^^J}%
+ \ClassError{novel}{\string\frontmatter\ cannot follow \mainmatter}%
+ {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
+ but you do not need all of them.^^J}%
\fi
\ifWithinBackmatter
- \ClassError{novel}{\string\frontmatter\ cannot follow \backmatter}%
- {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
- but you do not need all of them.^^J}%
+ \ClassError{novel}{\string\frontmatter\ cannot follow \backmatter}%
+ {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
+ but you do not need all of them.^^J}%
\fi
\WithinFrontmattertrue\WithinMainmatterfalse\WithinBackmatterfalse
\pagenumbering{roman}
@@ -679,9 +677,9 @@
{You issued \string\mainmatter\ more than once.}%
\fi
\ifWithinBackmatter
- \ClassError{novel}{\string\mainmatter\ cannot follow \backmatter}%
- {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
- but you do not need all of them.^^J}%
+ \ClassError{novel}{\string\mainmatter\ cannot follow \backmatter}%
+ {In order: \string\frontmatter\ \string\mainmatter\ \string\backmatter^^J%
+ but you do not need all of them.^^J}%
\fi
\WithinFrontmatterfalse\WithinMainmattertrue\WithinBackmatterfalse
\setcounter{frontmatterpages}{\value{page}}
@@ -692,7 +690,7 @@
%
\def\backmatter{\@ifstar\@backmatterst\@backmatterns}
%
-\def\@backmatterst{ % continues frontmatter count with lowercase roman numerals
+\def\@backmatterst{% continues frontmatter count w/ lowercase roman numerals
\ifWithinBackmatter
\ClassError{novel}{\string\backmatter\space used more than once}%
{You issued \string\backmatter\space more than once.^^J}%
@@ -700,9 +698,9 @@
% If you really must go directly from front to back without main,
% simply issue \mainmatter\backmatter together. Not advised.
\ifWithinFrontmatter
- \ClassError{novel}{Missing \string\mainmatter}%
- {You went directly from \string\frontmatter\space to \string\backmatter^^J%
- Must have \string\mainmatter\space in between.^^J}%
+ \ClassError{novel}{Missing \string\mainmatter}%
+ {You went directly from \string\frontmatter\space to \string\backmatter^^J%
+ Must have \string\mainmatter\space in between.^^J}%
\fi
\WithinFrontmatterfalse\WithinMainmatterfalse\WithinBackmattertrue
\addtocounter{frontmatterpages}{1}
@@ -718,16 +716,16 @@
% If you really must go directly from front to back without main,
% simply issue \mainmatter\backmatter together. Not advised.
\ifWithinFrontmatter
- \ClassError{novel}{Missing \string\mainmatter}%
- {You went directly from \string\frontmatter\space to \string\backmatter^^J%
- Must have \string\mainmatter\space in between.^^J}%
+ \ClassError{novel}{Missing \string\mainmatter}%
+ {You went directly from \string\frontmatter\space to \string\backmatter^^J%
+ Must have \string\mainmatter\space in between.^^J}%
\fi
\WithinFrontmatterfalse\WithinMainmatterfalse\WithinBackmattertrue
}
%
\def\Backmatter{\@ifstar\@Backmatterst\@Backmatterns}
%
-\def\@Backmatterst{ % continues frontmatter count with uppercase Roman numerals
+\def\@Backmatterst{% continues frontmatter count w/ uppercase Roman numerals
\ifWithinBackmatter
\ClassError{novel}{\string\backmatter\space used more than once}%
{You issued \string\backmatter\space more than once.^^J}%
@@ -735,9 +733,9 @@
% If you really must go directly from front to back without main,
% simply issue \mainmatter\backmatter together. Not advised.
\ifWithinFrontmatter
- \ClassError{novel}{Missing \string\mainmatter}%
- {You went directly from \string\frontmatter\space to \string\backmatter^^J%
- Must have \string\mainmatter\space in between.^^J}%
+ \ClassError{novel}{Missing \string\mainmatter}%
+ {You went directly from \string\frontmatter\space to \string\backmatter^^J%
+ Must have \string\mainmatter\space in between.^^J}%
\fi
\WithinFrontmatterfalse\WithinMainmatterfalse\WithinBackmattertrue
\addtocounter{frontmatterpages}{1}
@@ -753,9 +751,9 @@
% If you really must go directly from front to back without main,
% simply issue \mainmatter\backmatter together. Not advised.
\ifWithinFrontmatter
- \ClassError{novel}{Missing \string\mainmatter}%
- {You went directly from \string\frontmatter\space to \string\backmatter^^J%
- Must have \string\mainmatter\space in between.^^J}%
+ \ClassError{novel}{Missing \string\mainmatter}%
+ {You went directly from \string\frontmatter\space to \string\backmatter^^J%
+ Must have \string\mainmatter\space in between.^^J}%
\fi
\WithinFrontmatterfalse\WithinMainmatterfalse\WithinBackmattertrue
\pagenumbering{Roman}
@@ -767,12 +765,12 @@
%% DISABLE OR NEUTRALIZE SOME STANDARD LATEX COMMANDS
-%% -----------------------------------------------------------------------------
+%% --------------------------------------------------------------------------
% The `novel' class disallows these commands, or neutralizes them by simply
-% repeating their arguments. In some cases, they request functionality that is
-% not implemented in `novel'. In other cases, the functionality is part of core,
+% repeating their arguments. In some cases, they request functionality that's
+% not implemented in `novel'. In other cases, functionality is part of core,
% but would interfere with the `novel' emphasis on constant line skip.
-% You may re-define the commands using your own code in Preamble (discouraged).
+% You may redefine the commands using your own Preamble code (discouraged).
%
\gdef\null{\hbox{\strut}} % May be important!
%