summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2024-01-12 21:44:09 +0000
committerKarl Berry <karl@freefriends.org>2024-01-12 21:44:09 +0000
commit8aeda3e1019bc7b0493c228b2c9487b0f3636964 (patch)
treeffdb7ce42bcd441fa284285c5dad973a1bac83ee /Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty
parent723530d054216bcff0653acf3025b8c825910fe2 (diff)
lua-typo (12jan24)
git-svn-id: svn://tug.org/texlive/trunk@69403 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty')
-rw-r--r--Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty35
1 files changed, 20 insertions, 15 deletions
diff --git a/Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty b/Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty
index 92f1c05ba18..e4a008a4ff6 100644
--- a/Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty
+++ b/Master/texmf-dist/tex/lualatex/lua-typo/lua-typo.sty
@@ -11,7 +11,7 @@
%%
\NeedsTeXFormat{LaTeX2e}[2021/06/01]
\ProvidesPackage{lua-typo}
- [2023-09-13 v.0.85 Daniel Flipo]
+ [2024-01-12 v.0.86 Daniel Flipo]
\DeclareRelease{v0.4}{2021-01-01}{lua-typo-2021-04-18.sty}
\DeclareRelease{v0.65}{2023-03-08}{lua-typo-2023-03-08.sty}
\DeclareCurrentRelease{}{2023-09-13}
@@ -506,7 +506,7 @@ local signature = function (node, string, swap)
local c2 = ""
if pre and pre.char then
if pre.components then
- for nn in traverse_id(GLYPH, post.components) do
+ for nn in traverse_id(GLYPH, pre.components) do
c1 = c1 .. utf8.char(nn.char)
end
else
@@ -990,20 +990,22 @@ end
local get_pagebody = function (head)
local textht = tex.getdimen("textheight")
local fn = head.list
- local body = nil
+ local body
repeat
fn = fn.next
until fn.id == VLIST and fn.height > 0
first = fn.list
for n in traverse_id(VLIST,first) do
- if n.subtype == 0 and n.height == textht then
+ if n.subtype == 0 and n.height >= textht-1 and
+ n.height <= textht+8 then
body = n
break
else
- first = n.list
- for n in traverse_id(VLIST,first) do
- if n.subtype == 0 and n.height == textht then
- body = n
+ local ff = n.list
+ for nn in traverse_id(VLIST,ff) do
+ if nn.subtype == 0 and nn.height >= textht-1 and
+ nn.height <= textht+8 then
+ body = nn
break
end
end
@@ -1396,17 +1398,20 @@ check_vtop = function (top, colno, vpos)
return head, done
end
luatypo.check_page = function (head)
- local textwd = tex.getdimen("textwidth")
- local textht = tex.getdimen("textheight")
- local checked, boxed, n2, n3, col, colno
- local body = get_pagebody(head)
local pageno = tex.getcount("c@page")
+ local body = get_pagebody(head)
+ local textwd, textht, checked, boxed
+ local top, first, next
+ local n2, n3, col, colno
local vpos = 0
local footnote = false
- local top = body
- local first = body.list
- local next
local count = 0
+ if body then
+ top = body
+ first = body.list
+ textwd = tex.getdimen("textwidth")
+ textht = tex.getdimen("textheight")
+ end
if ((first and first.id == HLIST and first.subtype == BOX) or
(first and first.id == VLIST and first.subtype == 0)) and
(first.width == textwd and first.height > 0 and not boxed) then