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;
56 print_char('0' + c / 10);
59 print_char('0' + c % 10);
64 slow_print(font_name[f]);
73 if (show_missing == 0)
74 end_diagnostic(false);
80 pointer new_character_(internal_font_number f, eight_bits c)
86 if (char_exists(char_info(f, c)))
103 printf("dvi_swap() %lld", dvi_gone);
106 if (dvi_limit == dvi_buf_size)
108 write_dvi(0, half_buf - 1);
109 dvi_limit = half_buf;
110 dvi_offset = dvi_offset + dvi_buf_size;
115 write_dvi(half_buf, dvi_buf_size - 1);
116 dvi_limit = dvi_buf_size;
119 dvi_gone = dvi_gone + half_buf;
122 void dvi_four_(integer x)
125 dvi_out(x / 0100000000);
128 x = x + 010000000000;
129 x = x + 010000000000;
130 dvi_out((x / 0100000000) + 128);
134 dvi_out(x / 0200000);
140 void dvi_pop_(integer l)
142 if ((l == dvi_offset + dvi_ptr) && (dvi_ptr > 0))
148 void dvi_font_def (internal_font_number f)
161 dvi_out(((f - 1) >> 8));
162 dvi_out(((f - 1) & 255));
169 dvi_out(font_check[f].b0);
170 dvi_out(font_check[f].b1);
171 dvi_out(font_check[f].b2);
172 dvi_out(font_check[f].b3);
173 dvi_four(font_size[f]);
174 dvi_four(font_dsize[f]);
175 dvi_out(length(font_area[f]));
176 dvi_out(length(font_name[f]));
178 for (k = str_start[font_area[f]]; k <= str_start[font_area[f] + 1] - 1; k++)
179 dvi_out(str_pool[k]);
181 for (k = str_start[font_name[f]]; k <= str_start[font_name[f] + 1] - 1; k++)
182 dvi_out(str_pool[k]);
185 void movement (scaled w, eight_bits o)
191 q = get_node(movement_node_size);
193 location(q) = dvi_offset + dvi_ptr;
212 switch (mstate + info(p))
214 case none_seen + yz_OK:
215 case none_seen + y_OK:
218 if (location(p) < dvi_gone)
222 k = location(p) - dvi_offset;
225 k = k + dvi_buf_size;
227 dvi_buf[k] = dvi_buf[k] + y1 - down1;
233 case none_seen + z_OK:
236 if (location(p) < dvi_gone)
240 k = location(p) - dvi_offset;
243 k = k + dvi_buf_size;
245 dvi_buf[k] = dvi_buf[k] + z1 - down1;
251 case none_seen + y_here:
252 case none_seen + z_here:
253 case y_seen + z_here:
254 case z_seen + y_here:
262 switch (mstate + info(p))
264 case none_seen + y_here:
268 case none_seen + z_here:
272 case y_seen + z_here:
273 case z_seen + y_here:
288 if (abs(w) >= 8388608L) /* 2^23 */
295 if (abs(w) >= 32768L)
300 w = w + 16777216L; /* 2^24 */
301 //dvi_out(w / 65536L);
335 if (info(q) == y_here)
337 dvi_out(o + y0 - down1);
360 dvi_out(o + z0 - down1);
383 void prune_movements (integer l)
387 while (down_ptr != 0)
389 if (location(down_ptr) < l)
394 free_node(p, movement_node_size);
398 while (right_ptr != 0)
400 if (location(right_ptr) < l)
405 free_node(p, movement_node_size);
409 void special_out (pointer p)
416 old_setting = selector;
417 selector = new_string;
419 #ifdef ALLOCATESTRING
420 if (pool_ptr + 32000 > current_pool_size)
421 str_pool = realloc_str_pool (increment_pool_size);
423 show_token_list(link(write_tokens(p)), 0, 10000000L);
425 show_token_list(link(write_tokens(p)), 0, pool_size - pool_ptr);
428 selector = old_setting;
431 spc_exec_special(str_pool + str_start[str_ptr], cur_length, cur_h * 0.000015202, -cur_v * 0.000015202, 1.0);
433 if (cur_length < 256)
441 dvi_four(cur_length);
444 for (k = str_start[str_ptr]; k <= pool_ptr - 1; k++)
445 dvi_out(str_pool[k]);
447 pool_ptr = str_start[str_ptr];
450 void write_out (pointer p)
453 /* integer old_mode; */
455 /* small_number j; */
460 info(q) = right_brace_token + '}';
463 info(r) = end_write_token;
465 begin_token_list(write_tokens(p), write_text);
467 info(q) = left_brace_token + '{';
472 q = scan_toks(false, true);
475 if (cur_tok != end_write_token)
477 print_err("Unbalanced write command");
478 help2("On this page there's a \\write with fewer real {'s than }'s.",
479 "I can't handle that very well; good luck.");
486 while (!(cur_tok == end_write_token));
491 old_setting = selector;
498 if ((j == 17) && (selector == term_and_log))
507 selector = old_setting;
510 void out_what (pointer p)
512 /* small_number j; */
524 if (subtype(p) == write_node)
529 a_close(write_file[j]);
531 if (subtype(p) == close_node)
532 write_open[j]= false;
535 cur_name = open_name(p);
536 cur_area = open_area(p);
537 cur_ext = open_ext(p);
539 if (cur_ext == 335) /* "" */
540 cur_ext = 785; /* ".tex" */
542 pack_file_name(cur_name, cur_area, cur_ext);
544 while (!a_open_out(write_file[j]))
545 prompt_file_name("output file name", ".tex");
547 write_open[j] = true;
570 void hlist_out (void)
574 scaled save_h, save_v;
576 /* glue_ord g_order; */
585 boolean outer_doing_leaders;
594 g_order = glue_order(this_box);
595 g_sign = glue_sign(this_box);
596 p = list_ptr(this_box);
602 if (cur_s > max_push)
605 save_loc = dvi_offset + dvi_ptr;
629 if (f <= 64 + font_base)
630 dvi_out(f - font_base - 1 + fnt_num_0);
640 dvi_out(((f - 1) >> 8));
641 dvi_out(((f - 1) & 255));
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_(pointer 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 //printf("init pdf devices.");
1254 //printf("DPX test");
1257 switch (shipout_flag)
1269 void scan_spec (group_code c, boolean three_codes)
1277 if (scan_keyword("to"))
1278 spec_code = exactly;
1279 else if (scan_keyword("spread"))
1280 spec_code = additional;
1283 spec_code = additional;
1288 scan_dimen(false, false, false);
1297 saved(0) = spec_code;
1299 save_ptr = save_ptr + 2;
1304 pointer hpack_(pointer p, scaled w, small_number m)
1313 internal_font_number f;
1318 r = get_node(box_node_size);
1319 type(r) = hlist_node;
1321 shift_amount(r) = 0;
1322 q = r + list_offset;
1327 total_stretch[normal] = 0;
1328 total_shrink[normal] = 0;
1329 total_stretch[fil] = 0;
1330 total_shrink[fil] = 0;
1331 total_stretch[fill] = 0;
1332 total_shrink[fill] = 0;
1333 total_stretch[filll] = 0;
1334 total_shrink[filll] = 0;
1340 while (is_char_node(p))
1343 i = char_info(f, character(p));
1344 hd = height_depth(i);
1345 x = x + char_width(f, i);
1346 s = char_height(f, hd);
1351 s = char_depth(f, hd);
1370 if (type(p) >= rule_node)
1373 s = shift_amount(p);
1375 if (height(p) - s > h)
1378 if (depth(p) + s > d)
1386 if (adjust_tail != 0)
1388 while (link(q) != p)
1391 if (type(p) == adjust_node)
1393 link(adjust_tail) = adjust_ptr(p);
1395 while (link(adjust_tail) != 0)
1396 adjust_tail = link(adjust_tail);
1399 free_node(link(q), small_node_size);
1403 link(adjust_tail) = p;
1420 o = stretch_order(g);
1421 total_stretch[o] = total_stretch[o] + stretch(g);
1422 o = shrink_order(g);
1423 total_shrink[o] = total_shrink[o] + shrink(g);
1425 if (subtype(p) >= a_leaders)
1445 mem[lig_trick] = mem[lig_char(p)];
1446 link(lig_trick) = link(p);
1459 if (adjust_tail != 0)
1460 link(adjust_tail) = 0;
1465 if (m == additional)
1473 glue_sign(r) = normal;
1474 glue_order(r) = normal;
1480 if (total_stretch[filll] != 0)
1482 else if (total_stretch[fill] != 0)
1484 else if (total_stretch[fil] != 0)
1490 glue_sign(r) = stretching;
1492 if (total_stretch[o] != 0)
1493 glue_set(r) = x / ((double) total_stretch[o]);
1496 glue_sign(r) = normal;
1501 if (list_ptr(r) != 0)
1503 last_badness = badness(x, total_stretch[normal]);
1505 if (last_badness > hbadness)
1509 if (last_badness > 100)
1510 print_nl("Underfull");
1514 prints(" \\hbox (badness ");
1515 print_int(last_badness);
1517 if (last_badness > 100)
1528 if (total_shrink[filll] != 0)
1530 else if (total_shrink[fill] != 0)
1532 else if (total_shrink[fil] != 0)
1538 glue_sign(r) = shrinking;
1540 if (total_shrink[o] != 0)
1541 glue_set(r) = ((- (integer) x) / ((double) total_shrink[o]));
1544 glue_sign(r) = normal;
1548 if ((total_shrink[o] < - (integer) x) && (o == 0) && (list_ptr(r) != 0))
1550 last_badness = 1000000L;
1553 if ((- (integer) x - total_shrink[normal] > hfuzz) || (hbadness < 100))
1555 if ((overfull_rule > 0) && (- (integer) x - total_shrink[0] > hfuzz))
1557 while (link(q) != 0)
1560 link(q) = new_rule();
1561 width(link(q)) = overfull_rule;
1565 print_nl("Overfull \\hbox (");
1566 print_scaled(- (integer) x - total_shrink[normal]);
1567 prints("pt too wide");
1573 else if (o == normal)
1574 if (list_ptr(r) != 0)
1576 last_badness = badness(- (integer) x, total_shrink[normal]);
1578 if (last_badness > hbadness)
1581 print_nl("Tight \\hbox (badness ");
1582 print_int(last_badness);
1593 prints(") has occurred while \\output is active");
1596 if (pack_begin_line != 0)
1598 if (pack_begin_line > 0)
1599 prints(") in paragraph at lines ");
1601 prints(") in alignment at lines ");
1603 print_int(abs(pack_begin_line));
1607 prints(") detected at line ");
1613 font_in_short_display = null_font;
1614 short_display(list_ptr(r));
1618 end_diagnostic(true);
1624 pointer vpackage_(pointer p, scaled h, small_number m, scaled l)
1634 r = get_node(box_node_size);
1635 type(r) = vlist_node;
1636 subtype(r) = min_quarterword;
1637 shift_amount(r) = 0;
1642 total_stretch[normal] = 0;
1643 total_shrink[normal] = 0;
1644 total_stretch[fil] = 0;
1645 total_shrink[fil] = 0;
1646 total_stretch[fill] = 0;
1647 total_shrink[fill] = 0;
1648 total_stretch[filll] = 0;
1649 total_shrink[filll] = 0;
1653 if (is_char_node(p))
1658 else switch (type(p))
1665 x = x + d + height(p);
1668 if (type(p) >= rule_node)
1671 s = shift_amount(p);
1673 if (width(p) + s > w)
1687 o = stretch_order(g);
1688 total_stretch[o] = total_stretch[o] + stretch(g);
1689 o = shrink_order(g);
1690 total_shrink[o] = total_shrink[o] + shrink(g);
1692 if (subtype(p) >= a_leaders)
1704 x = x + d + width(p);
1726 if (m == additional)
1734 glue_sign(r) = normal;
1735 glue_order(r) = normal;
1741 if (total_stretch[filll] != 0)
1743 else if (total_stretch[fill] != 0)
1745 else if (total_stretch[fil] != 0)
1751 glue_sign(r) = stretching;
1753 if (total_stretch[o] != 0)
1754 glue_set(r) = x / ((double) total_stretch[o]);
1757 glue_sign(r) = normal;
1762 if (list_ptr(r) != 0)
1764 last_badness = badness(x, total_stretch[normal]);
1766 if (last_badness > vbadness)
1770 if (last_badness > 100)
1771 print_nl("Underfull");
1775 prints(" \\vbox (badness ");
1776 print_int(last_badness);
1778 if (last_badness > 100)
1789 if (total_shrink[filll] != 0)
1791 else if (total_shrink[fill] != 0)
1793 else if (total_shrink[fil] != 0)
1799 glue_sign(r) = shrinking;
1801 if (total_shrink[o] != 0)
1802 glue_set(r) = (- (integer) x) / ((double) total_shrink[o]);
1805 glue_sign(r) = normal;
1809 if ((total_shrink[o] < - (integer) x) && (o == 0) && (list_ptr(r) != 0))
1811 last_badness = 1000000L;
1814 if ((- (integer) x - total_shrink[0] > vfuzz) || (vbadness < 100))
1817 print_nl("Overfull \\vbox (");
1818 print_scaled(- (integer) x - total_shrink[0]);
1819 prints("pt too high");
1827 if (list_ptr(r) != 0)
1829 last_badness = badness(- (integer) x, total_shrink[normal]);
1830 if (last_badness > vbadness)
1833 print_nl("Tight \\vbox (badness ");
1834 print_int(last_badness);
1845 prints(") has occurred while \\output is active");
1848 if (pack_begin_line != 0)
1850 prints(") in alignment at lines ");
1851 print_int(abs(pack_begin_line));
1855 prints(") detected at line ");
1863 end_diagnostic(true);
1869 void append_to_vlist (pointer b)
1874 if (prev_depth > ignore_depth)
1876 d = width(baseline_skip) - prev_depth - height(b);
1878 if (d < line_skip_limit)
1879 p = new_param_glue(line_skip_code);
1882 p = new_skip_param(baseline_skip_code);
1883 width(temp_ptr) = d;
1892 prev_depth = depth(b);
1895 pointer new_noad (void)
1899 p = get_node(noad_size);
1901 subtype(p) = normal;
1902 mem[nucleus(p)].hh = empty_field;
1903 mem[subscr(p)].hh = empty_field;
1904 mem[supscr(p)].hh = empty_field;
1909 pointer new_style (small_number s)
1913 p = get_node(style_node_size);
1914 type(p) = style_node;
1922 pointer new_choice (void)
1926 p = get_node(style_node_size);
1927 type(p) = choice_node;
1929 display_mlist(p) = 0;
1931 script_mlist(p) = 0;
1932 script_script_mlist(p) = 0;
1937 void show_info (void)
1939 show_node_list(info(temp_ptr));
1942 pointer fraction_rule (scaled t)
1953 pointer overbar (pointer b, scaled k, scaled t)
1959 q = fraction_rule(t);
1964 return vpackage(p, 0, 1, max_dimen);
1967 pointer char_box (internal_font_number f, quarterword c)
1973 q = char_info(f, c);
1974 hd = height_depth(q);
1976 width(b) = char_width(f, q) + char_italic(f, q);
1977 height(b) = char_height(f, hd);
1978 depth(b) = char_depth(f, hd);
1987 void stack_into_box (pointer b, internal_font_number f, quarterword c)
1992 link(p) = list_ptr(b);
1994 height(b) = height(p);
1997 scaled height_plus_depth (internal_font_number f, quarterword c)
2002 q = char_info(f, c);
2003 hd = height_depth(q);
2005 return char_height(f, hd) + char_depth(f, hd);
2008 pointer var_delimiter (pointer d, small_number s, scaled v)
2011 internal_font_number f, g;
2012 quarterword c, x, y;
2019 /* small_number z; */
2021 boolean large_attempt;
2025 large_attempt = false;
2031 if ((z != 0) || (x != 0))
2044 if ((y >= font_bc[g]) && (y <= font_ec[g]))
2047 q = char_info(g, y);
2051 if (char_tag(q) == ext_tag)
2058 hd = height_depth(q);
2059 u = char_height(g, hd) + char_depth(g, hd);
2071 if (char_tag(q) == list_tag)
2086 large_attempt = true;
2093 if (char_tag(q) == ext_tag)
2096 type(b) = vlist_node;
2097 r = font_info[exten_base[f] + rem_byte(q)].qqqq;
2099 u = height_plus_depth(f, c);
2101 q = char_info(f, c);
2102 width(b) = char_width(f, q) + char_italic(f, q);
2105 if (c != min_quarterword)
2106 w = w + height_plus_depth(f, c);
2110 if (c != min_quarterword)
2111 w = w + height_plus_depth(f, c);
2115 if (c != min_quarterword)
2116 w = w + height_plus_depth(f, c);
2126 if (ext_mid(r) != min_quarterword)
2132 if (c != min_quarterword)
2133 stack_into_box(b, f, c);
2137 for (m = 1; m <= n; m++)
2138 stack_into_box(b, f, c);
2142 if (c != min_quarterword)
2144 stack_into_box(b, f, c);
2147 for (m = 1; m <= n; m++)
2148 stack_into_box(b, f, c);
2154 stack_into_box(b, f, c);
2156 depth(b) = w - height(b);
2163 width(b) = null_delimiter_space;
2166 shift_amount(b) = half(height(b) - depth(b)) - axis_height(s);