pdftex[863]

commits+thanh at tug.org commits+thanh at tug.org
Fri Sep 3 21:39:10 CEST 2021


Revision: 863
          http://tug.org/svn/pdftex?view=revision&revision=863
Author:   thanh
Date:     2021-09-03 21:39:10 +0200 (Fri, 03 Sep 2021)
Log Message:
-----------
bugfix: append-kern does not work for explicit hyphen

Modified Paths:
--------------
    branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web

Modified: branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web
===================================================================
--- branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2021-09-03 14:32:12 UTC (rev 862)
+++ branches/stable/source/src/texk/web2c/pdftexdir/pdftex.web	2021-09-03 19:39:10 UTC (rev 863)
@@ -4983,11 +4983,17 @@
 @!shown_mode:-mmode..mmode; {most recent mode shown by \.{\\tracingcommands}}
 @!save_tail: pointer; {save |tail| so we can examine whether we have an auto
                        kern before a glue}
+@!prev_tail: pointer; {value of |tail| before the last call to |tail_append|}
 
 @ Here is a common way to make the current list grow:
 
- at d tail_append(#)==begin link(tail):=#; tail:=link(tail);
+ at d tail_append(#)==begin prev_tail:=tail; link(tail):=#; tail:=link(tail);
   end
+ at d insert_before_tail(#) == begin
+    link(prev_tail) := #;
+    link(#) := tail;
+    prev_tail := #;
+end
 
 @ We will see later that the vertical list at the bottom semantic level is split
 into two parts; the ``current page'' runs from |page_head| to |page_tail|,
@@ -28824,9 +28830,20 @@
 
 @ @<If |tmp_k1| is not null then append that kern@>=
 if tmp_k1 <> null then begin
-    wrapup(rt_hit);
+    wrapup(rt_hit); {Note: |wrapup| might insert a null discretionary}
     save_tail := tail;
-    tail_append(tmp_k1);
+    {insert auto-kern before a null discretionary inserted by |wrapup| if appropriated}
+    if (not is_char_node(tail))
+        and (type(tail) = disc_node)
+        and (replace_count(tail) = 0)
+        and (pre_break(tail) = null)
+        and (post_break(tail) = null)
+        and (link(prev_tail) = tail) then
+    begin
+        insert_before_tail(tmp_k1);
+    end
+    else
+        tail_append(tmp_k1);
     goto main_loop_move;
 end
 



More information about the pdftex-commits mailing list.