diff options
Diffstat (limited to 'source/luametatex/source/lua')
-rw-r--r-- | source/luametatex/source/lua/lmtinterface.h | 13 | ||||
-rw-r--r-- | source/luametatex/source/lua/lmtnodelib.c | 4 | ||||
-rw-r--r-- | source/luametatex/source/lua/lmttexlib.c | 67 |
3 files changed, 47 insertions, 37 deletions
diff --git a/source/luametatex/source/lua/lmtinterface.h b/source/luametatex/source/lua/lmtinterface.h index 756a25331..67c3f56d5 100644 --- a/source/luametatex/source/lua/lmtinterface.h +++ b/source/luametatex/source/lua/lmtinterface.h @@ -675,6 +675,8 @@ make_lua_key(L, first);\ make_lua_key(L, fixedboth);\ make_lua_key(L, fixedbottom);\ make_lua_key(L, fixedtop);\ +make_lua_key(L, fixedsuperorsubscript);\ +make_lua_key(L, fixedsuperandsubscript);\ make_lua_key(L, flags);\ make_lua_key(L, flataccent);\ make_lua_key(L, flattenedaccentbasedepth);\ @@ -1279,6 +1281,7 @@ make_lua_key(L, smaller);\ make_lua_key(L, smallfamily);\ make_lua_key(L, some_item);\ make_lua_key(L, source);\ +make_lua_key(L, sourceonnucleus);\ make_lua_key(L, space);\ make_lua_key(L, spaceafterscript);\ make_lua_key(L, SpaceAfterScript);\ @@ -1650,6 +1653,10 @@ extern lmt_keys_info lmt_keys; # define lmt_checkhalfword(L,i) (halfword) luaL_checkinteger(L,i) # define lmt_opthalfword(L,i,j) (halfword) luaL_optinteger(L,i,j) +# define lmt_tofullword(L,i) (fullword) lua_tointeger(L,i) +# define lmt_checkfullword(L,i) (fullword) luaL_checkinteger(L,i) +# define lmt_optfullword(L,i,j) (fullword) luaL_optinteger(L,i,j) + # define lmt_toscaled(L,i) (scaled) lua_tointeger(L,i) # define lmt_checkscaled(L,i) (scaled) luaL_checkinteger(L,i) # define lmt_optscaled(L,i,j) (scaled) luaL_optinteger(L,i,j) @@ -1658,9 +1665,9 @@ extern lmt_keys_info lmt_keys; # define lmt_checkquarterword(L,i) (quarterword) luaL_checkinteger(L,i) # define lmt_optquarterword(L,i,j) (quarterword) luaL_optinteger(L,i,j) -# define lmt_tosingleword(L,i) (singleword) lua_tointeger(L,i) -# define lmt_checksingleword(L,i) (singleword) luaL_checkinteger(L,i) -# define lmt_optsingleword(L,i,j) (singleword) luaL_optinteger(L,i,j) +# define lmt_tosingleword(L,i) (singleword) lua_tointeger(L,i) +# define lmt_checksingleword(L,i) (singleword) luaL_checkinteger(L,i) +# define lmt_optsingleword(L,i,j) (singleword) luaL_optinteger(L,i,j) # undef lround # include <math.h> diff --git a/source/luametatex/source/lua/lmtnodelib.c b/source/luametatex/source/lua/lmtnodelib.c index 58a98f7e3..afaa8bed5 100644 --- a/source/luametatex/source/lua/lmtnodelib.c +++ b/source/luametatex/source/lua/lmtnodelib.c @@ -2674,7 +2674,7 @@ static int nodelib_direct_setoptions(lua_State *L) case fraction_noad: case accent_noad: case fence_noad: - noad_options(n) = lmt_tohalfword(L, 2); + noad_options(n) = lmt_tofullword(L, 2); break; case math_char_node: case math_text_char_node: @@ -7372,7 +7372,7 @@ static int nodelib_common_setfield(lua_State *L, int direct, halfword n) } else if (lua_key_eq(s, source)) { noad_source(n) = lmt_tohalfword(L, 3); } else if (lua_key_eq(s, options)) { - noad_options(n) = lmt_tohalfword(L, 3); + noad_options(n) = lmt_tofullword(L, 3); } else if (lua_key_eq(s, scriptorder)) { noad_script_order(n) = lmt_tosingleword(L, 3); } else if (lua_key_eq(s, class)) { diff --git a/source/luametatex/source/lua/lmttexlib.c b/source/luametatex/source/lua/lmttexlib.c index d3f4c0ab9..7d9395eb7 100644 --- a/source/luametatex/source/lua/lmttexlib.c +++ b/source/luametatex/source/lua/lmttexlib.c @@ -4757,38 +4757,41 @@ static int texlib_getglyphoptionvalues(lua_State *L) static int texlib_getnoadoptionvalues(lua_State *L) { lua_createtable(L, 2, 32); - lua_push_key_at_index(L, axis, noad_option_axis); - lua_push_key_at_index(L, noaxis, noad_option_no_axis); - lua_push_key_at_index(L, exact, noad_option_exact); - lua_push_key_at_index(L, left, noad_option_left); - lua_push_key_at_index(L, middle, noad_option_middle); - lua_push_key_at_index(L, right, noad_option_right); - lua_push_key_at_index(L, adapttoleftsize, noad_option_adapt_to_left_size); - lua_push_key_at_index(L, adapttorightsize, noad_option_adapt_to_right_size); - lua_push_key_at_index(L, nosubscript, noad_option_no_sub_script); - lua_push_key_at_index(L, nosuperscript, noad_option_no_super_script); - lua_push_key_at_index(L, nosubprescript, noad_option_no_sub_pre_script); - lua_push_key_at_index(L, nosuperprescript, noad_option_no_super_pre_script); - lua_push_key_at_index(L, noscript, noad_option_no_script); - lua_push_key_at_index(L, nooverflow, noad_option_no_overflow); - lua_push_key_at_index(L, void, noad_option_void); - lua_push_key_at_index(L, phantom, noad_option_phantom); - lua_push_key_at_index(L, openupheight, noad_option_openup_height); - lua_push_key_at_index(L, openupdepth, noad_option_openup_depth); - lua_push_key_at_index(L, limits, noad_option_limits); - lua_push_key_at_index(L, nolimits, noad_option_no_limits); - lua_push_key_at_index(L, preferfontthickness, noad_option_prefer_font_thickness); - lua_push_key_at_index(L, noruling, noad_option_no_ruling); - lua_push_key_at_index(L, shiftedsubscript, noad_option_shifted_sub_script); - lua_push_key_at_index(L, shiftedsuperscript, noad_option_shifted_super_script); - lua_push_key_at_index(L, shiftedsubprescript, noad_option_shifted_sub_pre_script); - lua_push_key_at_index(L, shiftedsuperprescript, noad_option_shifted_super_pre_script); - lua_push_key_at_index(L, unpacklist, noad_option_unpack_list); - lua_push_key_at_index(L, nocheck, noad_option_no_check); - lua_push_key_at_index(L, auto, noad_option_auto); - lua_push_key_at_index(L, unrolllist, noad_option_unroll_list); - lua_push_key_at_index(L, followedbyspace, noad_option_followed_by_space); - lua_push_key_at_index(L, proportional, noad_option_proportional); + lua_push_key_at_index(L, axis, noad_option_axis); + lua_push_key_at_index(L, noaxis, noad_option_no_axis); + lua_push_key_at_index(L, exact, noad_option_exact); + lua_push_key_at_index(L, left, noad_option_left); + lua_push_key_at_index(L, middle, noad_option_middle); + lua_push_key_at_index(L, right, noad_option_right); + lua_push_key_at_index(L, adapttoleftsize, noad_option_adapt_to_left_size); + lua_push_key_at_index(L, adapttorightsize, noad_option_adapt_to_right_size); + lua_push_key_at_index(L, nosubscript, noad_option_no_sub_script); + lua_push_key_at_index(L, nosuperscript, noad_option_no_super_script); + lua_push_key_at_index(L, nosubprescript, noad_option_no_sub_pre_script); + lua_push_key_at_index(L, nosuperprescript, noad_option_no_super_pre_script); + lua_push_key_at_index(L, noscript, noad_option_no_script); + lua_push_key_at_index(L, nooverflow, noad_option_no_overflow); + lua_push_key_at_index(L, void, noad_option_void); + lua_push_key_at_index(L, phantom, noad_option_phantom); + lua_push_key_at_index(L, openupheight, noad_option_openup_height); + lua_push_key_at_index(L, openupdepth, noad_option_openup_depth); + lua_push_key_at_index(L, limits, noad_option_limits); + lua_push_key_at_index(L, nolimits, noad_option_no_limits); + lua_push_key_at_index(L, preferfontthickness, noad_option_prefer_font_thickness); + lua_push_key_at_index(L, noruling, noad_option_no_ruling); + lua_push_key_at_index(L, shiftedsubscript, noad_option_shifted_sub_script); + lua_push_key_at_index(L, shiftedsuperscript, noad_option_shifted_super_script); + lua_push_key_at_index(L, shiftedsubprescript, noad_option_shifted_sub_pre_script); + lua_push_key_at_index(L, shiftedsuperprescript, noad_option_shifted_super_pre_script); + lua_push_key_at_index(L, unpacklist, noad_option_unpack_list); + lua_push_key_at_index(L, nocheck, noad_option_no_check); + lua_push_key_at_index(L, auto, noad_option_auto); + lua_push_key_at_index(L, unrolllist, noad_option_unroll_list); + lua_push_key_at_index(L, followedbyspace, noad_option_followed_by_space); + lua_push_key_at_index(L, proportional, noad_option_proportional); + lua_push_key_at_index(L, sourceonnucleus, noad_option_source_on_nucleus); + lua_push_key_at_index(L, fixedsuperorsubscript, noad_option_fixed_super_or_sub_script); + lua_push_key_at_index(L, fixedsuperandsubscript, noad_option_fixed_super_and_sub_script); return 1; } |