summaryrefslogtreecommitdiff
path: root/Build/source/texk/web2c/luatexdir/tex
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/texk/web2c/luatexdir/tex')
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/dumpdata.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/equivalents.h4
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/linebreak.w9
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/scanning.w41
-rw-r--r--Build/source/texk/web2c/luatexdir/tex/textoken.w66
5 files changed, 74 insertions, 48 deletions
diff --git a/Build/source/texk/web2c/luatexdir/tex/dumpdata.w b/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
index c2fba1934c7..ac4f96f2f0e 100644
--- a/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
+++ b/Build/source/texk/web2c/luatexdir/tex/dumpdata.w
@@ -27,7 +27,7 @@
/* we start with 907: the sum of the values of the bytes of "don knuth" */
-#define FORMAT_ID (907+12)
+#define FORMAT_ID (907+13)
#if ((FORMAT_ID>=0) && (FORMAT_ID<=256))
#error Wrong value for FORMAT_ID.
#endif
diff --git a/Build/source/texk/web2c/luatexdir/tex/equivalents.h b/Build/source/texk/web2c/luatexdir/tex/equivalents.h
index cc74fa829a1..ba4b4042859 100644
--- a/Build/source/texk/web2c/luatexdir/tex/equivalents.h
+++ b/Build/source/texk/web2c/luatexdir/tex/equivalents.h
@@ -287,9 +287,9 @@ the |number_regs| \.{\\dimen} registers.
# define mathoption_int_last (int_base+99)
# define backend_int_base (int_base+100)
-# define backend_int_last (int_base+119)
+# define backend_int_last (int_base+124)
-# define tex_int_pars (120) /* total number of integer parameters */
+# define tex_int_pars (125) /* total number of integer parameters */
# define page_direction_code (tex_int_pars)
# define body_direction_code (tex_int_pars+1)
diff --git a/Build/source/texk/web2c/luatexdir/tex/linebreak.w b/Build/source/texk/web2c/luatexdir/tex/linebreak.w
index 58afdb8e535..6560192da93 100644
--- a/Build/source/texk/web2c/luatexdir/tex/linebreak.w
+++ b/Build/source/texk/web2c/luatexdir/tex/linebreak.w
@@ -352,6 +352,10 @@ static boolean check_expand_pars(internal_font_number f)
l = pop_node(); /* don't visit this node again */
run = false;
}
+if ((vlink(l) != null) && (type(l) == boundary_node) && ((subtype(l) == 1) || (subtype(l) == 3))) {
+ /* skip next node */
+ l = vlink(l);
+}
if (vlink(l) != null) {
l = vlink(l);
} else if (hlist_stack_level == 0) {
@@ -392,8 +396,11 @@ static boolean check_expand_pars(internal_font_number f)
l = pop_node();
}
if ((r != l) && (r != null)) {
+if ((alink(r) != null) && (type(r) == boundary_node) && ((subtype(r) == 2) || (subtype(r) == 3))) {
+ /* skip next node */
+ r = alink(r);
+}
if (alink(r) != null) {
- assert(vlink(alink(r)) == r);
r = alink(r);
} else { /* this is the input: \.{\\leavevmode\\penalty-10000\\penalty-10000} (bug \#268) */
run = false;
diff --git a/Build/source/texk/web2c/luatexdir/tex/scanning.w b/Build/source/texk/web2c/luatexdir/tex/scanning.w
index 99e9ca5e893..90499e8b4e5 100644
--- a/Build/source/texk/web2c/luatexdir/tex/scanning.w
+++ b/Build/source/texk/web2c/luatexdir/tex/scanning.w
@@ -1477,13 +1477,11 @@ most of the work has already been done.
@c
void scan_glue(int level)
-{ /* sets |cur_val| to a glue spec pointer */
- boolean negative; /* should the answer be negated? */
- halfword q; /* new glue specification */
- boolean mu; /* does |level=mu_val|? */
- mu = (level == mu_val_level);
- /* Get the next non-blank non-sign... */
- negative = false;
+{
+ boolean negative = false; /* should the answer be negated? */
+ halfword q = null; /* new glue specification */
+ boolean mu = (level == mu_val_level); /* does |level=mu_val|? */
+ /* Get the next non-blank non-sign ... */
do {
/* Get the next non-blank non-call token */
do {
@@ -1494,7 +1492,6 @@ void scan_glue(int level)
cur_tok = other_token + '+';
}
} while (cur_tok == other_token + '+');
-
if ((cur_cmd >= min_internal_cmd) && (cur_cmd <= max_internal_cmd)) {
scan_something_internal(level, negative);
if (cur_val_level >= glue_val_level) {
@@ -1512,20 +1509,40 @@ void scan_glue(int level)
if (negative)
negate(cur_val);
}
- /* Create a new glue specification whose width is |cur_val|; scan for its
- stretch and shrink components */
- q = new_spec(zero_glue);
- width(q) = cur_val;
+ /*
+ Create a new glue specification whose width is |cur_val|; scan for its
+ stretch and shrink components.
+ */
+ /*
+ In several places there is a test for zero glue, for instance in protrusion
+ left/right node detection. In that case a \hskip\dimen<n> with the dimen being
+ zero will not be seen as zero glue. Therefore we delay the allocation of
+ glue till we know for sure that there are no fils involved. (!!)
+ */
+ if (cur_val != 0) { /* !! new test */
+ q = new_spec(zero_glue);
+ width(q) = cur_val;
+ }
if (scan_keyword("plus")) {
+ if (q == null) { /* !! new test */
+ q = new_spec(zero_glue);
+ }
scan_dimen(mu, true, false);
stretch(q) = cur_val;
stretch_order(q) = (quarterword) cur_order;
}
if (scan_keyword("minus")) {
+ if (q == null) { /* !! new test */
+ q = new_spec(zero_glue);
+ }
scan_dimen(mu, true, false);
shrink(q) = cur_val;
shrink_order(q) = (quarterword) cur_order;
}
+ if (q == null) { /* !! new test */
+ q = zero_glue ;
+ add_glue_ref(zero_glue);
+ }
cur_val = q;
}
diff --git a/Build/source/texk/web2c/luatexdir/tex/textoken.w b/Build/source/texk/web2c/luatexdir/tex/textoken.w
index 9ac21635b3a..98889cced7c 100644
--- a/Build/source/texk/web2c/luatexdir/tex/textoken.w
+++ b/Build/source/texk/web2c/luatexdir/tex/textoken.w
@@ -2317,38 +2317,40 @@ static int do_variable_dvi(halfword c)
static int do_variable_pdf(halfword c)
{
- if (scan_keyword("compresslevel")) { do_variable_backend_int(c_pdf_compress_level); }
- else if (scan_keyword("decimaldigits")) { do_variable_backend_int(c_pdf_decimal_digits); }
- else if (scan_keyword("imageresolution")) { do_variable_backend_int(c_pdf_image_resolution); }
- else if (scan_keyword("pkresolution")) { do_variable_backend_int(c_pdf_pk_resolution); }
- else if (scan_keyword("uniqueresname")) { do_variable_backend_int(c_pdf_unique_resname); }
- else if (scan_keyword("minorversion")) { do_variable_backend_int(c_pdf_minor_version); }
- else if (scan_keyword("pagebox")) { do_variable_backend_int(c_pdf_pagebox); }
- else if (scan_keyword("inclusionerrorlevel")) { do_variable_backend_int(c_pdf_inclusion_errorlevel); }
- else if (scan_keyword("ignoreunknownimages")) { do_variable_backend_int(c_pdf_ignore_unknown_images); }
- else if (scan_keyword("gamma")) { do_variable_backend_int(c_pdf_gamma); }
- else if (scan_keyword("imageapplygamma")) { do_variable_backend_int(c_pdf_image_apply_gamma); }
- else if (scan_keyword("imagegamma")) { do_variable_backend_int(c_pdf_image_gamma); }
- else if (scan_keyword("imagehicolor")) { do_variable_backend_int(c_pdf_image_hicolor); }
- else if (scan_keyword("imageaddfilename")) { do_variable_backend_int(c_pdf_image_addfilename); }
- else if (scan_keyword("objcompresslevel")) { do_variable_backend_int(c_pdf_objcompresslevel); }
- else if (scan_keyword("inclusioncopyfonts")) { do_variable_backend_int(c_pdf_inclusion_copy_font); }
- else if (scan_keyword("gentounicode")) { do_variable_backend_int(c_pdf_gen_tounicode); }
- else if (scan_keyword("pkfixeddpi")) { do_variable_backend_int(c_pdf_pk_fixed_dpi); }
-
- else if (scan_keyword("horigin")) { do_variable_backend_dimen(d_pdf_h_origin); }
- else if (scan_keyword("vorigin")) { do_variable_backend_dimen(d_pdf_v_origin); }
- else if (scan_keyword("threadmargin")) { do_variable_backend_dimen(d_pdf_thread_margin); }
- else if (scan_keyword("destmargin")) { do_variable_backend_dimen(d_pdf_dest_margin); }
- else if (scan_keyword("linkmargin")) { do_variable_backend_dimen(d_pdf_link_margin); }
- else if (scan_keyword("xformmargin")) { do_variable_backend_dimen(d_pdf_xform_margin); }
-
- else if (scan_keyword("pageattr")) { do_variable_backend_toks(t_pdf_page_attr); }
- else if (scan_keyword("pageresources")) { do_variable_backend_toks(t_pdf_page_resources); }
- else if (scan_keyword("pagesattr")) { do_variable_backend_toks(t_pdf_pages_attr); }
- else if (scan_keyword("xformattr")) { do_variable_backend_toks(t_pdf_xform_attr); }
- else if (scan_keyword("xformresources")) { do_variable_backend_toks(t_pdf_xform_resources); }
- else if (scan_keyword("pkmode")) { do_variable_backend_toks(t_pdf_pk_mode); }
+ if (scan_keyword("compresslevel")) { do_variable_backend_int(c_pdf_compress_level); }
+ else if (scan_keyword("decimaldigits")) { do_variable_backend_int(c_pdf_decimal_digits); }
+ else if (scan_keyword("imageresolution")) { do_variable_backend_int(c_pdf_image_resolution); }
+ else if (scan_keyword("pkresolution")) { do_variable_backend_int(c_pdf_pk_resolution); }
+ else if (scan_keyword("uniqueresname")) { do_variable_backend_int(c_pdf_unique_resname); }
+ else if (scan_keyword("minorversion")) { do_variable_backend_int(c_pdf_minor_version); }
+ else if (scan_keyword("pagebox")) { do_variable_backend_int(c_pdf_pagebox); }
+ else if (scan_keyword("inclusionerrorlevel")) { do_variable_backend_int(c_pdf_inclusion_errorlevel); }
+ else if (scan_keyword("ignoreunknownimages")) { do_variable_backend_int(c_pdf_ignore_unknown_images); }
+ else if (scan_keyword("gamma")) { do_variable_backend_int(c_pdf_gamma); }
+ else if (scan_keyword("imageapplygamma")) { do_variable_backend_int(c_pdf_image_apply_gamma); }
+ else if (scan_keyword("imagegamma")) { do_variable_backend_int(c_pdf_image_gamma); }
+ else if (scan_keyword("imagehicolor")) { do_variable_backend_int(c_pdf_image_hicolor); }
+ else if (scan_keyword("imageaddfilename")) { do_variable_backend_int(c_pdf_image_addfilename); }
+ else if (scan_keyword("objcompresslevel")) { do_variable_backend_int(c_pdf_objcompresslevel); }
+ else if (scan_keyword("inclusioncopyfonts")) { do_variable_backend_int(c_pdf_inclusion_copy_font); }
+ else if (scan_keyword("gentounicode")) { do_variable_backend_int(c_pdf_gen_tounicode); }
+ else if (scan_keyword("pkfixeddpi")) { do_variable_backend_int(c_pdf_pk_fixed_dpi); }
+ else if (scan_keyword("suppressoptionalinfo")) { do_variable_backend_int(c_pdf_suppress_optional_info); }
+
+ else if (scan_keyword("horigin")) { do_variable_backend_dimen(d_pdf_h_origin); }
+ else if (scan_keyword("vorigin")) { do_variable_backend_dimen(d_pdf_v_origin); }
+ else if (scan_keyword("threadmargin")) { do_variable_backend_dimen(d_pdf_thread_margin); }
+ else if (scan_keyword("destmargin")) { do_variable_backend_dimen(d_pdf_dest_margin); }
+ else if (scan_keyword("linkmargin")) { do_variable_backend_dimen(d_pdf_link_margin); }
+ else if (scan_keyword("xformmargin")) { do_variable_backend_dimen(d_pdf_xform_margin); }
+
+ else if (scan_keyword("pageattr")) { do_variable_backend_toks(t_pdf_page_attr); }
+ else if (scan_keyword("pageresources")) { do_variable_backend_toks(t_pdf_page_resources); }
+ else if (scan_keyword("pagesattr")) { do_variable_backend_toks(t_pdf_pages_attr); }
+ else if (scan_keyword("xformattr")) { do_variable_backend_toks(t_pdf_xform_attr); }
+ else if (scan_keyword("xformresources")) { do_variable_backend_toks(t_pdf_xform_resources); }
+ else if (scan_keyword("pkmode")) { do_variable_backend_toks(t_pdf_pk_mode); }
+ else if (scan_keyword("trailerid")) { do_variable_backend_toks(t_pdf_trailer_id); }
else
return 0;