home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / CMTEX330 / SOURCE / MATHLIST.C < prev    next >
C/C++ Source or Header  |  1992-02-19  |  15KB  |  786 lines

  1.  
  2. /*
  3.  * %Y%:%M%:%I%:%Q%
  4.  *
  5.  * Copyright 1987,1988,1991 Pat J Monardo
  6.  *
  7.  * Redistribution of this file is permitted through
  8.  * the specifications in the file COPYING.
  9.  *
  10.  * 
  11.  */
  12.  
  13. #ifndef lint
  14. static char *sccsid = "%A%";
  15. #endif
  16.  
  17. #include "tex.h"
  18.  
  19. void
  20. push_math (c)
  21.     int    c;
  22. {
  23.     push_nest();
  24.     mode = -MMODE;
  25.     incompleat_noad = null;
  26.     new_save_level(c);
  27. }
  28.  
  29. void
  30. init_math ()
  31. {
  32.     fnt    f;
  33.     int    m, n;
  34.     ptr    p, q;
  35.     scal    d, l, s, v, w;
  36.  
  37.     get_token();
  38.     if (cur_cmd == MATH_SHIFT && mode > 0) {
  39.         if (head == tail) {
  40.             pop_nest();
  41.             w = -MAX_DIMEN;
  42.         } else {
  43.             line_break(display_widow_penalty);
  44.             v = shift_amount(just_box) + 2 * quad(cur_font);
  45.             w = -MAX_DIMEN;
  46.             p = list_ptr(just_box);
  47.             while (p != null) {
  48.         reswitch:
  49.                 if (is_char_node(p)) {
  50.                     f = font(p);
  51.                     d = char_width(f,
  52.                         char_info(f, character(p)));
  53.                     goto found;
  54.                 }
  55.                 switch (type(p))
  56.                 {
  57.                 case HLIST_NODE:
  58.                 case VLIST_NODE:
  59.                 case RULE_NODE:
  60.                     d = box_width(p);
  61.                     goto found;
  62.                 
  63.                 case LIGATURE_NODE:
  64.                     p = make_char_from_lig(p);
  65.                     goto reswitch;
  66.                 
  67.                 case KERN_NODE:
  68.                     d = kern_width(p);
  69.                     break;
  70.  
  71.                 case MATH_NODE:
  72.                     d = box_width(p);
  73.                     break;
  74.  
  75.                 case GLUE_NODE:
  76.                     q = glue_ptr(p);
  77.                     d = box_width(q);
  78.                     if (glue_sign(just_box) ==
  79.                         STRETCHING) {
  80.                         if (glue_order(just_box) ==
  81.                             stretch_order(q)
  82.                         && stretch(q) != 0)
  83.                             v = MAX_DIMEN;
  84.                     } else if (glue_sign(just_box) ==
  85.                         SHRINKING)  {
  86.                         if (glue_order(just_box) ==
  87.                             shrink_order(q)
  88.                         && shrink(q) != 0) 
  89.                             v = MAX_DIMEN;
  90.                     }
  91.                     if (subtype(p) >= A_LEADERS)    
  92.                         goto found;
  93.                     break;
  94.  
  95.                 case WHATSIT_NODE: 
  96.                     d = 0;
  97.                     break;
  98.  
  99.                 default:
  100.                     d = 0;
  101.                     break;
  102.                 }
  103.                 if (v < MAX_DIMEN)
  104.                     v += d;
  105.                 goto not_found;
  106.             
  107.             found:
  108.                 if (v < MAX_DIMEN) {
  109.                     v += d;
  110.                     w = v;
  111.                 } else {
  112.                     w = MAX_DIMEN;
  113.                     break;
  114.                 }
  115.  
  116.             not_found:
  117.                 p = link(p);
  118.             }
  119.         }
  120.         if (par_shape_ptr == null) {
  121.             if (hang_indent != 0
  122.             && (hang_after >= 0
  123.                 && prev_graf + 2 > hang_after
  124.                     || prev_graf + 1 < -hang_after)) {
  125.                 l = hsize - abs(hang_indent);
  126.                 s = (hang_indent > 0) ? hang_indent : 0;
  127.             } else {
  128.                 l = hsize;
  129.                 s = 0;
  130.             }
  131.         } else {
  132.             n = info(par_shape_ptr);
  133.             if (prev_graf + 2 >= n)
  134.                 m = n;
  135.             else m = prev_graf + 2;
  136.             l = par_shape_width(m);
  137.             s = par_shape_indent(m);
  138.         }
  139.         push_math(MATH_SHIFT_GROUP);
  140.         mode = MMODE;
  141.         reg_define(int_reg[CUR_FAM_CODE], INT_REG, -1);
  142.         reg_define(dimen_reg[PRE_DISPLAY_SIZE_CODE], DIMEN_REG, w);
  143.         reg_define(dimen_reg[DISPLAY_WIDTH_CODE], DIMEN_REG, l);
  144.         reg_define(dimen_reg[DISPLAY_INDENT_CODE], DIMEN_REG, s);
  145.         if (every_display != null)
  146.             begin_token_list(every_display, EVERY_DISPLAY_TEXT);
  147.         if (nest_ptr == nest + 1)
  148.             build_page();
  149.     } else {
  150.         back_input(); 
  151.         push_math(MATH_SHIFT_GROUP);
  152.         reg_define(int_reg[CUR_FAM_CODE], INT_REG, -1);
  153.         if (every_math != null)
  154.             begin_token_list(every_math, EVERY_MATH_TEXT);
  155.     }
  156. }
  157.  
  158. void
  159. start_eq_no ()
  160. {
  161.     saved(0) = cur_chr;
  162.     incr(save_ptr);
  163.     push_math(MATH_SHIFT_GROUP);
  164.     reg_define(int_reg[CUR_FAM_CODE], INT_REG, -1);
  165.     if (every_math != null)
  166.         begin_token_list(every_math, EVERY_MATH_TEXT);
  167. }
  168.  
  169. #define fam_in_range()    (cur_fam >= 0 && cur_fam < 16)
  170.  
  171. void
  172. scan_math (p)
  173.     ptr    p;
  174. {
  175.     int    c;
  176.  
  177. restart:
  178.     get_nbrx_token();
  179.  
  180. reswitch:
  181.     switch (cur_cmd)
  182.     {
  183.     case LETTER:
  184.     case OTHER_CHAR:
  185.     case CHAR_GIVEN:
  186.         c = math_code(cur_chr);
  187.         if (c == 0100000) {
  188.             cur_cs = active_base[cur_chr];
  189.             cur_cmd = eq_type(cur_cs);
  190.             cur_chr = equiv(cur_cs);
  191.             x_token();
  192.             back_input();
  193.             goto restart;
  194.         }
  195.         break;
  196.     
  197.     case CHAR_NUM:
  198.         scan_char_num();
  199.         cur_chr = cur_val;
  200.         cur_cmd = CHAR_GIVEN;
  201.         goto reswitch;
  202.     
  203.     case MATH_CHAR_NUM:
  204.         scan_fifteen_bit_int();
  205.         c = cur_val;
  206.         break;
  207.  
  208.     case MATH_GIVEN:
  209.         c = cur_chr;
  210.         break;
  211.         
  212.     case DELIM_NUM:
  213.         scan_twenty_seven_bit_int();
  214.         c = cur_val / 010000;
  215.         break;
  216.  
  217.     default:
  218.         back_input();
  219.         scan_left_brace();
  220.         saved(0) = p;
  221.         incr(save_ptr);
  222.         push_math(MATH_GROUP);
  223.         return;
  224.     }
  225.     math_type(p) = MATH_CHAR;
  226.     character(p) = c % 256;
  227.     if (c >= VAR_CODE && fam_in_range()) {
  228.         fam(p) = cur_fam;
  229.     } else {
  230.         fam(p) = c / 256 % 16;
  231.     }
  232. }
  233.  
  234. void
  235. set_math_char (c)
  236.     int    c;
  237. {
  238.     ptr    p;
  239.  
  240.     if (c >= 0100000) {
  241.         cur_cs = active_base[cur_chr];
  242.         cur_cmd = eq_type(cur_cs);
  243.         cur_chr = equiv(cur_cs);
  244.         x_token();
  245.         back_input();
  246.     } else {
  247.         p = new_noad();
  248.         math_type(nucleus(p)) = MATH_CHAR;
  249.         character(nucleus(p)) = c % 256;
  250.         fam(nucleus(p)) = c / 256 % 16;
  251.         if (c >= VAR_CODE) {
  252.             if (fam_in_range())
  253.                 fam(nucleus(p)) = cur_fam;
  254.             type(p) = ORD_NOAD;
  255.         } else {
  256.             type(p) = ORD_NOAD + c / 010000;
  257.         }
  258.         tail_append(p);
  259.     }
  260. }
  261.  
  262. void
  263. math_limit_switch ()
  264. {
  265.     if (head != tail && type(tail) == OP_NOAD) {
  266.         subtype(tail) = cur_chr;
  267.         return;
  268.     }
  269.     print_err("Limit controls must follow a math operator");
  270.     help_limits();
  271.     error();
  272. }
  273.  
  274. void
  275. scan_delimiter (p, r)
  276.     ptr    p;
  277.     bool    r;
  278. {
  279.     if (r) {
  280.         scan_twenty_seven_bit_int();
  281.     } else {
  282.         get_nbrx_token();
  283.         switch (cur_cmd) 
  284.         {
  285.         case LETTER:
  286.         case OTHER_CHAR:
  287.             cur_val = del_code(cur_chr);
  288.             break;
  289.  
  290.         case DELIM_NUM:
  291.             scan_twenty_seven_bit_int();
  292.             break;
  293.  
  294.         default:
  295.             cur_val = -1;
  296.             break;
  297.         }
  298.     }
  299.     if (cur_val < 0) {
  300.         print_err("Missing delimiter (. inserted)");
  301.         help_delimiter();
  302.         back_error();
  303.         cur_val = 0;
  304.     }
  305.     small_fam(p) = cur_val / 04000000 % 16;
  306.     small_char(p) = cur_val / 010000 % 256;
  307.     large_fam(p) = cur_val / 256 % 16;
  308.     large_char(p) = cur_val % 256;
  309. }
  310.  
  311. void
  312. math_radical ()
  313. {
  314.     tail_append(new_node(RADICAL_NOAD_SIZE));
  315.     type(tail) = RADICAL_NOAD;
  316.     subtype(tail) = NORMAL;
  317.     mzero(nucleus(tail));
  318.     mzero(supscr(tail));
  319.     mzero(subscr(tail));
  320.     scan_delimiter(left_delimiter(tail), TRUE);
  321.     scan_math(nucleus(tail));
  322. }
  323.  
  324. void
  325. math_ac ()
  326. {
  327.     if (cur_cmd == ACCENT) {
  328.         print_err("Please use ");
  329.         print_esc("mathaccent");
  330.         print(" for accents in math mode");
  331.         help_math_accent();
  332.         error();
  333.     }
  334.     tail_append(new_node(ACCENT_NOAD_SIZE));
  335.     type(tail) = ACCENT_NOAD;
  336.     subtype(tail) = NORMAL;
  337.     mzero(nucleus(tail));
  338.     mzero(subscr(tail));
  339.     mzero(supscr(tail));
  340.     math_type(accent_chr(tail)) = MATH_CHAR;
  341.     scan_fifteen_bit_int();
  342.     character(accent_chr(tail)) = cur_val % 256;
  343.     if (cur_val >= VAR_CODE && fam_in_range()) {
  344.         fam(accent_chr(tail)) = cur_fam;
  345.     } else {
  346.         fam(accent_chr(tail)) = cur_val / 256 % 16;
  347.     }
  348.     scan_math(nucleus(tail));
  349. }
  350.  
  351. void
  352. append_choices ()
  353. {
  354.     tail_append(new_choice());
  355.     incr(save_ptr);
  356.     saved(-1) = 0;
  357.     scan_left_brace();
  358.     push_math(MATH_CHOICE_GROUP);
  359. }
  360.  
  361. void
  362. build_choices ()
  363. {
  364.     ptr    p;
  365.  
  366.     unsave();
  367.     p = fin_mlist(null);
  368.     switch (saved(-1)) {
  369.     case 0: display_mlist(tail) = p; break;
  370.     case 1: text_mlist(tail) = p; break;
  371.     case 2: script_mlist(tail) = p; break;
  372.     case 3: script_script_mlist(tail) = p; decr(save_ptr); return;
  373.     }
  374.     incr(saved(-1));
  375.     scan_left_brace();
  376.     push_math(MATH_CHOICE_GROUP);
  377. }
  378.  
  379. void
  380. sub_sup ()
  381. {
  382.     ptr    p;
  383.     int    t;
  384.  
  385.     p = null;
  386.     t = EMPTY;
  387.     if (tail != head && scripts_allowed(tail)) {
  388.         p = (cur_cmd == SUP_MARK) ? supscr(tail) : subscr(tail);
  389.         t = math_type(p);
  390.     }
  391.     if (p == null || t != EMPTY) {
  392.         tail_append(new_noad());
  393.         p = (cur_cmd == SUP_MARK) ? supscr(tail) : subscr(tail);
  394.         if (t != EMPTY) {
  395.             if (cur_cmd == SUP_MARK) {
  396.                 print_err("Double superscript");
  397.                 help_double_sup();
  398.             } else {
  399.                 print_err("Double subscript");
  400.                 help_double_sub();
  401.             }
  402.             error();
  403.         }
  404.     }
  405.     scan_math(p);
  406. }
  407.  
  408. void
  409. math_fraction ()
  410. {
  411.     int    c;
  412.     mcell    garbage;
  413.  
  414.     c = cur_chr;
  415.     if (incompleat_noad != null) {
  416.         if (c >= DELIMITED_CODE) {
  417.             scan_delimiter((ptr)&garbage, FALSE);
  418.             scan_delimiter((ptr)&garbage, FALSE);
  419.         }
  420.         if (c % DELIMITED_CODE == ABOVE_CODE)
  421.             scan_normal_dimen();
  422.         print_err("Ambiguous; you need another { and }");
  423.         help_fraction();
  424.         error();
  425.     } else {
  426.         incompleat_noad = new_node(FRACTION_NOAD_SIZE);
  427.         type(incompleat_noad) = FRACTION_NOAD;
  428.         subtype(incompleat_noad) = NORMAL;
  429.         math_type(numerator(incompleat_noad)) = SUB_MLIST;
  430.         math_link(numerator(incompleat_noad)) = link(head);
  431.         mzero(denominator(incompleat_noad));
  432.         mzero(left_delimiter(incompleat_noad));
  433.         mzero(right_delimiter(incompleat_noad));
  434.         link(head) = null;
  435.         tail = head;
  436.         if (c >= DELIMITED_CODE) {
  437.             scan_delimiter(left_delimiter(incompleat_noad), FALSE);
  438.             scan_delimiter(right_delimiter(incompleat_noad), FALSE);
  439.         }
  440.         switch (c % DELIMITED_CODE)
  441.         {
  442.         case ABOVE_CODE:
  443.             scan_normal_dimen();
  444.             thickness(incompleat_noad) = cur_val;
  445.             break;
  446.  
  447.         case OVER_CODE:
  448.             thickness(incompleat_noad) = DEFAULT_CODE;
  449.             break;
  450.  
  451.         case ATOP_CODE:
  452.             thickness(incompleat_noad) = 0;
  453.             break;
  454.         }
  455.     }
  456. }
  457.  
  458.  
  459. void
  460. math_left_right ()
  461. {
  462.     ptr    p;
  463.     int    t;
  464.     mcell    garbage;
  465.  
  466.     t = cur_chr;
  467.     if (t == RIGHT_NOAD && cur_group != MATH_LEFT_GROUP) {
  468.         if (cur_group == MATH_SHIFT_GROUP) {
  469.             scan_delimiter((ptr)&garbage, FALSE);
  470.             print_err("Extra ");
  471.             print_esc("right");
  472.             help_xtra_right();
  473.             error();
  474.         } else {
  475.             off_save();
  476.         }
  477.     } else {
  478.         p = new_noad();
  479.         type(p) = t;
  480.         scan_delimiter(delimiter(p), FALSE);
  481.         if (t == LEFT_NOAD) {
  482.             push_math(MATH_LEFT_GROUP);
  483.             tail = link(head) = p;
  484.         } else {
  485.             p = fin_mlist(p);
  486.             unsave();
  487.             tail_append(new_noad());
  488.             type(tail) = INNER_NOAD;
  489.             math_type(nucleus(tail)) = SUB_MLIST;
  490.             math_link(nucleus(tail)) = p;
  491.         }
  492.     }
  493. }
  494.  
  495. ptr
  496. fin_mlist (p)
  497.     ptr    p;
  498. {
  499.     ptr    q;
  500.  
  501.     if (incompleat_noad != null) {
  502.         math_type(denominator(incompleat_noad)) = SUB_MLIST;
  503.         math_link(denominator(incompleat_noad)) = link(head);
  504.         if (p == null) {
  505.             q = incompleat_noad;
  506.         } else {
  507.             q = info(numerator(incompleat_noad));
  508.             if (type(q) != LEFT_NOAD)
  509.                 confusion("right");
  510.             math_link(numerator(incompleat_noad)) = link(q);
  511.             link(q) = incompleat_noad;
  512.             link(incompleat_noad) = p;
  513.         }
  514.     } else {
  515.         link(tail) = p;
  516.         q = link(head);
  517.     }
  518.     pop_nest();
  519.     return q;
  520. }
  521.  
  522. void
  523. after_math ()
  524. {
  525.     ptr    a;
  526.     ptr    b;
  527.     scal    d;
  528.     scal    e;
  529.     bool    l;
  530.     int    m;
  531.     ptr    p;
  532.     scal    q;
  533.     ptr    r;
  534.     scal    s;
  535.     scal    t;
  536.     scal    w;
  537.     scal    z;
  538.     int    g1;
  539.     int    g2;
  540.     bool    danger;
  541.  
  542.     danger = check_font_params();
  543.     m = mode;
  544.     l = FALSE;
  545.     p = fin_mlist(null);
  546.     if (mode == -m) {
  547.         check_dollar();
  548.         a = hpack(mlist_to_hlist(p, TEXT_STYLE, FALSE), NATURAL);
  549.         unsave();
  550.         decr(save_ptr);
  551.         if (saved(0) == 1)
  552.             l = TRUE;
  553.         danger = check_font_params();
  554.         m = mode;
  555.         p = fin_mlist(null);
  556.     } else {
  557.         a = null;
  558.     }
  559.     if (m < 0) {
  560.         tail_append(new_math(math_surround, BEFORE));
  561.         link(tail) = mlist_to_hlist(p, TEXT_STYLE, mode > 0);
  562.         while (link(tail) != null)
  563.             tail = link(tail);
  564.         tail_append(new_math(math_surround, AFTER));
  565.         space_factor = 1000;
  566.         unsave();
  567.     } else {
  568.         if (a == null)
  569.             check_dollar();
  570.         p = mlist_to_hlist(p, DISPLAY_STYLE, FALSE);
  571.         adjust_tail = adjust_head;
  572.         b = hpack(p, NATURAL);
  573.         p = list_ptr(b);
  574.         t = adjust_tail;
  575.         adjust_tail = null;
  576.         w = box_width(b);
  577.         z = display_width;
  578.         s = display_indent;
  579.         if (a == null || danger) {
  580.             e = q = 0;
  581.         } else {
  582.             e = box_width(a);
  583.             q = e + math_quad(TEXT_SIZE);
  584.         }
  585.         if (w + q > z) {
  586.             if (e != 0
  587.             && (w - total_shrink[NORMAL] + q <= z
  588.             || total_shrink[FIL] != 0
  589.             || total_shrink[FILL] != 0
  590.             || total_shrink[FILLL] != 0)) {
  591.                 free_node(b, BOX_NODE_SIZE);
  592.                 b = hpack(p, z - q, EXACTLY);
  593.             } else {
  594.                 e = 0;
  595.                 if (w > z) {
  596.                     free_node(b, BOX_NODE_SIZE);
  597.                     b = hpack(p, z, EXACTLY);
  598.                 }
  599.             }
  600.             w = box_width(b);
  601.         }
  602.         d = half(z - w);
  603.         if (e > 0 && d < 2 * e) {
  604.             d = half(z - w - e);
  605.             if (p != null && type(p) == GLUE_NODE) {
  606.                 d = 0;
  607.             }
  608.         }
  609.         tail_append(new_penalty(pre_display_penalty));
  610.         if (d + s <= pre_display_size || l) {
  611.             g1 = ABOVE_DISPLAY_SKIP_CODE;
  612.             g2 = BELOW_DISPLAY_SKIP_CODE;
  613.         } else {
  614.             g1 = ABOVE_DISPLAY_SHORT_SKIP_CODE;
  615.             g2 = BELOW_DISPLAY_SHORT_SKIP_CODE;
  616.         }
  617.         if (l && e == 0) {
  618.             shift_amount(a) = s;
  619.             append_to_vlist(a);
  620.             tail_append(new_penalty(INF_PENALTY));
  621.         } else {
  622.             tail_append(new_param_glue(g1));
  623.         }
  624.         if (e != 0) {
  625.             r = new_kern(z - w - e - d);
  626.             if (l) {
  627.                 link(a) = r;
  628.                 link(r) = b;
  629.                 b = a;
  630.                 d = 0;
  631.             } else {
  632.                 link(b) = r;
  633.                 link(r) = a;
  634.             }
  635.             b = hpack(b, NATURAL);
  636.         }
  637.         shift_amount(b) = s + d;
  638.         append_to_vlist(b);
  639.         if (a != null && e == 0 && !l) {
  640.             tail_append(new_penalty(INF_PENALTY));
  641.             shift_amount(a) = s + z - box_width(a);
  642.             append_to_vlist(a);
  643.             g2 = 0;
  644.         }
  645.         if (t != adjust_head) {
  646.             link(tail) = link(adjust_head);
  647.             tail = t;
  648.         }
  649.         tail_append(new_penalty(post_display_penalty));
  650.         if (g2 > 0) {
  651.             tail_append(new_param_glue(g2));
  652.         }
  653.         resume_after_display();
  654.     }
  655. }
  656.  
  657. void
  658. check_dollar ()
  659. {
  660.     get_x_token();
  661.     if (cur_cmd != MATH_SHIFT) {
  662.         print_err("Display math should end with $$");
  663.         help_doldol();
  664.         back_error();
  665.     }
  666. }
  667.  
  668. bool
  669. check_font_params ()
  670. {
  671. #define CHK_SY(S) font_params(fam_fnt(2 + (S))) < TOTAL_MATHSY_PARAMS
  672. #define CHK_EX(S) font_params(fam_fnt(3 + (S))) < TOTAL_MATHEX_PARAMS
  673.     if (CHK_SY(TEXT_SIZE)
  674.     || CHK_SY(SCRIPT_SIZE)
  675.     || CHK_SY(SCRIPT_SCRIPT_SIZE)) {
  676.         print_err("Math formula deleted: Insufficient symbol fonts");
  677.         help_math_sy();
  678.         error();
  679.         flush_math();
  680.         return TRUE;
  681.     } 
  682.     if (CHK_EX(TEXT_SIZE)
  683.     || CHK_EX(SCRIPT_SIZE)
  684.     || CHK_EX(SCRIPT_SCRIPT_SIZE)) {
  685.         print_err("Math formula deleted: Insufficient extension fonts");
  686.         help_math_ex();
  687.         error();
  688.         flush_math();
  689.         return TRUE;
  690.     }
  691.     return FALSE;
  692. }
  693.  
  694. void
  695. resume_after_display ()
  696. {
  697.     if (cur_group != MATH_SHIFT_GROUP)
  698.         confusion("display");
  699.     unsave();
  700.     prev_graf += 3;
  701.     push_nest();
  702.     mode = HMODE;
  703.     space_factor = 1000;
  704.     clang = 0;
  705.     scan_optional_space();
  706.     if (nest_ptr == nest + 1) 
  707.         build_page();
  708. }
  709.  
  710. void
  711. _mathlist_init ()
  712. {
  713. }
  714.  
  715. void
  716. _mathlist_init_once ()
  717. {
  718. }
  719.  
  720. /*
  721. **    Help text
  722. */
  723.  
  724. help_math_accent ()
  725. {
  726.     help2("I'm changing \\accent to \\mathaccent here; wish me luck.",
  727.     "(Accents are not the same in formulas as they are in text.)" );
  728. }
  729.  
  730. help_math_sy ()
  731. {
  732.     help3("Sorry, but I can't typeset math unless \\textfont 2",
  733.     "and \\scriptfont 2 and \\scriptscriptfont 2 have all",
  734.     "the \\fontdimen values needed in math symbol fonts." );
  735. }
  736.  
  737. help_math_ex ()
  738. {
  739.     help3("Sorry, but I can't typeset math unless \\textfont 3",
  740.     "and \\scriptfont 3 and \\scriptscriptfont 3 have all",
  741.     "the \\fontdimen values needed in math extension fonts." );
  742. }
  743.  
  744. help_limits ()
  745. {
  746.     help1("I'm ignoring this misplaced \\limits or \\nolimits command.");
  747. }
  748.  
  749. help_delimiter ()
  750. {
  751.     help6("I was expecting to see something like `(' or `\\{' or",
  752.     "`\\}' here. If you typed, e.g., `{' instead of `\\{', you",
  753.     "should probably delete the `{' by typing `1' now, so that",
  754.     "braces don't get unbalanced. Otherwise just proceed.",
  755.     "Acceptable delimiters are characters whose \\delcode is",
  756.     "nonnegative, or you can use `\\delimiter <delimiter code>'.");
  757. }
  758.  
  759. help_fraction ()
  760. {
  761.     help3("I'm ignoring this fraction specification, since I don't",
  762.     "know whether a construction like `x \\over y \\over z'",
  763.     "means `{x \\over y} \\over z' or `x \\over {y \\over z}'.");
  764. }
  765.  
  766. help_xtra_right ()
  767. {
  768.     help1("I'm ignoring a \\right that had no matching \\left.");
  769. }
  770.  
  771. help_doldol ()
  772. {
  773.     help2("The `$' that I just saw supposedly matches a previous `$$'.",
  774.     "So I shall assume that you typed `$$' both times.");
  775. }
  776.  
  777. help_double_sub ()
  778. {
  779.     help1("I treat `x_1_2' essentially like `x_1{}_2'.");
  780. }
  781.  
  782. help_double_sup ()
  783. {
  784.     help1("I treat `x^1^2' essentially like `x^1{}^2'.");
  785. }
  786.