diff options
author | Karl Berry <karl@freefriends.org> | 2017-08-01 21:34:40 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2017-08-01 21:34:40 +0000 |
commit | 7ba0b2e501e4b5d83a48295804d3570ef3407f8a (patch) | |
tree | 84ceb1534f87b41ff6aca6b306fed3b33466ecb2 /Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty | |
parent | b26f035ced2518fea3f81bb1c8bd54de090262df (diff) |
novel (1aug17)
git-svn-id: svn://tug.org/texlive/trunk@44933 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty | 102 |
1 files changed, 56 insertions, 46 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty b/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty index 51b3f14c185..9fcb85aef6c 100644 --- a/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty +++ b/Master/texmf-dist/tex/lualatex/novel/novel-LayoutSettings.sty @@ -13,9 +13,11 @@ %% %% \ProvidesFile{novel-LayoutSettings.sty}% -[2017/07/26 v1.32 LaTeX file (layout settings)] +[2017/07/31 v1.34 LaTeX file (layout settings)] %% +% Novel Tracking codes in this file begin with 3. +\NDB{3.0 in novel-LayoutSettings.sty.} %% 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. @@ -54,6 +56,7 @@ \newlength\normalxheight \newlength\normalXheight %% +\NDB{3.1 in novel-LayoutSettings.sty.} %% SIZE-RELATED COMMANDS AVAILABLE IN PREAMBLE. @@ -69,6 +72,7 @@ % % \SetTrimSize{}{} width and height of printed book. \newcommand\SetTrimSize[2]{% + \NDB{3.2.0 in novel-LayoutSettings.sty.} \global\@TrimSizeSettrue \ifthenelse{\dimtest{#1}{<}{2.99in}}{ \ClassError{novel}{Unacceptably small Trim Width}% @@ -87,6 +91,7 @@ {\string\SetTrimSize\space cannot follow \string\ReworkTrimSize^^J% and cannot follow \string\ReworkMargins.}% \fi + \NDB{3.2.1 in novel-LayoutSettings.sty.} \setlength\Old@TrimWidth{#1}% \setlength\Old@TrimHeight{#2}% \setlength\New@TrimWidth{#1}% @@ -97,10 +102,12 @@ \setlength\New@MediaWidth{#1}% \setlength\New@MediaHeight{#2}% \fi + \NDB{3.2.3 in novel-LayoutSettings.sty.} } % % Retroactively change Trim Size after layout. See documentation: \newcommand\ReworkTrimSize[2]{% + \NDB{3.4.0 in novel-LayoutSettings.sty.} \if@coverart % New in version 1.2 \ClassError{novel}{Rework command cannot be used with coverart option}% {Instead of reworking document size, you must re-do the artwork.} @@ -115,6 +122,7 @@ Carefully review your PDF to ensure that line breaks, paragraphs,^^J% and page breaks are where you expect them to be.^^J}% \fi + \NDB{3.4.1 in novel-LayoutSettings.sty.} } % Margins at top and bottom are relative to: % top of header, or top of textblock if no header; @@ -122,6 +130,7 @@ % Inside margin generally greater than outside, due to gutter. % Standard margins command ("TOBI, or not TOBI, that is the question."): \newcommand\SetMargins[4]{ % top, outside, bottom, inside + \NDB{3.5.0 in novel-LayoutSettings.sty.} \global\@MarginsSettrue \if@ReworkMarginsSet \ClassError{novel}{^^JCannot set Margins after reworking them}% @@ -135,9 +144,11 @@ \setlength\New@BottomMargin{#3} \setlength\Old@InsideMargin{#4} \setlength\New@InsideMargin{#4} + \NDB{3.5.1 in novel-LayoutSettings.sty.} } % Retroactively change margins after layout. See documentation: \newcommand\ReworkMargins[4]{ + \NDB{3.6.0 in novel-LayoutSettings.sty.} \if@coverart % New in version 1.2 \ClassError{novel}{Rework command cannot be used with coverart option}% {Instead of reworking document size, you must re-do the artwork.} @@ -152,6 +163,7 @@ Carefully review your PDF to ensure that line breaks, paragraphs,^^J% and page breaks are where you expect them to be.^^J}% \fi + \NDB{3.6.1 in novel-LayoutSettings.sty.} } % \SetMediaSize[]{}{} such as {8.5in}{11in}. % This command is only used when the Trim Size must be placed in a larger @@ -164,6 +176,7 @@ % \newif \if@offcenterTrim \@offcenterTrimfalse \newcommand\SetMediaSize[3][center]{ % [alignment] width, height + \NDB{3.7.0 in novel-LayoutSettings.sty.} \ifthenelse{\equal{#1}{center} \OR \equal{#1}{edge}}{ \global\@MediaSizeSettrue \setlength\Old@MediaWidth{#2} @@ -177,6 +190,7 @@ \if@coverart\else % new in version 1.2 \ifthenelse{\equal{#1}{edge}}{\global\@offcenterTrimtrue}{} \fi + \NDB{3.7.1 in novel-LayoutSettings.sty.} } % \SetLinesPerPage{} limited due to fontsize and Trim Size constraints. % There is no `rework' command, because as long as the number of lines fit, @@ -185,6 +199,7 @@ % 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]{ + \NDB{3.8.0 in novel-LayoutSettings.sty.} \global\@LinesPerPageSettrue \FPiflt{#1}{1}% \ClassError{novel}{\string\SetLinesPerPage\ must be at least 1}% @@ -192,6 +207,7 @@ \else\fi % \FPround{\temp@IntegerLines}{#1}{0} \def\my@LinesPerPage{\temp@IntegerLines} + \NDB{3.8.1 in novel-LayoutSettings.sty.} } % \SetFontSize{} may be in any units, even decimals: 12.2pt, 11.5bp, etc. % When packages load, the font size is temporarily set to 11pt at 15pt skip, @@ -199,8 +215,10 @@ % Then the size is changed to its actual value based on this command, or on % the defaults for Trim Size, or on the effects of \Rework. \newcommand\SetFontSize[1]{ + \NDB{3.9.0 in novel-LayoutSettings.sty.} \global\@FontSizeSettrue \global\setlength\Old@FontSize{#1} + \NDB{3.9.1 in novel-LayoutSettings.sty.} } % %% End size-related commands available in Preamble. @@ -228,6 +246,7 @@ \SetHeadJump{1.5} % default \gdef\SetFootJump#1{\gdef\@footjump{#1}} \SetFootJump{1.5} % default +\NDB{3.10 in novel-LayoutSettings.sty.} % New in version 1.2, coverart. \if@coverart % cover art has no header or footer \gdef\SetHeadFootStyle#1{\gdef\my@HeadFootStyle{0}} @@ -238,19 +257,20 @@ \gdef\SetHeadFootStyle#1{\gdef\my@HeadFootStyle{#1}} \gdef\SetHeadStyle#1{\gdef\my@HeadFootStyle{#1}} % deprecated \fi +\NDB{3.11 in novel-LayoutSettings.sty.} % See docs part 7 for what these emblems do, if used: \newcommand\SetEmblems[2]{ % verso, recto \gdef\my@VersoEmblem{{\headfont #1}} \gdef\my@RectoEmblem{{\headfont #2}} } +\NDB{3.12 in novel-LayoutSettings.sty.} \let\SetEmblem\SetEmblems% for convenience % If you want something fancier than \thepage: \gdef\SetPageNumberStyle#1{\gdef\pagenumberstyle{#1}} -\AtBeginDocument{ - \ifcsname pagenumberstyle\endcsname\else - \SetPageNumberStyle{\thepage} - \fi -} + +% See novel.cls for the accompanying AtBeginDocument routine. + +\NDB{3.13 in novel-LayoutSettings.sty.} % \newif \if@gotHeader \newif \if@gotFooter @@ -259,6 +279,7 @@ \newif \if@validHF % \gdef\@reserveHFspace{ % used for layout calculations + \NDB{3.14.1 in novel-LayoutSettings.sty.} \ifthenelse{\equal{\my@HeadFootStyle}{0}}{ \@gotHeaderfalse\@gotFooterfalse\@validHFtrue }{} @@ -286,51 +307,22 @@ {\string\SetHeadFootStyle\space needs choice of 0,1,2,3,4,5,6,^^J% even if you wish to customize using fancyhdr syntax.^^J}% \fi + \NDB{3.14.2 in novel-LayoutSettings.sty.} } % end \@reserveHFspace % Each new chapter generally has its own header/footer style. This allows a % default setting when chapters begin with ChapterStart environment: \gdef\SetChapterStart#1{\gdef\@setchapterstart{#1}} \SetChapterStart{footer} % default -\AtBeginDocument{% check if user wrote good command or not - \def\@setchapterstartOK{false}% - \ifthenelse{\equal{\@setchapterstart}{empty}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{plain}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{footer}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{fancyplain}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{fancy}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{forcenumber}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{dropfolio}}{% no footnote there - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{dropfoliolater}}{% footnote(s) there - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstart}{foliobeneath}}{% - \def\@setchapterstartOK{true}% - }{}% - \ifthenelse{\equal{\@setchapterstartOK}{true}}{}{% - \ClassError{novel}{\string\SetChapterStart\space bad argument}% - {\string\SetChapterStart\space only allows certain choices.^^J}% - }% -} +\NDB{3.15 in novel-LayoutSettings.sty.} +% +% See novel.cls for the accompanying AtBeginDocument routine. % %% End reserve space for header/footer and set default ChapterStart %% New in version 1.2: cover image. \newcommand\SetCoverImage[1]{ + \NDB{3.17.0 in novel-LayoutSettings.sty.} \def\coverimageok{false} \IfSubStr{#1}{jpg}{\def\coverimageok{true}}{} \IfSubStr{#1}{jpeg}{\def\coverimageok{true}}{} @@ -342,6 +334,7 @@ \ClassError{novel}{Cover image has wrong file extension}% {Cover image must be jpg, JPG, jpeg, or JPEG.} }% + \NDB{3.17.1 in novel-LayoutSettings.sty.} } %% @@ -358,6 +351,7 @@ % dagger, dbldagger, and section (when used as footnote markers) % are always partially faked. \newcommand\SetMarkerStyle[2][real]{ + \NDB{3.18.0 in novel-LayoutSettings.sty.} \def\@goodfnm{no} \ifthenelse{\equal{#2}{asterisk}}{% \def\@goodfnm{yes}\global\toggletrue{@usesymbolmark}% @@ -376,6 +370,7 @@ \ClassError{novel}{Bad choice for \string\SetMarkers}% {Optional: real, fake. Required: asterisk, dagger, number.}% }{} + \NDB{3.18.1 in novel-LayoutSettings.sty.} } % \SetMarkerStyle[real]{asterisk} % default @@ -394,6 +389,8 @@ \SetCropmarkGap{0.125in} % default %% +\NDB{3.19 in novel-LayoutSettings.sty.} + %% Fake \microtypesetup until package is loaded later: \newif \if@setmicrotype @@ -403,7 +400,7 @@ } %% - +\NDB{3.20 in novel-LayoutSettings.sty.} %% MISCELLANOUS SETTINGS. Mostly remove "glue". Best to leave as-is. @@ -467,12 +464,14 @@ % %% End miscellaneous settings. +\NDB{3.21 in novel-LayoutSettings.sty.} % 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{% + \NDB{3.22.0 in novel-LayoutSettings.sty.} \def\@featuresareok{yes} \IfSubStr{#1}{Color}{\def\@featuresareok{no}}{}% \IfSubStr{#1}{Colour}{\def\@featuresareok{no}}{}% @@ -485,6 +484,7 @@ {You defined a font, or added a font feature, with Color or Opacity.^^J% That is disallowed in `novel' class.}% } + \NDB{3.22.1 in novel-LayoutSettings.sty.} } %% @@ -520,6 +520,7 @@ \newif \if@parentfontset \gdef\@parentfontfeatures{} \gdef\@parentfontname{} +\NDB{3.23 in novel-LayoutSettings.sty.} \DeclareDocumentCommand \SetParentFont { O{} m O{} } {% from version 1.1. \novel@checkfeatures{#1,#3} \gdef\@parentfontfeatures{#1,#3} @@ -532,6 +533,7 @@ \gdef\@parentfontname{#2} \global\@parentfontsettrue }% +\NDB{3.24 in novel-LayoutSettings.sty.} %% Store settings for the chapterfont: % The chapter font is used by the \ChapterTitle{} command. \newif \if@chapterfontset @@ -580,6 +582,7 @@ \global\@gotdecotrue \newfontface\decofont[#1,#3]{#2} }% +\NDB{3.25 in novel-LayoutSettings.sty.} % \msg_set:nnnn {fontspec} {font-not-found} { % rewrites the standard message Font~ "#1"~ cannot~ be~ found. @@ -589,6 +592,7 @@ If~the~missing~font~is~anything~else,~then~the~missing~font~is\\ not~caused~by~`novel'~class.\\ }% +\NDB{3.26 in novel-LayoutSettings.sty.} %% For syntax consistency: \cs_new_eq:NN \NewFontFamily \newfontfamily \cs_new_eq:NN \NewFontFace \newfontface @@ -598,6 +602,7 @@ \cs_new_eq:NN \AddFontFeatures \addfontfeatures \cs_new_eq:NN \AddFontFeature \addfontfeatures %% +\NDB{3.27 in novel-LayoutSettings.sty.} %% \CreateFontFeature{substitutions}{feature code} % 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. @@ -639,7 +644,7 @@ %% %% end definition of parent and other fonts. - +\NDB{3.29 in novel-LayoutSettings.sty.} %% FAKE POLYGLOSSIA COMMANDS %% -------------------------------------------------------------------------- @@ -675,7 +680,7 @@ % %% end fake polyglossia commands. - +\NDB{3.30 in novel-LayoutSettings.sty.} %% FRONTMATTER, MAINMATTER, BACKMATTER %% -------------------------------------------------------------------------- @@ -685,8 +690,10 @@ \newif \ifWithinBackmatter \WithinBackmatterfalse \newcounter{frontmatterpages} \newcounter{runningpages} -\AtBeginShipout{\stepcounter{runningpages}} % +% See novel.cls for the AtBeginShipout routine. +% +\NDB{3.32 in novel-LayoutSettings.sty.} \def\frontmatter{ % starts page count and frontmatter count at 1. \ifWithinFrontmatter \ClassError{novel}{\string\frontmatter\ used more than once}% @@ -708,6 +715,7 @@ \setcounter{page}{1} \setcounter{frontmatterpages}{1} } +\NDB{3.33 in novel-LayoutSettings.sty.} % \def\mainmatter{ % restarts page to 1, arabic numbers; freeze frontpagecount \ifWithinMainmatter @@ -725,6 +733,7 @@ \pagenumbering{arabic} \setcounter{page}{1} } +\NDB{3.34 in novel-LayoutSettings.sty.} % \def\backmatter{\@ifstar\@backmatterst\@backmatterns} % @@ -760,6 +769,7 @@ \fi \WithinFrontmatterfalse\WithinMainmatterfalse\WithinBackmattertrue } +\NDB{3.35 in novel-LayoutSettings.sty.} % \def\Backmatter{\@ifstar\@Backmatterst\@Backmatterns} % @@ -799,7 +809,7 @@ } % %% end frontmatter, mainmatter, backmatter. - +\NDB{3.36 in novel-LayoutSettings.sty.} %% DISABLE OR NEUTRALIZE SOME STANDARD LATEX COMMANDS @@ -845,7 +855,7 @@ \long\gdef\listoffigures\@nodocommand{listoffigures} % %% end disable or neutralize. - +\NDB{3.37 in novel-LayoutSettings.sty.} %% |