summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/generic/babel/luababel.def
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2021-06-28 20:38:19 +0000
committerKarl Berry <karl@freefriends.org>2021-06-28 20:38:19 +0000
commita977864eac6d306a206d3c4535fe0e397a10ab4a (patch)
treeeef32e46d36c0092e1062db037e8000e4862fc26 /Master/texmf-dist/tex/generic/babel/luababel.def
parent472bc9cb1b41fa04197e7684ac38bb1ea6550ee0 (diff)
babel (28jun21)
git-svn-id: svn://tug.org/texlive/trunk@59740 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/generic/babel/luababel.def')
-rw-r--r--Master/texmf-dist/tex/generic/babel/luababel.def12
1 files changed, 10 insertions, 2 deletions
diff --git a/Master/texmf-dist/tex/generic/babel/luababel.def b/Master/texmf-dist/tex/generic/babel/luababel.def
index 62687deafa9..ca9aef3ac7e 100644
--- a/Master/texmf-dist/tex/generic/babel/luababel.def
+++ b/Master/texmf-dist/tex/generic/babel/luababel.def
@@ -12,6 +12,7 @@
%% any individual authors listed elsewhere in this file.
%% All rights reserved.
%%
+%%
%% This file is part of the Babel system.
%% --------------------------------------
%%
@@ -26,7 +27,6 @@
%% This work has the LPPL maintenance status "maintained".
%%
%% The Current Maintainer of this work is Javier Bezos.
-
%%
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
@@ -558,6 +558,8 @@
Babel.arabic.elong_map[\the\localeid] = {}
luatexbase.add_to_callback('post_linebreak_filter',
Babel.arabic.justify, 'Babel.arabic.justify')
+ luatexbase.add_to_callback('hpack_filter',
+ Babel.arabic.justify_hbox, 'Babel.arabic.justify_hbox')
}}%
\def\bblar@fetchjalt#1#2#3#4{%
\bbl@exp{\\\bbl@foreach{#1}}{%
@@ -629,8 +631,14 @@ function Babel.arabic.justify(head)
end
function Babel.arabic.justify_hbox(head, gc, size, pack)
+ local has_inf = false
if Babel.arabic.justify_enabled and pack == 'exactly' then
- Babel.arabic.justify_hlist(head, nil, gc, size, pack)
+ for n in node.traverse_id(12, head) do
+ if n.stretch_order > 0 then has_inf = true end
+ end
+ if not has_inf then
+ Babel.arabic.justify_hlist(head, nil, gc, size, pack)
+ end
end
return head
end