1 /* Copyright 2014 Clerk Ma
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2 of the License, or
6 (at your option) any later version.
8 This program is distributed in the hope that it will be useful, but
9 WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with this program; if not, write to the Free Software
15 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
23 void char_warning_(internal_font_number f, eight_bits c)
25 if (tracing_lost_chars > 0)
27 if (show_missing == 0)
33 prints("Missing character: there is no ");
36 print_nl("Missing character: there is no ");
47 print_char('0' + c / 100);
48 c = c - (c / 100) * 100;
49 print_char('0' + c / 10);
53 c = c - (c / 100) * 100;
55 print_char('0' + c / 10);
58 print_char('0' + c % 10);
63 slow_print(font_name[f]);
69 show_context(); /* not if its the nullfont */
72 if (show_missing == 0)
73 end_diagnostic(false);
79 halfword new_character_(internal_font_number f, eight_bits c)
85 if (char_exists(char_info(f, c)))
102 printf("dvi_swap() %lld", dvi_gone);
105 if (dvi_limit == dvi_buf_size)
107 write_dvi(0, half_buf - 1);
108 dvi_limit = half_buf;
109 dvi_offset = dvi_offset + dvi_buf_size;
114 write_dvi(half_buf, dvi_buf_size - 1);
115 dvi_limit = dvi_buf_size;
118 dvi_gone = dvi_gone + half_buf;
121 void dvi_four_(integer x)
124 dvi_out(x / 0100000000);
127 x = x + 010000000000;
128 x = x + 010000000000;
129 dvi_out((x / 0100000000) + 128);
133 dvi_out(x / 0200000);
139 void dvi_pop_(integer l)
141 if ((l == dvi_offset + dvi_ptr) && (dvi_ptr > 0))
147 void dvi_font_def_(internal_font_number f)
160 dvi_out(((f - 1) >> 8));
161 dvi_out(((f - 1) & 255));
168 dvi_out(font_check[f].b0);
169 dvi_out(font_check[f].b1);
170 dvi_out(font_check[f].b2);
171 dvi_out(font_check[f].b3);
172 dvi_four(font_size[f]);
173 dvi_four(font_dsize[f]);
174 dvi_out(length(font_area[f]));
175 dvi_out(length(font_name[f]));
177 for (k = str_start[font_area[f]]; k <= str_start[font_area[f] + 1] - 1; k++)
178 dvi_out(str_pool[k]);
180 for (k = str_start[font_name[f]]; k <= str_start[font_name[f] + 1] - 1; k++)
181 dvi_out(str_pool[k]);
184 void zmovement(scaled w, eight_bits o)
190 q = get_node(movement_node_size);
192 location(q) = dvi_offset + dvi_ptr;
211 switch (mstate + info(p))
213 case none_seen + yz_OK:
214 case none_seen + y_OK:
217 if (location(p) < dvi_gone)
221 k = location(p) - dvi_offset;
224 k = k + dvi_buf_size;
226 dvi_buf[k] = dvi_buf[k] + y1 - down1;
232 case none_seen + z_OK:
235 if (location(p) < dvi_gone)
239 k = location(p) - dvi_offset;
242 k = k + dvi_buf_size;
244 dvi_buf[k] = dvi_buf[k] + z1 - down1;
250 case none_seen + y_here:
251 case none_seen + z_here:
252 case y_seen + z_here:
253 case z_seen + y_here:
261 switch (mstate + info(p))
263 case none_seen + y_here:
267 case none_seen + z_here:
271 case y_seen + z_here:
272 case z_seen + y_here:
287 if (abs(w) >= 8388608L) /* 2^23 */
294 if (abs(w) >= 32768L)
299 w = w + 16777216L; /* 2^24 */
300 //dvi_out(w / 65536L);
334 if (info(q) == y_here)
336 dvi_out(o + y0 - down1);
359 dvi_out(o + z0 - down1);
382 void prune_movements (integer l)
386 while (down_ptr != 0)
388 if (location(down_ptr) < l)
393 free_node(p, movement_node_size);
397 while (right_ptr != 0)
399 if (location(right_ptr) < l)
404 free_node(p, movement_node_size);
408 void special_out (pointer p)
415 old_setting = selector;
416 selector = new_string;
418 #ifdef ALLOCATESTRING
419 if (pool_ptr + 32000 > current_pool_size)
420 str_pool = realloc_str_pool (increment_pool_size);
422 show_token_list(link(write_tokens(p)), 0, 10000000L);
424 show_token_list(link(write_tokens(p)), 0, pool_size - pool_ptr);
427 selector = old_setting;
430 if (cur_length < 256)
438 dvi_four(cur_length);
441 for (k = str_start[str_ptr]; k <= pool_ptr - 1; k++)
442 dvi_out(str_pool[k]);
444 pool_ptr = str_start[str_ptr];
447 void write_out (pointer p)
450 /* integer old_mode; */
452 /* small_number j; */
457 info(q) = right_brace_token + '}';
460 info(r) = end_write_token;
462 begin_token_list(write_tokens(p), write_text);
464 info(q) = left_brace_token + '{';
469 q = scan_toks(false, true);
472 if (cur_tok != end_write_token)
474 print_err("Unbalanced write command");
475 help2("On this page there's a \\write with fewer real {'s than }'s.",
476 "I can't handle that very well; good luck.");
483 while (!(cur_tok == end_write_token));
488 old_setting = selector;
495 if ((j == 17) && (selector == term_and_log))
504 selector = old_setting;
507 void out_what (pointer p)
509 /* small_number j; */
521 if (subtype(p) == write_node)
526 a_close(write_file[j]);
528 if (subtype(p) == close_node)
529 write_open[j]= false;
532 cur_name = open_name(p);
533 cur_area = open_area(p);
534 cur_ext = open_ext(p);
536 if (cur_ext == 335) /* "" */
537 cur_ext = 785; /* => ".tex" */
539 pack_file_name(cur_name, cur_area, cur_ext);
541 while (!a_open_out(write_file[j]))
542 prompt_file_name("output file name", ".tex");
544 write_open[j] = true;
567 void hlist_out (void)
571 scaled save_h, save_v;
573 /* glue_ord g_order; */
582 boolean outer_doing_leaders;
591 g_order = glue_order(this_box);
592 g_sign = glue_sign(this_box);
593 p = list_ptr(this_box);
599 if (cur_s > max_push)
602 save_loc = dvi_offset + dvi_ptr;
626 if (f <= 64 + font_base)
627 dvi_out(f - font_base - 1 + fnt_num_0);
646 dvi_out(((f - 1) >> 8)); /* top byte */
647 dvi_out(((f - 1) & 255)); /* bottom byte */
658 cur_h = cur_h + char_width(f, char_info(f, c));
661 while (!(!is_char_node(p)));
671 if (list_ptr(p) == 0)
672 cur_h = cur_h + width(p);
677 cur_v = base_line + shift_amount(p);
681 if (type(p) == vlist_node)
688 cur_h = edge + width(p);
709 rule_wd = width(g) - cur_g;
711 if (g_sign != normal)
713 if (g_sign == stretching)
715 if (stretch_order(g) == g_order)
717 cur_glue = cur_glue + stretch(g);
718 vet_glue(glue_set(this_box) * cur_glue);
719 cur_g = round(glue_temp);
722 else if (shrink_order(g) == g_order)
724 cur_glue = cur_glue - shrink(g);
725 vet_glue(glue_set(this_box) * cur_glue);
726 cur_g = round(glue_temp);
730 rule_wd = rule_wd + cur_g;
732 if (subtype(p) >= a_leaders)
734 leader_box = leader_ptr(p);
736 if (type(leader_box) == rule_node)
738 rule_ht = height(leader_box);
739 rule_dp = depth(leader_box);
743 leader_wd = width(leader_box);
745 if ((leader_wd > 0) && (rule_wd > 0))
747 rule_wd = rule_wd + 10;
748 edge = cur_h + rule_wd;
751 if (subtype(p) == a_leaders)
754 cur_h = left_edge + leader_wd * ((cur_h - left_edge) / leader_wd);
757 cur_h = cur_h + leader_wd;
761 lq = rule_wd / leader_wd;
762 lr = rule_wd % leader_wd;
764 if (subtype(p) == c_leaders)
765 cur_h = cur_h + (lr / 2);
768 lx =(2 * lr + lq + 1) / (2 * lq + 2);
769 cur_h = cur_h + ((lr - (lq - 1)* lx) / 2);
773 while (cur_h + leader_wd <= edge)
775 cur_v = base_line + shift_amount(leader_box);
780 temp_ptr = leader_box;
781 outer_doing_leaders = doing_leaders;
782 doing_leaders = true;
784 if (type(leader_box) == vlist_node)
789 doing_leaders = outer_doing_leaders;
793 cur_h = save_h + leader_wd + lx;
807 cur_h = cur_h + width(p);
812 mem[lig_trick] = mem[lig_char(p)];
813 link(lig_trick) = link(p);
826 if (is_running(rule_ht))
827 rule_ht = height(this_box);
829 if (is_running(rule_dp))
830 rule_dp = depth(this_box);
832 rule_ht = rule_ht + rule_dp;
834 if ((rule_ht > 0) && (rule_wd > 0))
837 cur_v = base_line + rule_dp;
843 dvi_h = dvi_h + rule_wd;
847 cur_h = cur_h + rule_wd;
853 prune_movements(save_loc);
861 void vlist_out (void)
865 scaled save_h, save_v;
867 /* glue_ord g_order; */
876 boolean outer_doing_leaders;
885 g_order = glue_order(this_box);
886 g_sign = glue_sign(this_box);
887 p = list_ptr(this_box);
893 if (cur_s > max_push)
896 save_loc = dvi_offset + dvi_ptr;
898 cur_v = cur_v - height(this_box);
905 confusion("vlistout");
914 if (list_ptr(p) == 0)
915 cur_v = cur_v + height(p) + depth(p);
918 cur_v = cur_v + height(p);
922 cur_h = left_edge + shift_amount(p);
925 if (type(p) == vlist_node)
932 cur_v = save_v + depth(p);
953 rule_ht = width(g) - cur_g;
955 if (g_sign != normal)
957 if (g_sign == stretching)
959 if (stretch_order(g) == g_order)
961 cur_glue = cur_glue + stretch(g);
962 vet_glue(glue_set(this_box) * cur_glue);
963 cur_g = round(glue_temp);
966 else if (shrink_order(g) == g_order) /* BUG FIX !!! */
968 cur_glue = cur_glue - shrink(g);
969 vet_glue(glue_set(this_box) * cur_glue);
970 cur_g = round(glue_temp);
974 rule_ht = rule_ht + cur_g;
976 if (subtype(p) >= a_leaders)
978 leader_box = leader_ptr(p);
980 if (type(leader_box) == rule_node)
982 rule_wd = width(leader_box);
987 leader_ht = height(leader_box) + depth(leader_box);
989 if ((leader_ht > 0) && (rule_ht > 0))
991 rule_ht = rule_ht + 10;
992 edge = cur_v + rule_ht;
995 if (subtype(p) == a_leaders)
998 cur_v = top_edge + leader_ht * ((cur_v - top_edge) / leader_ht);
1001 cur_v = cur_v + leader_ht;
1005 lq = rule_ht / leader_ht;
1006 lr = rule_ht % leader_ht;
1008 if (subtype(p) == c_leaders)
1009 cur_v = cur_v + (lr / 2);
1012 lx = (2 * lr + lq + 1) / (2 * lq + 2);
1013 cur_v = cur_v + ((lr - (lq - 1) * lx) / 2);
1017 while (cur_v + leader_ht <= edge)
1019 cur_h = left_edge + shift_amount(leader_box);
1022 cur_v = cur_v + height(leader_box);
1025 temp_ptr = leader_box;
1026 outer_doing_leaders = doing_leaders;
1027 doing_leaders = true;
1029 if (type(leader_box) == vlist_node)
1034 doing_leaders = outer_doing_leaders;
1038 cur_v = save_v - height(leader_box) + leader_ht + lx;
1051 cur_v = cur_v + width(p);
1061 if (is_running(rule_wd))
1062 rule_wd = width(this_box);
1064 rule_ht = rule_ht + rule_dp;
1065 cur_v = cur_v + rule_ht;
1067 if ((rule_ht > 0) && (rule_wd > 0))
1079 cur_v = cur_v + rule_ht;
1086 prune_movements(save_loc);
1094 void dvi_ship_out_(halfword p)
1101 if (tracing_output > 0)
1105 prints("Completed box being shipped out");
1108 if (term_offset > max_print_line - 9)
1110 else if ((term_offset > 0) || (file_offset > 0))
1116 while ((count(j) == 0) && (j > 0))
1119 for (k = 0; k <= j; k++)
1121 print_int(count(k));
1129 if (tracing_output > 0)
1134 end_diagnostic(true);
1137 if ((height(p) > max_dimen) || (depth(p) > max_dimen) ||
1138 (height(p) + depth(p) + v_offset > max_dimen) ||
1139 (width(p) + h_offset > max_dimen))
1141 print_err("Huge page cannot be shipped out");
1142 help2("The page just created is more than 18 feet tall or",
1143 "more than 18 feet wide, so I suspect something went wrong.");
1146 if (tracing_output <= 0)
1149 print_nl("The following box has been deleted:");
1151 end_diagnostic(true);
1157 if (height(p) + depth(p) + v_offset > max_v)
1158 max_v = height(p) + depth(p) + v_offset;
1160 if (width(p) + h_offset > max_h)
1161 max_h = width(p) + h_offset;
1169 if (total_pages == 0)
1173 dvi_four(25400000L);
1174 dvi_four(473628672L);
1177 old_setting = selector;
1178 selector = new_string;
1179 prints(" TeX output ");
1186 print_two(tex_time / 60);
1187 print_two(tex_time % 60);
1188 selector = old_setting;
1189 dvi_out(cur_length);
1191 for (s = str_start[str_ptr]; s <= pool_ptr - 1; s++)
1192 dvi_out(str_pool[s]);
1194 pool_ptr = str_start[str_ptr];
1197 page_loc = dvi_offset + dvi_ptr;
1200 for (k = 0; k <= 9; k++)
1204 last_bop = page_loc;
1205 cur_v = height(p) + v_offset;
1208 if (type(p) == vlist_node)
1218 if (tracing_output <= 0)
1225 if (tracing_stats > 1)
1227 print_nl("Memory usage before: ");
1228 print_int(var_used);
1230 print_int(dyn_used);
1238 if (tracing_stats > 1)
1241 print_int(var_used);
1243 print_int(dyn_used);
1244 prints("; still utouched: ");
1245 print_int(hi_mem_min - lo_mem_max - 1);
1250 void ship_out_(pointer p)
1252 switch (shipout_flag)
1261 void scan_spec_(group_code c, boolean three_codes)
1269 if (scan_keyword("to"))
1270 spec_code = exactly;
1271 else if (scan_keyword("spread"))
1272 spec_code = additional;
1275 spec_code = additional;
1280 scan_dimen(false, false, false);
1289 saved(0) = spec_code;
1291 save_ptr = save_ptr + 2;
1296 pointer hpack_(pointer p, scaled w, small_number m)
1305 internal_font_number f;
1310 r = get_node(box_node_size);
1311 type(r) = hlist_node;
1313 shift_amount(r) = 0;
1314 q = r + list_offset;
1319 total_stretch[normal] = 0;
1320 total_shrink[normal] = 0;
1321 total_stretch[fil] = 0;
1322 total_shrink[fil] = 0;
1323 total_stretch[fill] = 0;
1324 total_shrink[fill] = 0;
1325 total_stretch[filll] = 0;
1326 total_shrink[filll] = 0;
1332 while (is_char_node(p))
1335 i = char_info(f, character(p));
1336 hd = height_depth(i);
1337 x = x + char_width(f, i);
1338 s = char_height(f, hd);
1343 s = char_depth(f, hd);
1362 if (type(p) >= rule_node)
1365 s = shift_amount(p);
1367 if (height(p) - s > h)
1370 if (depth(p) + s > d)
1378 if (adjust_tail != 0)
1380 while (link(q) != p)
1383 if (type(p) == adjust_node)
1385 link(adjust_tail) = adjust_ptr(p);
1387 while (link(adjust_tail) != 0)
1388 adjust_tail = link(adjust_tail);
1391 free_node(link(q), small_node_size);
1395 link(adjust_tail) = p;
1412 o = stretch_order(g);
1413 total_stretch[o] = total_stretch[o] + stretch(g);
1414 o = shrink_order(g);
1415 total_shrink[o] = total_shrink[o] + shrink(g);
1417 if (subtype(p) >= a_leaders)
1437 mem[lig_trick] = mem[lig_char(p)];
1438 link(lig_trick) = link(p);
1451 if (adjust_tail != 0)
1452 link(adjust_tail) = 0;
1457 if (m == additional)
1465 glue_sign(r) = normal;
1466 glue_order(r) = normal;
1472 if (total_stretch[filll] != 0)
1474 else if (total_stretch[fill] != 0)
1476 else if (total_stretch[fil] != 0)
1482 glue_sign(r) = stretching;
1484 if (total_stretch[o] != 0)
1485 glue_set(r) = x / ((double) total_stretch[o]);
1488 glue_sign(r) = normal;
1493 if (list_ptr(r) != 0)
1495 last_badness = badness(x, total_stretch[normal]);
1497 if (last_badness > hbadness)
1501 if (last_badness > 100)
1502 print_nl("Underfull");
1506 prints(" \\hbox (badness ");
1507 print_int(last_badness);
1509 if (last_badness > 100) /* Y&Y TeX */
1519 if (total_shrink[filll] != 0)
1521 else if (total_shrink[fill] != 0)
1523 else if (total_shrink[fil] != 0)
1529 glue_sign(r) = shrinking;
1531 if (total_shrink[o] != 0)
1532 glue_set(r) = ((- (integer) x) / ((double) total_shrink[o]));
1535 glue_sign(r) = normal;
1539 if ((total_shrink[o] < - (integer) x) && (o == 0) && (list_ptr(r) != 0))
1541 last_badness = 1000000L;
1544 if ((- (integer) x - total_shrink[normal] > hfuzz) || (hbadness < 100))
1546 if ((overfull_rule > 0) && (- (integer) x - total_shrink[0] > hfuzz))
1548 while (link(q) != 0)
1551 link(q) = new_rule();
1552 width(link(q)) = overfull_rule;
1556 print_nl("Overfull \\hbox (");
1557 print_scaled(- (integer) x - total_shrink[normal]);
1558 prints("pt too wide");
1564 else if (o == normal)
1565 if (list_ptr(r) != 0)
1567 last_badness = badness(- (integer) x, total_shrink[normal]);
1569 if (last_badness > hbadness)
1572 print_nl("Tight \\hbox (badness ");
1573 print_int(last_badness);
1583 prints(") has occurred while \\output is active");
1586 if (pack_begin_line != 0)
1588 if (pack_begin_line > 0)
1589 prints(") in paragraph at lines ");
1591 prints(") in alignment at lines ");
1593 print_int(abs(pack_begin_line));
1597 prints(") detected at line ");
1603 font_in_short_display = null_font;
1604 short_display(list_ptr(r));
1608 end_diagnostic(true);
1614 pointer vpackage_(pointer p, scaled h, small_number m, scaled l)
1624 r = get_node(box_node_size);
1625 type(r) = vlist_node;
1626 subtype(r) = min_quarterword;
1627 shift_amount(r) = 0;
1632 total_stretch[normal] = 0;
1633 total_shrink[normal] = 0;
1634 total_stretch[fil] = 0;
1635 total_shrink[fil] = 0;
1636 total_stretch[fill] = 0;
1637 total_shrink[fill] = 0;
1638 total_stretch[filll] = 0;
1639 total_shrink[filll] = 0;
1643 if (is_char_node(p))
1648 else switch (type(p))
1655 x = x + d + height(p);
1658 if (type(p) >= rule_node)
1661 s = shift_amount(p);
1663 if (width(p) + s > w)
1677 o = stretch_order(g);
1678 total_stretch[o] = total_stretch[o] + stretch(g);
1679 o = shrink_order(g);
1680 total_shrink[o] = total_shrink[o] + shrink(g);
1682 if (subtype(p) >= a_leaders)
1694 x = x + d + width(p);
1716 if (m == additional)
1724 glue_sign(r) = normal;
1725 glue_order(r) = normal;
1731 if (total_stretch[filll] != 0)
1733 else if (total_stretch[fill] != 0)
1735 else if (total_stretch[fil] != 0)
1741 glue_sign(r) = stretching;
1743 if (total_stretch[o] != 0)
1744 glue_set(r) = x / ((double) total_stretch[o]);
1747 glue_sign(r) = normal;
1752 if (list_ptr(r) != 0)
1754 last_badness = badness(x, total_stretch[normal]);
1756 if (last_badness > vbadness)
1760 if (last_badness > 100)
1761 print_nl("Underfull");
1765 prints(" \\vbox (badness ");
1766 print_int(last_badness);
1768 if (last_badness > 100)
1778 if (total_shrink[filll] != 0)
1780 else if (total_shrink[fill] != 0)
1782 else if (total_shrink[fil] != 0)
1788 glue_sign(r) = shrinking;
1790 if (total_shrink[o] != 0)
1791 glue_set(r) =(- (integer) x)/ ((double) total_shrink[o]);
1794 glue_sign(r) = normal;
1798 if ((total_shrink[o] < - (integer) x) && (o == 0) && (list_ptr(r) != 0))
1800 last_badness = 1000000L;
1803 if ((- (integer) x - total_shrink[0] > vfuzz) || (vbadness < 100))
1806 print_nl("Overfull \\vbox (");
1807 print_scaled(- (integer) x - total_shrink[0]);
1808 prints("pt too high");
1816 if (list_ptr(r) != 0)
1818 last_badness = badness(- (integer) x, total_shrink[normal]);
1819 if (last_badness > vbadness)
1822 print_nl("Tight \\vbox (badness ");
1823 print_int(last_badness);
1833 prints(") has occurred while \\output is active");
1836 if (pack_begin_line != 0)
1838 prints(") in alignment at lines ");
1839 print_int(abs(pack_begin_line));
1843 prints(") detected at line ");
1851 end_diagnostic(true);
1857 void append_to_vlist (pointer b)
1862 if (prev_depth > ignore_depth)
1864 d = width(baseline_skip) - prev_depth - height(b);
1866 if (d < line_skip_limit)
1867 p = new_param_glue(line_skip_code);
1870 p = new_skip_param(baseline_skip_code);
1871 width(temp_ptr) = d;
1880 prev_depth = depth(b);
1883 pointer new_noad (void)
1887 p = get_node(noad_size);
1889 subtype(p) = normal;
1890 mem[nucleus(p)].hh = empty_field;
1891 mem[subscr(p)].hh = empty_field;
1892 mem[supscr(p)].hh = empty_field;
1897 pointer new_style_(small_number s)
1901 p = get_node(style_node_size);
1902 type(p) = style_node;
1910 pointer new_choice (void)
1914 p = get_node(style_node_size);
1915 type(p) = choice_node;
1917 display_mlist(p) = 0;
1919 script_mlist(p) = 0;
1920 script_script_mlist(p) = 0;
1925 void show_info (void)
1927 show_node_list(info(temp_ptr));
1930 pointer fraction_rule_(scaled t)
1941 pointer overbar_(pointer b, scaled k, scaled t)
1947 q = fraction_rule(t);
1952 return vpackage(p, 0, 1, max_dimen);
1955 pointer char_box_(internal_font_number f, quarterword c)
1961 q = char_info(f, c);
1962 hd = height_depth(q);
1964 width(b) = char_width(f, q) + char_italic(f, q);
1965 height(b) = char_height(f, hd);
1966 depth(b) = char_depth(f, hd);
1975 void stack_into_box_(pointer b, internal_font_number f, quarterword c)
1980 link(p) = list_ptr(b);
1982 height(b) = height(p);
1985 scaled height_plus_depth_(internal_font_number f, quarterword c)
1990 q = char_info(f, c);
1991 hd = height_depth(q);
1993 return char_height(f, hd) + char_depth(f, hd);
1996 pointer var_delimiter_(pointer d, small_number s, scaled v)
1999 internal_font_number f, g;
2000 quarterword c, x, y;
2007 /* small_number z; */
2009 /* boolean large_attempt; */
2014 large_attempt = false;
2020 if ((z != 0) || (x != 0))
2033 if ((y >= font_bc[g]) && (y <= font_ec[g]))
2036 q = char_info(g, y);
2040 if (char_tag(q) == ext_tag)
2047 hd = height_depth(q);
2048 u = char_height(g, hd) + char_depth(g, hd);
2060 if (char_tag(q) == list_tag)
2075 large_attempt = true;
2082 if (char_tag(q) == ext_tag)
2085 type(b) = vlist_node;
2086 r = font_info[exten_base[f] + rem_byte(q)].qqqq;
2088 u = height_plus_depth(f, c);
2090 q = char_info(f, c);
2091 width(b) = char_width(f, q) + char_italic(f, q);
2094 if (c != min_quarterword)
2095 w = w + height_plus_depth(f, c);
2099 if (c != min_quarterword)
2100 w = w + height_plus_depth(f, c);
2104 if (c != min_quarterword)
2105 w = w + height_plus_depth(f, c);
2115 if (ext_mid(r) != min_quarterword)
2121 if (c != min_quarterword)
2122 stack_into_box(b, f, c);
2126 for (m = 1; m <= n; m++)
2127 stack_into_box(b, f, c);
2131 if (c != min_quarterword)
2133 stack_into_box(b, f, c);
2136 for (m = 1; m <= n; m++)
2137 stack_into_box(b, f, c);
2143 stack_into_box(b, f, c);
2145 depth(b) = w - height(b);
2152 width(b) = null_delimiter_space;
2155 shift_amount(b) = half(height(b) - depth(b)) - axis_height(s);
2159 /* rebox_ etc used to follow here in tex4.c */