diff --git a/manual/luatex-math.tex b/manual/luatex-math.tex index 56139cde9d920c3cc08de75d568cdfce0b0ee234..b2f34e4db0debf441191fff8cc7b03e0011b6b04 100644 --- a/manual/luatex-math.tex +++ b/manual/luatex-math.tex @@ -130,6 +130,20 @@ sections: \LL \stoptabulate +Instead of the pseudo class variable (7) you can use a family number as signal +for using the current family. This permits classifying characters with a class +and still let the family adapt. The trigger family is set with \lpr +{variablefam}. So: + +\starttyping +\variablefam"24 +\Umathchardef\foo "3 "24 123 +\foo \fam9 +\stoptyping + +Results in a curly left brace taken from family 9 with class \quote {relation} +and spacing around it will be accordingly. + \stopsection \startsection[title={Math styles}] @@ -774,13 +788,13 @@ right end. The question is: how often is this implemented, and if so, do the kerns assume correction too. Anyway, with this parameter one can control it. \starttabulate[|l|ck1|ck1|ck1|ck1|ck1|ck1|] - \NC - \NC \mathnolimitsmode0 $\displaystyle\int\nolimits^0_1$ - \NC \mathnolimitsmode1 $\displaystyle\int\nolimits^0_1$ - \NC \mathnolimitsmode2 $\displaystyle\int\nolimits^0_1$ - \NC \mathnolimitsmode3 $\displaystyle\int\nolimits^0_1$ - \NC \mathnolimitsmode4 $\displaystyle\int\nolimits^0_1$ - \NC \mathnolimitsmode8000 $\displaystyle\int\nolimits^0_1$ + \NC % probably not ok, we need a raw int here + \NC \mathnolimitsmode0 $\displaystyle\mathop{\normalint}\nolimits^0_1$ + \NC \mathnolimitsmode1 $\displaystyle\mathop{\normalint}\nolimits^0_1$ + \NC \mathnolimitsmode2 $\displaystyle\mathop{\normalint}\nolimits^0_1$ + \NC \mathnolimitsmode3 $\displaystyle\mathop{\normalint}\nolimits^0_1$ + \NC \mathnolimitsmode4 $\displaystyle\mathop{\normalint}\nolimits^0_1$ + \NC \mathnolimitsmode8000 $\displaystyle\mathop{\normalint}\nolimits^0_1$ \NC \NR \TB \BC mode diff --git a/manual/luatex.pdf b/manual/luatex.pdf index 354a4e27f7c874dca14d2e7e3418d50c3f743c43..12e7b2d00c0e71064c325f6fc758f9884af68338 100644 Binary files a/manual/luatex.pdf and b/manual/luatex.pdf differ diff --git a/source/texk/web2c/luatexdir/ChangeLog b/source/texk/web2c/luatexdir/ChangeLog index 3dfb6a535965ae6721520d49f54d5f3623779c3a..9cd534c2c56ec636dcee84a9960e56360471d574 100644 --- a/source/texk/web2c/luatexdir/ChangeLog +++ b/source/texk/web2c/luatexdir/ChangeLog @@ -1,6 +1,11 @@ +2022-10-28 Luigi Scarso <luigi.scarso@gmail.com> + * \variablefam (backport from luametatex, handy for latex) (H .Hagen) + 2022-10-22 Luigi Scarso <luigi.scarso@gmail.com> - * porting texlive patch r53155 -- WORK IN PROGRESS + * STOP COMMITS TO SVN REPO -- WORK IN PROGRESS +2022-10-22 Luigi Scarso <luigi.scarso@gmail.com> + * porting texlive patch r53155 -- WORK IN PROGRESS 2022-09-29 Luigi Scarso <luigi.scarso@gmail.com> * Fixed an infinite loop with --halt-on-error option (K.Berry) diff --git a/source/texk/web2c/luatexdir/luatex_svnversion.h b/source/texk/web2c/luatexdir/luatex_svnversion.h index 77abc8892ea56e117ff7d875805e2dc6f6282907..6c9c206b9572bae6d48bfab3032fd90532f940c0 100644 --- a/source/texk/web2c/luatexdir/luatex_svnversion.h +++ b/source/texk/web2c/luatexdir/luatex_svnversion.h @@ -1,4 +1,4 @@ #ifndef luatex_svn_revision_h #define luatex_svn_revision_h -#define luatex_svn_revision 7544 +#define luatex_svn_revision 7546 #endif diff --git a/source/texk/web2c/luatexdir/tex/commands.c b/source/texk/web2c/luatexdir/tex/commands.c index 9cf5efeeec599b8b5ef891a4ca281314605888dd..b502cf287fe8d718e8ca6f851b5dac098de7148c 100644 --- a/source/texk/web2c/luatexdir/tex/commands.c +++ b/source/texk/web2c/luatexdir/tex/commands.c @@ -119,6 +119,7 @@ void initialize_commands(void) primitive_tex("floatingpenalty", assign_int_cmd, int_base + floating_penalty_code, int_base); primitive_tex("globaldefs", assign_int_cmd, int_base + global_defs_code, int_base); primitive_tex("fam", assign_int_cmd, int_base + cur_fam_code, int_base); + primitive_luatex("variablefam", assign_int_cmd, int_base + var_fam_code, int_base); primitive_tex("escapechar", assign_int_cmd, int_base + escape_char_code, int_base); primitive_tex("defaulthyphenchar", assign_int_cmd, int_base + default_hyphen_char_code, int_base); primitive_tex("defaultskewchar", assign_int_cmd, int_base + default_skew_char_code, int_base); diff --git a/source/texk/web2c/luatexdir/tex/dumpdata.c b/source/texk/web2c/luatexdir/tex/dumpdata.c index fb435c2ca1ecf99c5f5f9c5804f7086e1a9a2618..6b7535803f1e98e546292ae1b82f21c12ee5de28 100644 --- a/source/texk/web2c/luatexdir/tex/dumpdata.c +++ b/source/texk/web2c/luatexdir/tex/dumpdata.c @@ -32,7 +32,7 @@ with LuaTeX; if not, see <http://www.gnu.org/licenses/>. */ -#define FORMAT_ID (907+58) +#define FORMAT_ID (907+59) #if ((FORMAT_ID>=0) && (FORMAT_ID<=256)) #error Wrong value for FORMAT_ID. #endif diff --git a/source/texk/web2c/luatexdir/tex/equivalents.h b/source/texk/web2c/luatexdir/tex/equivalents.h index 8df33be5237b236fe590fd0d0859d3b714254c4c..f755af60a3f427f2a3ff445a9e3385f11627f178 100644 --- a/source/texk/web2c/luatexdir/tex/equivalents.h +++ b/source/texk/web2c/luatexdir/tex/equivalents.h @@ -314,8 +314,9 @@ the |number_regs| \.{\\dimen} registers. # define partoken_context_code 121 # define show_stream_code 122 # define math_eq_dir_mode_code 123 +# define var_fam_code 124 -# define math_option_code 124 +# define math_option_code 125 # define mathoption_int_base_code (math_option_code+1) /* one reserve */ # define mathoption_int_last_code (mathoption_int_base_code+8) @@ -651,11 +652,13 @@ extern halfword last_cs_name; #define split_top_skip_par glue_par(split_top_skip_code) #define cur_fam_par int_par(cur_fam_code) +#define var_fam_par int_par(var_fam_code) #define pre_display_direction_par int_par(pre_display_direction_code) #define pre_display_penalty_par int_par(pre_display_penalty_code) #define post_display_penalty_par int_par(post_display_penalty_code) #define cur_fam_par_in_range ((cur_fam_par>=0)&&(cur_fam_par<256)) +#define var_fam_par_in_range ((var_fam_par>=0)&&(var_fam_par<256)) #define local_inter_line_penalty_par int_par(local_inter_line_penalty_code) #define local_broken_penalty_par int_par(local_broken_penalty_code) diff --git a/source/texk/web2c/luatexdir/tex/texfileio.c b/source/texk/web2c/luatexdir/tex/texfileio.c index 76b4e9794de83388457b57c1ded62c19871f6519..83a76a21f008450f567f43ee3606df840ad56e57 100644 --- a/source/texk/web2c/luatexdir/tex/texfileio.c +++ b/source/texk/web2c/luatexdir/tex/texfileio.c @@ -346,7 +346,7 @@ boolean lua_a_open_out(alpha_file * f, char *fn, int n) } } else { if (openoutnameok(fn)) { - if (n > 0 && selector != term_only && log_file) { + if (n > 0 && selector != term_only) { /*tex This message to the log is for downward compatibility with diff --git a/source/texk/web2c/luatexdir/tex/texmath.c b/source/texk/web2c/luatexdir/tex/texmath.c index 7a71fd80349adc1c6c4ca2ed8b3e2a73cefc9990..8b6138e7cbb1617cc6f7a7983361ff99f4a7bbd0 100644 --- a/source/texk/web2c/luatexdir/tex/texmath.c +++ b/source/texk/web2c/luatexdir/tex/texmath.c @@ -1462,6 +1462,8 @@ int scan_math(pointer p, int mstyle) math_character(p) = mval.character_value; if ((mval.class_value == math_use_current_family_code) && cur_fam_par_in_range) math_fam(p) = cur_fam_par; + else if ((mval.family_value == var_fam_par) && var_fam_par_in_range) + math_fam(p) = cur_fam_par; else math_fam(p) = mval.family_value; return 0; @@ -1508,6 +1510,9 @@ void set_math_char(mathcodeval mval) if (cur_fam_par_in_range) math_fam(nucleus(p)) = cur_fam_par; subtype(p) = ord_noad_type; + } else if ((mval.family_value == var_fam_par) && var_fam_par_in_range) { + if (cur_fam_par_in_range) + math_fam(nucleus(p)) = cur_fam_par; } else { math_class_to_type(subtype(p),mval.class_value); } @@ -1802,6 +1807,8 @@ void math_ac(void) math_character(top_accent_chr(tail)) = t.character_value; if ((t.class_value == math_use_current_family_code) && cur_fam_par_in_range) math_fam(top_accent_chr(tail)) = cur_fam_par; + else if ((t.family_value == var_fam_par) && var_fam_par_in_range) + math_fam(top_accent_chr(tail)) = cur_fam_par; else math_fam(top_accent_chr(tail)) = t.family_value; } @@ -1811,6 +1818,8 @@ void math_ac(void) math_character(bot_accent_chr(tail)) = b.character_value; if ((b.class_value == math_use_current_family_code) && cur_fam_par_in_range) math_fam(bot_accent_chr(tail)) = cur_fam_par; + else if ((b.family_value == var_fam_par) && var_fam_par_in_range) + math_fam(bot_accent_chr(tail)) = cur_fam_par; else math_fam(bot_accent_chr(tail)) = b.family_value; } @@ -1820,6 +1829,8 @@ void math_ac(void) math_character(overlay_accent_chr(tail)) = o.character_value; if ((o.class_value == math_use_current_family_code) && cur_fam_par_in_range) math_fam(overlay_accent_chr(tail)) = cur_fam_par; + else if ((o.family_value == var_fam_par) && var_fam_par_in_range) + math_fam(overlay_accent_chr(tail)) = cur_fam_par; else math_fam(overlay_accent_chr(tail)) = o.family_value; }