From 9111ac6d97d7931a2a9bbdad69f5c54de4172318 Mon Sep 17 00:00:00 2001 From: Hans Hagen Date: Tue, 30 May 2023 23:06:58 +0200 Subject: 2023-05-30 22:20:00 --- source/luametatex/source/tex/texnodes.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source/luametatex/source/tex/texnodes.h') diff --git a/source/luametatex/source/tex/texnodes.h b/source/luametatex/source/tex/texnodes.h index 80ab40f03..3550e7345 100644 --- a/source/luametatex/source/tex/texnodes.h +++ b/source/luametatex/source/tex/texnodes.h @@ -422,8 +422,19 @@ typedef enum attribute_subtypes { with arguments. */ -# define penalty_node_size 3 -# define penalty_amount(a) vlink(a,2) +# define penalty_node_size 3 +# define penalty_amount(a) vlink(a,2) +# define penalty_options(a) vinfo(a,2) + +inline static void tex_add_penalty_option (halfword a, halfword r) { penalty_options(a) |= r; } +inline static void tex_remove_penalty_option (halfword a, halfword r) { penalty_options(a) &= ~(r | penalty_options(a)); } +inline static int tex_has_penalty_option (halfword a, halfword r) { return (penalty_options(a) & r) == r; } + +typedef enum penalty_option_codes { + penalty_option_normal = 0x0000, + penalty_option_math_forward = 0x0001, + penalty_option_math_backward = 0x0002, +} penalty_option_codes; typedef enum penalty_subtypes { user_penalty_subtype, @@ -522,6 +533,7 @@ typedef enum glue_option_codes { // glue_force_auto_break = 0x0001, // glue_originates_in_math = 0x0002, glue_option_no_auto_break = 0x0001, + glue_option_short_math = 0x0002, } glue_option_codes; typedef enum math_subtypes { -- cgit v1.2.3