summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorHans Hagen <pragma@wxs.nl>2023-05-29 14:53:42 +0200
committerContext Git Mirror Bot <phg@phi-gamma.net>2023-05-29 14:53:42 +0200
commitf9dc65246f5d46583d00db93761929b6c6b5bf20 (patch)
treefc0072c7f9788452cc2b0dc2b729baec9570886c /source
parent1bcb61ec8c01b503740bfeb8cc9d5f62553b3f72 (diff)
downloadcontext-f9dc65246f5d46583d00db93761929b6c6b5bf20.tar.gz
2023-05-29 14:15:00
Diffstat (limited to 'source')
-rw-r--r--source/luametatex/source/lua/lmtnodelib.c98
-rw-r--r--source/luametatex/source/lua/lmtstatuslib.c4
-rw-r--r--source/luametatex/source/lua/lmttokenlib.c2
-rw-r--r--source/luametatex/source/luametatex.h2
-rw-r--r--source/luametatex/source/tex/texadjust.c2
-rw-r--r--source/luametatex/source/tex/texalign.c2
-rw-r--r--source/luametatex/source/tex/texbuildpage.c22
-rw-r--r--source/luametatex/source/tex/texcommands.c4
-rw-r--r--source/luametatex/source/tex/texdumpdata.c2
-rw-r--r--source/luametatex/source/tex/texequivalents.h10
-rw-r--r--source/luametatex/source/tex/texinserts.c2
-rw-r--r--source/luametatex/source/tex/texlinebreak.c27
-rw-r--r--source/luametatex/source/tex/texmainbody.c4
-rw-r--r--source/luametatex/source/tex/texmaincontrol.c2
-rw-r--r--source/luametatex/source/tex/texnesting.c4
-rw-r--r--source/luametatex/source/tex/texpackaging.c10
-rw-r--r--source/luametatex/source/tex/texrules.c2
-rw-r--r--source/luametatex/source/tex/textypes.h8
18 files changed, 113 insertions, 94 deletions
diff --git a/source/luametatex/source/lua/lmtnodelib.c b/source/luametatex/source/lua/lmtnodelib.c
index c9ab9678c..58c3bb0a7 100644
--- a/source/luametatex/source/lua/lmtnodelib.c
+++ b/source/luametatex/source/lua/lmtnodelib.c
@@ -4619,6 +4619,11 @@ static int nodelib_direct_vpack(lua_State *L)
/* node.direct.rangedimensions */
/* node.direct.naturalwidth */
+/* mult sign order firstnode verticalbool */
+/* mult sign order firstnode lastnode verticalbool */
+/* firstnode verticalbool */
+/* firstnode lastnode verticalbool */
+
static int nodelib_direct_dimensions(lua_State *L)
{
int top = lua_gettop(L);
@@ -4632,77 +4637,81 @@ static int nodelib_direct_dimensions(lua_State *L)
halfword n = null;
halfword p = null;
if (top > 3) {
- i += 3;
- g_mult = (glueratio) lua_tonumber(L, 1); /* integer or float */
- g_sign = tex_checked_glue_sign(lmt_tohalfword(L, 2));
- g_order = tex_checked_glue_order(lmt_tohalfword(L, 3));
- }
- n = nodelib_valid_direct_from_index(L, i);
- if (lua_type(L, i + 1) == LUA_TBOOLEAN) {
- vertical = lua_toboolean(L, i + 1);
+ g_mult = (glueratio) lua_tonumber(L, i++);
+ g_sign = tex_checked_glue_sign(lmt_tohalfword(L, i++));
+ g_order = tex_checked_glue_order(lmt_tohalfword(L, i++));
+ }
+ n = nodelib_valid_direct_from_index(L, i++);
+ if (lua_type(L, i) == LUA_TBOOLEAN) {
+ vertical = lua_toboolean(L, i++);
} else {
- p = nodelib_valid_direct_from_index(L, i + 1);
- vertical = lua_toboolean(L, i + 2);
+ p = nodelib_valid_direct_from_index(L, i++);
+ vertical = lua_toboolean(L, i);
}
if (n) {
- if (vertical) {
- siz = tex_natural_vsizes(n, p, g_mult, g_sign, g_order);
- } else {
- siz = tex_natural_hsizes(n, p, g_mult, g_sign, g_order);
- }
+ siz = (vertical ? tex_natural_vsizes : tex_natural_hsizes)(n, p, g_mult, g_sign, g_order);
}
lua_pushinteger(L, siz.wd);
lua_pushinteger(L, siz.ht);
lua_pushinteger(L, siz.dp);
- lua_pushinteger(L, siz.ns);
- return 4;
+ return 3;
} else {
return luaL_error(L, "missing argument to 'dimensions' (direct node expected)");
}
}
-static int nodelib_direct_rangedimensions(lua_State *L) /* parent, first, last */
+/* parentnode firstnode lastnode vertical */
+/* parentnode firstnode vertical */
+/* parentnode firstnode lastnode vertical nsizetoo */
+/* parentnode firstnode vertical nsizetoo */
+
+static int nodelib_direct_rangedimensions(lua_State *L)
{
int top = lua_gettop(L);
if (top > 1) {
scaledwhd siz = { .wd = 0, .ht = 0, .dp = 0, .ns = 0 };
int vertical = 0;
- halfword l = nodelib_valid_direct_from_index(L, 1); /* parent */
- halfword n = nodelib_valid_direct_from_index(L, 2); /* first */
- halfword p = n;
- if (lua_type(L, 3) == LUA_TBOOLEAN) {
- vertical = lua_toboolean(L, 3);
+ int nsizetoo = 0;
+ int index = 1;
+ halfword parent = nodelib_valid_direct_from_index(L, index++);
+ halfword first = nodelib_valid_direct_from_index(L, index++);
+ halfword last = first;
+ if (lua_type(L, index) == LUA_TBOOLEAN) {
+ vertical = lua_toboolean(L, index++);
} else {
- p = nodelib_valid_direct_from_index(L, 3); /* last */
- vertical = lua_toboolean(L, 4);
+ last = nodelib_valid_direct_from_index(L, index++);
+ vertical = lua_toboolean(L, index++);
}
- if (l && n) {
- if (vertical) {
- siz = tex_natural_vsizes(n, p, (glueratio) box_glue_set(l), box_glue_sign(l), box_glue_order(l));
- } else {
- siz = tex_natural_hsizes(n, p, (glueratio) box_glue_set(l), box_glue_sign(l), box_glue_order(l));
- }
+ nsizetoo = lua_toboolean(L, index);
+ if (parent && first) {
+ siz = (vertical ? tex_natural_vsizes : tex_natural_hsizes)(first, last, (glueratio) box_glue_set(parent), box_glue_sign(parent), box_glue_order(parent));
}
lua_pushinteger(L, siz.wd);
lua_pushinteger(L, siz.ht);
lua_pushinteger(L, siz.dp);
- lua_pushinteger(L, siz.ns);
- return 4;
+ if (nsizetoo) {
+ lua_pushinteger(L, siz.ns);
+ return 4;
+ } else {
+ return 3;
+ }
} else {
return luaL_error(L, "missing argument to 'rangedimensions' (2 or more direct nodes expected)");
}
}
-static int nodelib_direct_naturalwidth(lua_State *L) /* parent, first, [last] */
+/* parentnode firstnode [last] */
+
+static int nodelib_direct_naturalwidth(lua_State *L)
{
int top = lua_gettop(L);
if (top > 1) {
scaled wd = 0;
- halfword l = nodelib_valid_direct_from_index(L, 1); /* parent */
- halfword n = nodelib_valid_direct_from_index(L, 2); /* first */
- halfword p = nodelib_valid_direct_from_index(L, 3); /* last */
- if (l && n) {
- wd = tex_natural_width(n, p, (glueratio) box_glue_set(l), box_glue_sign(l), box_glue_order(l));
+ halfword parent = nodelib_valid_direct_from_index(L, 1);
+ halfword first = nodelib_valid_direct_from_index(L, 2);
+ halfword last = nodelib_valid_direct_from_index(L, 3);
+ if (parent && first) {
+ wd = tex_natural_width(first, last, (glueratio) box_glue_set(parent), box_glue_sign(parent), box_glue_order(parent));
}
lua_pushinteger(L, wd);
return 1;
@@ -9093,6 +9102,7 @@ static int nodelib_direct_getnormalizedline(lua_State *L)
halfword sign = box_glue_sign(n);
halfword order = box_glue_order(n);
double glue = box_glue_set(n);
+ int details = lua_toboolean(L, 2);
while (current) {
tail = current ;
if (node_type(current) == glue_node) {
@@ -9166,7 +9176,15 @@ static int nodelib_direct_getnormalizedline(lua_State *L)
lua_push_integer_at_key(L, last, last); /* points to a skip */
lua_push_integer_at_key(L, head, head);
lua_push_integer_at_key(L, tail, tail);
- // lua_push_integer_at_key(L, width, box_width(n));
+ if (details) {
+ scaled ns = tex_natural_hsize(box_list(n), &cs); /* todo: check if cs is the same */
+ lua_push_integer_at_key(L, width, box_width(n));
+ lua_push_integer_at_key(L, height, box_height(n));
+ lua_push_integer_at_key(L, depth, box_depth(n));
+ lua_push_integer_at_key(L, left, ls + lh + pl + il);
+ lua_push_integer_at_key(L, right, rs + rh + pr + ir);
+ lua_push_integer_at_key(L, size, ns);
+ }
return 1;
}
return 0;
diff --git a/source/luametatex/source/lua/lmtstatuslib.c b/source/luametatex/source/lua/lmtstatuslib.c
index 2613115da..921832d8b 100644
--- a/source/luametatex/source/lua/lmtstatuslib.c
+++ b/source/luametatex/source/lua/lmtstatuslib.c
@@ -277,8 +277,8 @@ static int statslib_getconstants(lua_State *L)
lua_set_integer_by_key(L, "deplorable", deplorable);
lua_set_integer_by_key(L, "large_width_excess", large_width_excess);
lua_set_integer_by_key(L, "small_stretchability", small_stretchability);
- lua_set_integer_by_key(L, "decent_criterium", decent_criterium);
- lua_set_integer_by_key(L, "loose_criterium", loose_criterium);
+ lua_set_integer_by_key(L, "decent_criterion", decent_criterion);
+ lua_set_integer_by_key(L, "loose_criterion", loose_criterion);
lua_set_integer_by_key(L, "default_rule", default_rule);
lua_set_integer_by_key(L, "ignore_depth", ignore_depth);
diff --git a/source/luametatex/source/lua/lmttokenlib.c b/source/luametatex/source/lua/lmttokenlib.c
index fd3b95b0f..fe82e7e40 100644
--- a/source/luametatex/source/lua/lmttokenlib.c
+++ b/source/luametatex/source/lua/lmttokenlib.c
@@ -51,7 +51,7 @@ typedef struct lua_token_package {
It must be noticed that the codebase is now rather different from \LUATEX. Of course we still
have most of the original commands but new ones have been added, experimental one have been
- dropped, some have been combined. One criterium for grouping commands is that such a group gets
+ dropped, some have been combined. One criterion for grouping commands is that such a group gets
a unique treatment in reading a follow up, serialization, expansion, the main loop, the
registers and variables it refers to, etc. There is some logic behind it!
diff --git a/source/luametatex/source/luametatex.h b/source/luametatex/source/luametatex.h
index f5b2f1984..d9df0e14c 100644
--- a/source/luametatex/source/luametatex.h
+++ b/source/luametatex/source/luametatex.h
@@ -92,7 +92,7 @@
# define luametatex_version 210
# define luametatex_revision 9
# define luametatex_version_string "2.10.09"
-# define luametatex_development_id 20230528
+# define luametatex_development_id 20230529
# define luametatex_name_camelcase "LuaMetaTeX"
# define luametatex_name_lowercase "luametatex"
diff --git a/source/luametatex/source/tex/texadjust.c b/source/luametatex/source/tex/texadjust.c
index 775fd546d..a91439ea3 100644
--- a/source/luametatex/source/tex/texadjust.c
+++ b/source/luametatex/source/tex/texadjust.c
@@ -151,7 +151,7 @@ void tex_set_vadjust(halfword target)
tex_normal_paragraph(vadjust_par_context);
tex_push_nest();
cur_list.mode = internal_vmode;
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
}
void tex_run_vadjust(void)
diff --git a/source/luametatex/source/tex/texalign.c b/source/luametatex/source/tex/texalign.c
index e82a9eaae..8de3adff9 100644
--- a/source/luametatex/source/tex/texalign.c
+++ b/source/luametatex/source/tex/texalign.c
@@ -1068,7 +1068,7 @@ static void tex_aux_initialize_span(halfword p)
if (cur_list.mode == restricted_hmode) {
cur_list.space_factor = default_space_factor;
} else {
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
tex_normal_paragraph(span_par_context);
}
lmt_alignment_state.cur_span = p;
diff --git a/source/luametatex/source/tex/texbuildpage.c b/source/luametatex/source/tex/texbuildpage.c
index 5079e926e..a2d9051db 100644
--- a/source/luametatex/source/tex/texbuildpage.c
+++ b/source/luametatex/source/tex/texbuildpage.c
@@ -704,7 +704,7 @@ void tex_build_page(void)
Compute the badness, |b|, of the current page, using |awful_bad| if the box is
too full. The |c| variable holds the costs.
*/
- halfword badness, criterium;
+ halfword badness, criterion;
/*tex
This could actually be a callback but not now. First we will experiment a lot
with this yet undocumented trick.
@@ -728,29 +728,29 @@ void tex_build_page(void)
}
}
if (badness >= awful_bad) {
- criterium = badness; /* trigger fireup */
+ criterion = badness; /* trigger fireup */
} else if (penalty <= eject_penalty) {
- criterium = penalty; /* trigger fireup */
+ criterion = penalty; /* trigger fireup */
} else if (badness < infinite_bad) {
- criterium = badness + penalty + lmt_page_builder_state.insert_penalties;
+ criterion = badness + penalty + lmt_page_builder_state.insert_penalties;
} else {
- criterium = deplorable;
+ criterion = deplorable;
}
if (lmt_page_builder_state.insert_penalties >= 10000) {
- criterium = awful_bad;
+ criterion = awful_bad;
}
{
- int moveon = criterium <= lmt_page_builder_state.least_cost;
- int fireup = criterium == awful_bad || penalty <= eject_penalty;
+ int moveon = criterion <= lmt_page_builder_state.least_cost;
+ int fireup = criterion == awful_bad || penalty <= eject_penalty;
if (tracing_pages_par > 0) {
- tex_aux_display_page_break_cost(badness, penalty, criterium, moveon, fireup);
+ tex_aux_display_page_break_cost(badness, penalty, criterion, moveon, fireup);
}
if (moveon) {
halfword insert = node_next(page_insert_head);
lmt_page_builder_state.best_break = current;
lmt_page_builder_state.best_size = page_goal;
lmt_page_builder_state.insert_penalties = 0;
- lmt_page_builder_state.least_cost = criterium;
+ lmt_page_builder_state.least_cost = criterion;
while (insert != page_insert_head) {
split_best_insert(insert) = split_last_insert(insert);
insert = node_next(insert);
@@ -1146,7 +1146,7 @@ static void tex_aux_fire_up(halfword c)
++lmt_page_builder_state.dead_cycles;
tex_push_nest();
cur_list.mode = internal_vmode;
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
cur_list.mode_line = -lmt_input_state.input_line;
tex_begin_token_list(output_routine_par, output_text);
tex_new_save_level(output_group);
diff --git a/source/luametatex/source/tex/texcommands.c b/source/luametatex/source/tex/texcommands.c
index 239394859..26ae7cef9 100644
--- a/source/luametatex/source/tex/texcommands.c
+++ b/source/luametatex/source/tex/texcommands.c
@@ -279,7 +279,7 @@ void tex_initialize_commands(void)
tex_primitive(luatex_command, "alignmentcellsource", internal_int_cmd, alignment_cell_source_code, internal_int_base);
tex_primitive(luatex_command, "alignmentwrapsource", internal_int_cmd, alignment_wrap_source_code, internal_int_base);
/* tex_primitive(luatex_command, "pageboundarypenalty", internal_int_cmd, page_boundary_penalty_code, internal_int_base); */
- tex_primitive(luatex_command, "linebreakcriterium", internal_int_cmd, line_break_criterium_code, internal_int_base);
+ tex_primitive(luatex_command, "linebreakcriterion", internal_int_cmd, line_break_criterion_code, internal_int_base);
tex_primitive(luatex_command, "eufactor", internal_int_cmd, eu_factor_code, internal_int_base);
/*tex dimensions */
@@ -310,7 +310,7 @@ void tex_initialize_commands(void)
tex_primitive(luatex_command, "pxdimen", internal_dimen_cmd, px_dimen_code, internal_dimen_base);
tex_primitive(luatex_command, "tabsize", internal_dimen_cmd, tab_size_code, internal_dimen_base);
tex_primitive(luatex_command, "pageextragoal", internal_dimen_cmd, page_extra_goal_code, internal_dimen_base);
- tex_primitive(luatex_command, "ignoredepthcriterium", internal_dimen_cmd, ignore_depth_criterium_code, internal_dimen_base); /* mostly for myself, tutorials etc */
+ tex_primitive(luatex_command, "ignoredepthcriterion", internal_dimen_cmd, ignore_depth_criterion_code, internal_dimen_base); /* mostly for myself, tutorials etc */
tex_primitive(luatex_command, "shortinlinemaththreshold", internal_dimen_cmd, short_inline_math_threshold_code, internal_dimen_base);
/*tex Probably never used with \UNICODE\ omnipresent now: */
diff --git a/source/luametatex/source/tex/texdumpdata.c b/source/luametatex/source/tex/texdumpdata.c
index 1500ec78b..137c12ba9 100644
--- a/source/luametatex/source/tex/texdumpdata.c
+++ b/source/luametatex/source/tex/texdumpdata.c
@@ -287,7 +287,7 @@ static void tex_aux_undump_fmt_data(dumpstream f)
/*tex This should go elsewhere. */
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
}
/*
diff --git a/source/luametatex/source/tex/texequivalents.h b/source/luametatex/source/tex/texequivalents.h
index 4aeb32a81..b129cb047 100644
--- a/source/luametatex/source/tex/texequivalents.h
+++ b/source/luametatex/source/tex/texequivalents.h
@@ -223,7 +223,7 @@
590023 => down to 1024 * 512 == 524288 ==> 85% = 445644 => prime 445633/445649
will make a much larger format and we gain nothing. Actually, because we have extra hash
- anyway, this whole 85\% criterium is irrelevant: we only need to make sure that we have
+ anyway, this whole 85\% criterion is irrelevant: we only need to make sure that we have
enough room for the frozen sequences (assuming we stay within the concept).
primes:
@@ -573,7 +573,7 @@ typedef enum int_codes {
alignment_cell_source_code,
alignment_wrap_source_code,
/* page_boundary_penalty_code, */
- line_break_criterium_code,
+ line_break_criterion_code,
/*
This one was added as experiment to \LUATEX\ (answer to a forwarded question) but as it
didn't get tested it will go away. \CONTEXT\ doesn't need it and we don't need to be
@@ -639,7 +639,7 @@ typedef enum dimen_codes {
px_dimen_code,
tab_size_code,
page_extra_goal_code,
- ignore_depth_criterium_code,
+ ignore_depth_criterion_code,
short_inline_math_threshold_code,
/*tex total number of dimension parameters */
number_dimen_pars,
@@ -1380,7 +1380,7 @@ extern void tex_forced_word_define (int g, halfword p, singleword flag, halfword
# define display_widow_penalty_par count_parameter(display_widow_penalty_code)
# define orphan_penalty_par count_parameter(orphan_penalty_code)
/*define page_boundary_penalty_par count_parameter(page_boundary_penalty_code) */ /* now in |\pageboundary| */
-# define line_break_criterium_par count_parameter(line_break_criterium_code)
+# define line_break_criterion_par count_parameter(line_break_criterion_code)
# define broken_penalty_par count_parameter(broken_penalty_code)
# define line_skip_limit_par dimen_parameter(line_skip_limit_code)
@@ -1395,7 +1395,7 @@ extern void tex_forced_word_define (int g, halfword p, singleword flag, halfword
# define split_max_depth_par dimen_parameter(split_max_depth_code)
# define overfull_rule_par dimen_parameter(overfull_rule_code)
# define box_max_depth_par dimen_parameter(box_max_depth_code)
-# define ignore_depth_criterium_par dimen_parameter(ignore_depth_criterium_code)
+# define ignore_depth_criterion_par dimen_parameter(ignore_depth_criterion_code)
# define short_inline_math_threshold_par dimen_parameter(short_inline_math_threshold_code)
# define top_skip_par glue_parameter(top_skip_code)
diff --git a/source/luametatex/source/tex/texinserts.c b/source/luametatex/source/tex/texinserts.c
index 5a76ebaad..c47295223 100644
--- a/source/luametatex/source/tex/texinserts.c
+++ b/source/luametatex/source/tex/texinserts.c
@@ -451,7 +451,7 @@ void tex_run_insert(void)
tex_normal_paragraph(insert_par_context);
tex_push_nest();
cur_list.mode = internal_vmode;
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
}
void tex_finish_insert_group(void)
diff --git a/source/luametatex/source/tex/texlinebreak.c b/source/luametatex/source/tex/texlinebreak.c
index 821613c60..0c2445ffe 100644
--- a/source/luametatex/source/tex/texlinebreak.c
+++ b/source/luametatex/source/tex/texlinebreak.c
@@ -1407,7 +1407,7 @@ static void tex_aux_post_line_break(const line_break_properties *properties, hal
A core aspect of the linebreak algorithm is the calculation of badness. The formula currently
used has evolved with the tex versions before Don Knuth settled on this approach. And I (HH)
admit that I see no real reason to change something here. The only possible extension could
- be changing the hardcoded |loose_criterium| of 99 and |decent_criterium| of 12. These could
+ be changing the hardcoded |loose_criterion| of 99 and |decent_criterion| of 12. These could
become parameters instead. When looking at the code you will notice a loop that runs from
|very_loose_fit| to |tight_fit| with the following four steps:
@@ -1427,11 +1427,12 @@ static void tex_aux_post_line_break(const line_break_properties *properties, hal
experiment. However, the result is not that spectacular: I'm pretty sure that users will
not be able to choose consistently what result looks better, but who knows. For the moment
I keep it, if only to be able to discuss it as useless extension. Configuring the value s
- is done with |\linebreakcriterium| which gets split into 4 parts (2 bytes per criterium).
+ is done with |\linebreakcriterion| which gets split into 4 parts (2 bytes per criterion).
It is probably hard to explain to users what a different setting does and although one can
force different output in narrow raggedright text it would probbably enough to just make
- the |decent_criterium| configureable. Anyway, because we're talking heuristics and pretty
+
+ the |decent_criterion| configureable. Anyway, because we're talking heuristics and pretty
good estimates from Don Knuth here, it would be pretentious to suggest that I really did
research this fuzzy topic (if it was worth the effort at all).
@@ -1485,22 +1486,22 @@ halfword tex_badness(scaled t, scaled s)
}
}
-inline static void tex_split_line_break_criterium(halfword criterium, halfword *semi_tight, halfword *decent, halfword *semi_loose, halfword *loose) {
- *semi_tight = (criterium >> 24) & 0x7F;
- *decent = (criterium >> 16) & 0x7F;
- *semi_loose = (criterium >> 8) & 0x7F;
- *loose = criterium & 0x7F;
+inline static void tex_split_line_break_criterion(halfword criterion, halfword *semi_tight, halfword *decent, halfword *semi_loose, halfword *loose) {
+ *semi_tight = (criterion >> 24) & 0x7F;
+ *decent = (criterion >> 16) & 0x7F;
+ *semi_loose = (criterion >> 8) & 0x7F;
+ *loose = criterion & 0x7F;
if (! *semi_tight) {
- *semi_tight = semi_tight_criterium;
+ *semi_tight = semi_tight_criterion;
}
if (! *decent) {
- *decent = decent_criterium;
+ *decent = decent_criterion;
}
if (! *semi_loose) {
- *semi_loose = semi_loose_criterium;
+ *semi_loose = semi_loose_criterion;
}
if (! *loose) {
- *loose = loose_criterium;
+ *loose = loose_criterion;
}
}
@@ -1629,7 +1630,7 @@ static void tex_aux_try_break(
*/
halfword semi_tight, decent, semi_loose, loose;
/*tex in par node */
- tex_split_line_break_criterium(line_break_criterium_par, &semi_tight, &decent, &semi_loose, &loose);
+ tex_split_line_break_criterion(line_break_criterion_par, &semi_tight, &decent, &semi_loose, &loose);
/*tex Make sure that |pi| is in the proper range; */
if (penalty >= infinite_penalty) {
/*tex this breakpoint is inhibited by infinite penalty */
diff --git a/source/luametatex/source/tex/texmainbody.c b/source/luametatex/source/tex/texmainbody.c
index 707882a6b..4bc419df7 100644
--- a/source/luametatex/source/tex/texmainbody.c
+++ b/source/luametatex/source/tex/texmainbody.c
@@ -375,11 +375,11 @@ void tex_main_body(void)
}
/*tex
- We assume that |ignore_depth_criterium_par| is unchanged. If needed we can always do
+ We assume that |ignore_depth_criterion_par| is unchanged. If needed we can always do
this:
*/
- /* cur_list.prev_depth = ignore_depth_criterium_par; */
+ /* cur_list.prev_depth = ignore_depth_criterion_par; */
/*tex Ready to go, so come to life. */
diff --git a/source/luametatex/source/tex/texmaincontrol.c b/source/luametatex/source/tex/texmaincontrol.c
index 0489b67ac..c51a636b3 100644
--- a/source/luametatex/source/tex/texmaincontrol.c
+++ b/source/luametatex/source/tex/texmaincontrol.c
@@ -6711,7 +6711,7 @@ void tex_initialize_variables(void)
pre_short_inline_penalty_par = max_integer;
post_short_inline_penalty_par = max_integer;
variable_family_par = -1,
- ignore_depth_criterium_par = ignore_depth;
+ ignore_depth_criterion_par = ignore_depth;
aux_get_date_and_time(&time_par, &day_par, &month_par, &year_par, &lmt_engine_state.utc_time);
}
}
diff --git a/source/luametatex/source/tex/texnesting.c b/source/luametatex/source/tex/texnesting.c
index 87ca7715a..65e32a333 100644
--- a/source/luametatex/source/tex/texnesting.c
+++ b/source/luametatex/source/tex/texnesting.c
@@ -224,7 +224,7 @@ void tex_initialize_nesting(void)
cur_list.delimiter = null;
cur_list.prev_graf = 0;
cur_list.mode_line = 0;
- cur_list.prev_depth = ignore_depth; /*tex |ignore_depth_criterium_par| is not yet available! */
+ cur_list.prev_depth = ignore_depth; /*tex |ignore_depth_criterion_par| is not yet available! */
cur_list.space_factor = default_space_factor;
cur_list.incomplete_noad = null;
cur_list.direction_stack = null;
@@ -367,7 +367,7 @@ void tex_show_activities(void)
case vmode:
case internal_vmode:
{
- if (n.prev_depth <= ignore_depth_criterium_par) {
+ if (n.prev_depth <= ignore_depth_criterion_par) {
tex_print_format("%l[prevdepth ignored");
} else {
tex_print_format("%l[prevdepth %D", n.prev_depth, pt_unit);
diff --git a/source/luametatex/source/tex/texpackaging.c b/source/luametatex/source/tex/texpackaging.c
index 185b80c1b..83ace07fa 100644
--- a/source/luametatex/source/tex/texpackaging.c
+++ b/source/luametatex/source/tex/texpackaging.c
@@ -2376,7 +2376,7 @@ void tex_run_vcenter(void)
tex_normal_paragraph(vcenter_par_context);
tex_push_nest();
cur_list.mode = internal_vmode;
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
if (every_vbox_par) {
tex_begin_token_list(every_vbox_par, every_vbox_text);
}
@@ -2791,14 +2791,14 @@ void tex_append_to_vlist(halfword b, int location, const line_break_properties *
{
if (location >= 0) {
halfword result = null;
- halfword next_depth = ignore_depth_criterium_par;
+ halfword next_depth = ignore_depth_criterion_par;
int prev_set = 0;
int check_depth = 0;
if (lmt_append_to_vlist_callback(b, location, cur_list.prev_depth, &result, &next_depth, &prev_set, &check_depth)) {
if (prev_set) {
cur_list.prev_depth = next_depth;
}
- if (check_depth && result && (cur_list.prev_depth > ignore_depth_criterium_par)) {
+ if (check_depth && result && (cur_list.prev_depth > ignore_depth_criterion_par)) {
/*tex
We only deal with a few types and one can always at the \LUA\ end check for some of
these and decide not to apply the correction.
@@ -2820,7 +2820,7 @@ void tex_append_to_vlist(halfword b, int location, const line_break_properties *
return;
}
}
- if (cur_list.prev_depth > ignore_depth_criterium_par) {
+ if (cur_list.prev_depth > ignore_depth_criterion_par) {
halfword glue = tex_aux_depth_correction(b, properties);
tex_tail_append(glue);
}
@@ -3429,7 +3429,7 @@ void tex_begin_box(int boxcontext, scaled shift, halfword slot)
update_tex_internal_dir_state(0);
cur_list.mode = - mode;
if (mode == vmode) {
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
if (every_vbox_par) {
tex_begin_token_list(every_vbox_par, every_vbox_text);
}
diff --git a/source/luametatex/source/tex/texrules.c b/source/luametatex/source/tex/texrules.c
index 7d9adb7ef..c0c122945 100644
--- a/source/luametatex/source/tex/texrules.c
+++ b/source/luametatex/source/tex/texrules.c
@@ -176,7 +176,7 @@ void tex_aux_run_vrule(void)
void tex_aux_run_hrule(void)
{
tex_tail_append(tex_aux_scan_rule_spec(h_rule_type, cur_chr));
- cur_list.prev_depth = ignore_depth_criterium_par;
+ cur_list.prev_depth = ignore_depth_criterion_par;
}
void tex_aux_run_mrule(void)
diff --git a/source/luametatex/source/tex/textypes.h b/source/luametatex/source/tex/textypes.h
index a3ceea681..683ee2e5a 100644
--- a/source/luametatex/source/tex/textypes.h
+++ b/source/luametatex/source/tex/textypes.h
@@ -169,10 +169,10 @@ extern halfword tex_badness(
# define deplorable 100000 /*tex more than |inf_bad|, but less than |awful_bad| */
# define large_width_excess 7230584
# define small_stretchability 1663497
-# define loose_criterium 99
-# define semi_loose_criterium 12 /* same as |decent_criterium| */
-# define decent_criterium 12
-# define semi_tight_criterium 12 /* same as |decent_criterium| */
+# define loose_criterion 99
+# define semi_loose_criterion 12 /* same as |decent_criterion| */
+# define decent_criterion 12
+# define semi_tight_criterion 12 /* same as |decent_criterion| */
# define max_calculated_badness 8189
# define default_rule 26214 /*tex 0.4pt */