summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2017-03-28 20:38:16 +0000
committerKarl Berry <karl@freefriends.org>2017-03-28 20:38:16 +0000
commit190b2375d2855a8380b8b941af2903967858bc5f (patch)
tree8622a91c7987a0c82922132f5544193178f84921 /Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
parente5dac69408e1ddde72d24d8f0c96cdd6240cb672 (diff)
novel (28mar17)
git-svn-id: svn://tug.org/texlive/trunk@43632 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/novel/novel-Images.sty')
-rw-r--r--Master/texmf-dist/tex/lualatex/novel/novel-Images.sty27
1 files changed, 16 insertions, 11 deletions
diff --git a/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty b/Master/texmf-dist/tex/lualatex/novel/novel-Images.sty
index 076e968682e..8c1a8dab051 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/03/21 v1.0.9 LaTeX file (image placement)]
+[2017/03/27 v1.0.10 LaTeX file (image placement)]
%%
@@ -124,12 +124,6 @@
\typeout{^^JClass~`novel'~Info:~An~image~was~placed~on~page~\thepage.^^J%
Review~layout~to~ensure~that~it~does~not~overflow~into~margins.^^J}%
}%
- \gdef\@imageheightnum{\strip@pt\@imageheight}%
- \FPdiv{\@imagelines}{\@imageheightnum}{\nbsnum}%
- \FPadd{\@imagelines}{\@imagelines}{0.5}% round up to integer, not down
- \FPround{\@imagelines}{\@imagelines}{0}%
- \FPclip{\@imagelines}{\@imagelines}%
- \iftoggle{@inheadfoot}{}{\gdef\imagelineskip{\@imagelines}}%
%
\setlength\@imagehoffset{\@myilx}%
\IfBeginWith{\@myily}{b}{%
@@ -185,8 +179,12 @@
% be at the baseline grid. Beware of using this command near bottom of page.
\ExplSyntaxOn
\DeclareDocumentCommand \BlockImage { O{c} m +O{} }{
+ \iftoggle{@inheadfoot}{%
+ \ClassError{novel}{Cannot~use~BlockImage~in~header~or~footer}%
+ {Header~footer~allow~InlineImage~but~not~BlockImage.}%
+ }{}%
% Allows empty or blank to be used, and still provide default values:
- \ifthenelse{\equal{#1}{}\OR\equal{#1}{\space}}{%
+ \ifthenelse{\equal{#1}{} \OR \equal{#1}{\space}}{%
\def\@myargs{c}}{\def\@myargs{#1}%
}
\StrDel{\@myargs}{\space}[\@myargsns] % needs {\space} not { }
@@ -200,9 +198,9 @@
}
\newdimen\@sbsheight
\ifthenelse{\equal{\@myalign}{c}\OR\equal{\@myalign}{}}{%
- {\centering\InlineImage*[{\@myx-0.5\imagewidth},{\@myy}]{#2}\par}
- \vspace{-\nbs}
- {\centering #3\par}
+ {\centering\strut\InlineImage*[{\@myx-0.5\imagewidth},{\@myy}]{#2}\par}
+ \vspace*{-\nbs}
+ {\centering\strut #3\par}
\setbox0=\vbox{{\centering #3\par}}
}{}
\ifthenelse{\equal{\@myalign}{r}}{%
@@ -236,6 +234,13 @@
\FPdiv{\@roughlines}{\@sbsheightnum}{\nbsnum}
\FPadd{\@roughlines}{\@roughlines}{0.5} % round up, not down
\FPround{\@roughlines}{\@roughlines}{0}
+
+ \gdef\@imageheightnum{\strip@pt\@imageheight}%
+ \FPdiv{\@imagelines}{\@imageheightnum}{\nbsnum}%
+ \FPadd{\@imagelines}{\@imagelines}{0.5}% round up to integer, not down
+ \FPround{\@imagelines}{\@imagelines}{0}%
+ \FPclip{\@imagelines}{\@imagelines}%
+ \gdef\imagelineskip{\@imagelines}%
\FPclip{\@roughlines}{\@roughlines}
\FPadd{\@adjimagelines}{\imagelineskip}{1} % \imagelineskip from \InlineImage*
\FPsub{\@skipme}{\@adjimagelines}{\@roughlines}