diff options
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex')
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/commands.h | 3 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/commands.w | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/linebreak.w | 7 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/maincontrol.w | 11 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/mlist.w | 2 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/postlinebreak.w | 6 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/printing.w | 10 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texnodes.h | 9 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/texnodes.w | 4 | ||||
-rw-r--r-- | Build/source/texk/web2c/luatexdir/tex/textoken.w | 34 |
10 files changed, 47 insertions, 41 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/commands.h b/Build/source/texk/web2c/luatexdir/tex/commands.h index d2a7779a0e1..60bfef895d2 100644 --- a/Build/source/texk/web2c/luatexdir/tex/commands.h +++ b/Build/source/texk/web2c/luatexdir/tex/commands.h @@ -327,13 +327,10 @@ typedef enum { expand_font_code, } normal_codes; -# define explicit 1 -# define acc_kern 2 # define lp_code_base 2 # define rp_code_base 3 # define ef_code_base 4 # define tag_code 5 -# define auto_kern explicit # define no_lig_code 6 # define immediate_code 4 /* command modifier for \.{\\immediate} */ diff --git a/Build/source/texk/web2c/luatexdir/tex/commands.w b/Build/source/texk/web2c/luatexdir/tex/commands.w index 125b203a341..53497af528c 100644 --- a/Build/source/texk/web2c/luatexdir/tex/commands.w +++ b/Build/source/texk/web2c/luatexdir/tex/commands.w @@ -405,7 +405,7 @@ void initialize_commands(void) primitive_tex("vss", vskip_cmd, ss_code, 0); primitive_tex("vfilneg", vskip_cmd, fil_neg_code, 0); primitive_tex("mskip", mskip_cmd, mskip_code, 0); - primitive_tex("kern", kern_cmd, explicit, 0); + primitive_tex("kern", kern_cmd, explicit_kern, 0); primitive_tex("mkern", mkern_cmd, mu_glue, 0); primitive_tex("moveleft", hmove_cmd, 1, 0); primitive_tex("moveright", hmove_cmd, 0, 0); diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.w b/Build/source/texk/web2c/luatexdir/tex/linebreak.w index 28ab6fa5586..b2909606d48 100644 --- a/Build/source/texk/web2c/luatexdir/tex/linebreak.w +++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.w @@ -913,7 +913,7 @@ static void compute_break_width(int break_type, int line_break_dir, int adjust_s case penalty_node: break; case kern_node: - if (subtype(s) != explicit) + if (subtype(s) != explicit_kern && subtype(s) != italic_kern) return; else break_width[1] -= width(s); @@ -1866,7 +1866,8 @@ void ext_do_line_break(int paragraph_dir, if (prev_p != temp_head && ( is_char_node(prev_p) || precedes_break(prev_p) - || ((type(prev_p) == kern_node) && (subtype(prev_p) != explicit)) + || ((type(prev_p) == kern_node) && (subtype(prev_p) != explicit_kern && + subtype(prev_p) != italic_kern )) )) { ext_try_break(0, unhyphenated_node, line_break_dir, adjust_spacing, par_shape_ptr, adj_demerits, @@ -1889,7 +1890,7 @@ void ext_do_line_break(int paragraph_dir, /* end mathskip code */ break; case kern_node: - if (subtype(cur_p) == explicit) { + if (subtype(cur_p) == explicit_kern || subtype(cur_p) == italic_kern) { kern_break(); } else { active_width[1] += width(cur_p); diff --git a/Build/source/texk/web2c/luatexdir/tex/maincontrol.w b/Build/source/texk/web2c/luatexdir/tex/maincontrol.w index c6b30b09921..ff7e7279a07 100644 --- a/Build/source/texk/web2c/luatexdir/tex/maincontrol.w +++ b/Build/source/texk/web2c/luatexdir/tex/maincontrol.w @@ -25,13 +25,10 @@ /* these will move to equivalents.h */ @ @c -#define explicit 1 -#define acc_kern 2 #define lp_code_base 2 #define rp_code_base 3 #define ef_code_base 4 #define tag_code 5 -#define auto_kern explicit #define no_lig_code 6 #define gp_code_base 7 @@ -505,7 +502,7 @@ static void run_par_end_hmode (void) { @ @c static void append_italic_correction_mmode (void) { - tail_append(new_kern(0)); + tail_append(new_kern(0)); /* what subtype to use */ } @ @c @@ -1810,7 +1807,7 @@ void append_italic_correction(void) return; f = font(p); tail_append(new_kern(char_italic(f, character(p)))); - subtype(tail) = explicit; + subtype(tail) = italic_kern; } } @@ -2035,11 +2032,11 @@ void make_accent(void) } delta = round(float_cast(w - a) / float_constant(2) + h * t - x * s); /* real multiplication */ r = new_kern(delta); - subtype(r) = acc_kern; + subtype(r) = accent_kern; couple_nodes(tail, r); couple_nodes(r, p); tail = new_kern(-a - delta); - subtype(tail) = acc_kern; + subtype(tail) = accent_kern; couple_nodes(p, tail); p = q; diff --git a/Build/source/texk/web2c/luatexdir/tex/mlist.w b/Build/source/texk/web2c/luatexdir/tex/mlist.w index 035ef6340dd..fbded284414 100644 --- a/Build/source/texk/web2c/luatexdir/tex/mlist.w +++ b/Build/source/texk/web2c/luatexdir/tex/mlist.w @@ -1567,7 +1567,7 @@ static void math_kern(pointer p, scaled m) f = f + unity; } width(p) = mu_mult(width(p)); - subtype(p) = explicit; + subtype(p) = italic_kern; } } diff --git a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w index 873eaf96856..b78b599aac6 100644 --- a/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w +++ b/Build/source/texk/web2c/luatexdir/tex/postlinebreak.w @@ -174,7 +174,7 @@ void ext_post_line_break(int paragraph_dir, break; } else if (non_discardable(q)) { break; - } else if (type(q) == kern_node && subtype(q) != explicit) { + } else if (type(q) == kern_node && subtype(q) != explicit_kern && subtype(q) != italic_kern) { break; } q = vlink(q); @@ -559,7 +559,7 @@ void ext_post_line_break(int paragraph_dir, if (q == cur_break(cur_p) || is_char_node(q)) break; if (!((type(q) == local_par_node))) { - if (non_discardable(q) || (type(q) == kern_node && subtype(q) != explicit)) + if (non_discardable(q) || (type(q) == kern_node && subtype(q) != explicit_kern && subtype(q) != italic_kern)) break; } */ @@ -581,7 +581,7 @@ void ext_post_line_break(int paragraph_dir, /* weird, in the middle somewhere */ } else if (non_discardable(q)) { break; - } else if (type(q) == kern_node && subtype(q) != explicit) { + } else if (type(q) == kern_node && subtype(q) != explicit_kern && subtype(q) != italic_kern) { break; } r = q; diff --git a/Build/source/texk/web2c/luatexdir/tex/printing.w b/Build/source/texk/web2c/luatexdir/tex/printing.w index baafa24a8af..478d55f88ba 100644 --- a/Build/source/texk/web2c/luatexdir/tex/printing.w +++ b/Build/source/texk/web2c/luatexdir/tex/printing.w @@ -987,11 +987,13 @@ void short_display_n(int p, int m) print(character(p)); } } else { - if ((type(p) == glue_node) || - (type(p) == disc_node) || - (type(p) == penalty_node) || - ((type(p) == kern_node) && (subtype(p) == explicit))) + if ( (type(p) == glue_node) || + (type(p) == disc_node) || + (type(p) == penalty_node) || + ((type(p) == kern_node) && (subtype(p) == explicit_kern || + subtype(p) == italic_kern ))) { incr(i); + } if (i >= m) return; if (type(p) == disc_node) { diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.h b/Build/source/texk/web2c/luatexdir/tex/texnodes.h index 618902b58fd..d5198b92f03 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texnodes.h +++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.h @@ -177,9 +177,14 @@ typedef enum { # define tlink_post_break(a) tlink(post_break_head(a)) # define tlink_no_break(a) tlink(no_break_head(a)) +typedef enum { + font_kern = 0, + explicit_kern, /* |subtype| of kern nodes from \.{\\kern} and \.{\\/} */ + accent_kern, /* |subtype| of kern nodes from accents */ + italic_kern, +} kern_subtypes; + # define kern_node_size 5 -# define explicit 1 /* |subtype| of kern nodes from \.{\\kern} and \.{\\/} */ -# define acc_kern 2 /* |subtype| of kern nodes from accents */ # define ex_kern(a) vinfo((a)+3) /* expansion factor (hz) */ # define synctex_tag_kern(a) vinfo((a)+4) # define synctex_line_kern(a) vlink((a)+4) diff --git a/Build/source/texk/web2c/luatexdir/tex/texnodes.w b/Build/source/texk/web2c/luatexdir/tex/texnodes.w index 0e0c92676e9..de718139923 100644 --- a/Build/source/texk/web2c/luatexdir/tex/texnodes.w +++ b/Build/source/texk/web2c/luatexdir/tex/texnodes.w @@ -280,7 +280,7 @@ const char *node_subtypes_penalty[] = { "userpenalty", NULL }; const char *node_subtypes_kern[] = { - "fontkern", "userkern", "accentkern", NULL + "fontkern", "userkern", "accentkern", "italiccorrection", NULL }; const char *node_subtypes_rule[] = { "normal", "box", "image", "empty", "user", NULL @@ -3092,7 +3092,7 @@ void show_node_list(int p) if (subtype(p) != normal) print_char(' '); print_scaled(width(p)); - if (subtype(p) == acc_kern) + if (subtype(p) == accent_kern) tprint(" (for accent)"); } else { tprint_esc("mkern"); diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.w b/Build/source/texk/web2c/luatexdir/tex/textoken.w index 4b14b6ec9fe..5b10b1cdd2d 100644 --- a/Build/source/texk/web2c/luatexdir/tex/textoken.w +++ b/Build/source/texk/web2c/luatexdir/tex/textoken.w @@ -238,6 +238,10 @@ including the expansion of a macro or mark. @c void print_meaning(void) { + if (cur_cmd == math_char_num_cmd && cur_chr == 0) { + /* \mathchar -> \Umathchar */ + cur_chr = 1 ; + } print_cmd_chr((quarterword) cur_cmd, cur_chr); if (cur_cmd >= call_cmd) { print_char(':'); @@ -249,21 +253,21 @@ void print_meaning(void) print_char(':'); print_ln(); switch (cur_chr) { - case first_mark_code: - token_show(first_mark(0)); - break; - case bot_mark_code: - token_show(bot_mark(0)); - break; - case split_first_mark_code: - token_show(split_first_mark(0)); - break; - case split_bot_mark_code: - token_show(split_bot_mark(0)); - break; - default: - token_show(top_mark(0)); - break; + case first_mark_code: + token_show(first_mark(0)); + break; + case bot_mark_code: + token_show(bot_mark(0)); + break; + case split_first_mark_code: + token_show(split_first_mark(0)); + break; + case split_bot_mark_code: + token_show(split_bot_mark(0)); + break; + default: + token_show(top_mark(0)); + break; } } } |