diff options
author | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-11 23:37:11 +0000 |
---|---|---|
committer | Akira Kakuto <kakuto@fuk.kindai.ac.jp> | 2016-01-11 23:37:11 +0000 |
commit | 7420c0c4b7493b152e04f31804bf68e615ef3640 (patch) | |
tree | 41d223d963a5f3f812ce53966ac28206614f109d | |
parent | fa0bec11de440831d4a6869435a36bae6aa332a8 (diff) |
web2c/luatexdir: sync with the upstream
git-svn-id: svn://tug.org/texlive/trunk@39357 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/linebreak.w | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.w b/Build/source/texk/web2c/luatexdir/tex/linebreak.w index 3947abfa6cd..28ab6fa5586 100644 --- a/Build/source/texk/web2c/luatexdir/tex/linebreak.w +++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.w @@ -1846,20 +1846,28 @@ void ext_do_line_break(int paragraph_dir, } /* end mathskip code */ case glue_node: - /* If node |cur_p| is a legal breakpoint, call |try_break|; - then update the active widths by including the glue in - |glue_ptr(cur_p)|; */ - /* When node |cur_p| is a glue node, we look at the previous to - see whether or not a breakpoint is legal at |cur_p|, as - explained above. */ - /* *INDENT-OFF* */ + /* + If node |cur_p| is a legal breakpoint, call |try_break|; + then update the active widths by including the glue in + |glue_ptr(cur_p)|; + + When node |cur_p| is a glue node, we look at the previous + to see whether or not a breakpoint is legal at |cur_p|, + as explained above. + + The |precedes_break| test also considers dir nodes and prohibits + a break after an opening dir_node (positive dir). In |\textdir TRT x| + the space after |TRT| is preserved and therefore the dir node + is bound to the |x|. Being more clever makes no sense: users + should code their input properly. + */ if (auto_breaking) { halfword prev_p = alink(cur_p); - if (prev_p != temp_head && - (is_char_node(prev_p) || - precedes_break(prev_p) || - ((type(prev_p) == kern_node) - && (subtype(prev_p) != explicit)))) { + if (prev_p != temp_head && ( + is_char_node(prev_p) + || precedes_break(prev_p) + || ((type(prev_p) == kern_node) && (subtype(prev_p) != explicit)) + )) { ext_try_break(0, unhyphenated_node, line_break_dir, adjust_spacing, par_shape_ptr, adj_demerits, tracing_paragraphs, protrude_chars, |