+
+-- adjust and insertion
+local id_adjust = node.id('adjust')
+function luatexja.direction.check_adjust_direction()
+ local list_dir = tex_getcount('ltj@adjdir@count')
+ local a = tex.nest[tex.nest.ptr].tail
+ local ad = to_direct(a)
+ if a and getid(ad)==id_adjust then
+ local adj_dir = get_box_dir(ad)
+ if list_dir~=adj_dir then
+ ltjb.package_error(
+ 'luatexja',
+ 'Direction Incompatible',
+ "\\vadjust's argument and outer vlist must have same direction.")
+ Dnode.last_node()
+ end
+ end
+end