summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-07-26 21:58:43 +0000
committerKarl Berry <karl@freefriends.org>2017-07-26 21:58:43 +0000
commitd5785b4034a2c404bc7352b6a86d374d41d8ddf6 (patch)
treea64ea7b720e221c3355139b2172539eba7086b49 /Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
parent4012bd90fbd113c5ba63274dc31f2680e490bc9e (diff)
novel (26jul17)
git-svn-id: svn://tug.org/texlive/trunk@44894 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty')
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty73
1 files changed, 38 insertions, 35 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty b/Master/texmf-dist/tex/lualatex/novel/novel-HeadFootStyles.sty
index 9bffbcc1179..19492dc93fc 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/05/04 v1.2 LaTeX file (header and footer styles)]
+[2017/07/26 v1.32 LaTeX file (header and footer styles)]
%%
@@ -50,9 +50,10 @@
\renewcommand\footrulewidth{0pt}
\fancyhead[LO,RE,LE,RO,CE,CO]{}
\fancyfoot[LO,RE,LE,RO,CE,CO]{}
-% \textls looseness factor (microtype) 0=tight, 50=default
+% \SetLooseHead looseness factor (microtype) 0=tight, 50=default
\gdef\SetLooseHead#1{
- \gdef\@loosehead{#1}
+ \gdef\@@loosehead{#1}
+ \FPdiv{\@loosehead}{\@@loosehead}{10} % change in method of using fontspec with microtype
\FPmin{\@looseheadnum}{\@loosehead}{50} % Don't want numbers too loose.
}
\SetLooseHead{50}
@@ -144,7 +145,6 @@
%% End initialize fancyhdr.
-
%% ACTIVATE HEADER/FOOTER STYLES AT BEGIN DOCUMENT
%% -----------------------------------------------------------------------------
%
@@ -153,10 +153,10 @@
% \versoheadtext is initialized to \theauthor
% \rectoheadtext is initialized to \thetitle
\@ifundefined{versoheadtext}{
- \NewVersoHeadText{\smcp{\StrSubstitute{\theauthor}{\space}{~}}}
+ \NewVersoHeadText{\smcp{\StrSubstitute{\theauthor}{\space}{ \,}}}
}{}
\@ifundefined{rectoheadtext}{
- \NewRectoHeadText{\smcp{\StrSubstitute{\thetitle}{\space}{~}}}
+ \NewRectoHeadText{\smcp{\StrSubstitute{\thetitle}{\space}{ \,}}}
}{}
%
% ----------------------------------------------------------------------------
@@ -167,31 +167,31 @@
\ifthenelse{\equal{\my@HeadFootStyle}{1}}{ % default
\if@styledHeader\else
\fancyhead[LE]{\makebox[2.5em][l]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}\my@VersoEmblem%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}\my@VersoEmblem%
}
\fancyhead[RO]{\my@RectoEmblem\makebox[2.5em][r]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}%
}
- \fancyhead[CE]{{\headfont\textls[\@loosehead]{\versoheadtext}}}
- \fancyhead[CO]{{\headfont\textls[\@loosehead]{\rectoheadtext}}}
+ \fancyhead[CE]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\versoheadtext}}}
+ \fancyhead[CO]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\rectoheadtext}}}
\fi
}{}
%
\ifthenelse{\equal{\my@HeadFootStyle}{2}}{
\if@styledFooter\else
\fancyfoot[LE]{\makebox[2.5em][l]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}\my@VersoEmblem%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}\my@VersoEmblem%
}
\fancyfoot[RO]{\my@RectoEmblem\makebox[2.5em][r]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@loosehead}\pagenumberstyle}}}%
}
\fi
}{}
%
\ifthenelse{\equal{\my@HeadFootStyle}{3}}{
\if@styledFooter\else
- \fancyfoot[CO,CE]{{%
- \headfont\textls[\@looseheadnum]{\pagenumberstyle}}%
+ \fancyfoot[CO,CE]{%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}%
}
\fi
}{}
@@ -199,25 +199,25 @@
\ifthenelse{\equal{\my@HeadFootStyle}{4}}{
\if@styledHeader\else
\fancyhead[LE]{\makebox[2.5em][l]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}%
\my@VersoEmblem\hspace{1em}%
- {\headfont\textls[\@loosehead]{\versoheadtext}}%
+ {\headfont{\addfontfeature{LetterSpace=\@loosehead}\versoheadtext}}%
}
- \fancyhead[RO]{{\headfont\textls[\@loosehead]{\rectoheadtext}}%
+ \fancyhead[RO]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\rectoheadtext}}%
\hspace{1em}\my@RectoEmblem\makebox[2.5em][r]{{%
- \headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ \headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}%
}
\fi
}{}
%
\ifthenelse{\equal{\my@HeadFootStyle}{5}}{
\if@styledHeader\else
- \fancyhead[CE]{{\headfont\textls[\@loosehead]{\versoheadtext}}}
- \fancyhead[CO]{{\headfont\textls[\@loosehead]{\rectoheadtext}}}
+ \fancyhead[CE]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\versoheadtext}}}
+ \fancyhead[CO]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\rectoheadtext}}}
\fi
\if@styledFooter\else
\fancyfoot[CO,CE]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}%
}
\fi
}{}
@@ -225,16 +225,18 @@
\ifthenelse{\equal{\my@HeadFootStyle}{6}}{
\if@styledHeader\else
\fancyhead[LE]{\makebox[2.5em][l]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}\my@VersoEmblem%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}\my@VersoEmblem%
}
\fancyhead[RO]{\my@RectoEmblem\makebox[2.5em][r]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}%
}
- \fancyhead[RE]{{\headfont\textls[\@loosehead]{\versoheadtext}}}
- \fancyhead[LO]{{\headfont\textls[\@loosehead]{\rectoheadtext}}}
+ \fancyhead[RE]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\versoheadtext}}}
+ \fancyhead[LO]{{\headfont{\addfontfeature{LetterSpace=\@loosehead}\rectoheadtext}}}
\fi
}{}
%
+
+ %
% END PRE-DEFINED STYLES.
% ----------------------------------------------------------------------------
%
@@ -244,7 +246,7 @@
\renewcommand\footrulewidth{0pt}
\fancyhead[LO,RE,LE,RO,CE,CO]{}
\fancyfoot[LO,RE,LE,RO,CE,CO]{}
- \fancyfoot[CO,CE]{{\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}
+ \fancyfoot[CO,CE]{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}
}
% Not a user command, use plain or fancyplain:
\fancypagestyle{fancynumber}{ % if has header but not footer
@@ -252,10 +254,10 @@
\renewcommand\footrulewidth{0pt}
\fancyhead[LO,RE,LE,RO,CE,CO]{}
\fancyhead[LE]{\makebox[2.5em][l]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}\my@VersoEmblem%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}\my@VersoEmblem%
}
\fancyhead[RO]{\my@RectoEmblem\makebox[2.5em][r]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}%
}
\fancyfoot[LO,RE,LE,RO,CE,CO]{}
}
@@ -267,7 +269,6 @@
%% end initialize fancyhdr
-
%% DROPFOLIO
%% -----------------------------------------------------------------------------
\newlength\temp@pgnumwidth
@@ -278,7 +279,7 @@
\newcommand\@dropfolioinside{%
\enlargethispage{-\nbs}%
\setlength\temp@pgnumwidth{%
- \widthof{{\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}%
+ \widthof{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}%
\if@offcenterTrim%
\setlength\temp@pgnumraise{%
\New@BottomMargin+\New@MediaHeight-\New@TrimHeight}%
@@ -290,22 +291,23 @@
\if@isVerso%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@OutsideMargin+0.5\textwidth-0.5\temp@pgnumwidth}\raisebox{%
- \temp@pgnumraise}{{\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}}%
+ \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\else%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@InsideMargin-0.5\temp@pgnumwidth}%
\charscale[1,0.5\textwidth,\temp@pgnumraise]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\fi%
} % end \@dropfolioinside
%
\let\dropfolionow\relax % compatibility with earlier version.
%
+
% \@dropfoliobeneath does not change the textblock height. The styled page
% number is centered where an extra line would be, within the bottom margin.
\newcommand\@dropfoliobeneath{%
\setlength\temp@pgnumwidth{%
- \widthof{{\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}%
+ \widthof{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}%
\if@offcenterTrim%
\setlength\temp@pgnumraise{%
\New@BottomMargin-\nbs+\New@MediaHeight-\New@TrimHeight}%
@@ -317,16 +319,17 @@
\if@isVerso%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@OutsideMargin-0.5\temp@pgnumwidth}\raisebox{%
- \temp@pgnumraise}{{\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}}%
+ \temp@pgnumraise}{{\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\else%
\AddToShipoutPicture*{\@getPageXY\AtPageLowerLeft{%
\hspace{\dimexpr\Trim@Lx+\New@InsideMargin-0.5\temp@pgnumwidth}%
\charscale[1,0.5\textwidth,\temp@pgnumraise]{%
- {\headfont\textls[\@looseheadnum]{\pagenumberstyle}}}}}%
+ {\headfont{\addfontfeature{LetterSpace=\@looseheadnum}\pagenumberstyle}}}}}%
\fi%
} % end \@dropfoliobeneath
%%
%
+
% Content of header text (if present) can be changed at any time within
% the body, using the following commands. If not used, then
% Verso is initialized to \theauthor and Recto is initialized to \thetitle