File: amstex.perl

package info (click to toggle)
latex2html 2015-debian1-1
  • links: PTS
  • area: main
  • in suites: stretch
  • size: 7,652 kB
  • ctags: 3,386
  • sloc: perl: 30,941; makefile: 429; sh: 155
file content (629 lines) | stat: -rw-r--r-- 18,597 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
# amstex.perl by Ross Moore <ross@mpce.mq.edu.au>  9-30-96
#
# Extension to LaTeX2HTML to load features from AMS-LaTeX
#   amsfonts, amssymb, eucal, eufrak or euscript. 
#
# Change Log:
# ===========
#
# $Log: amstex.perl,v $
# Revision 1.24  2000/11/04 03:32:17  RRM
#  --  fixed typo where $t_author should be $t_address
#      thanks to Bruce Miller for reporting this
#
# Revision 1.23  1999/06/11 09:57:23  RRM
#  --  removed unnecessary tagging for ommitted information on title-page
#
# Revision 1.22  1999/06/03 05:40:36  RRM
#  --  fixed error in previous commit
#
# Revision 1.21  1999/06/02 11:15:54  RRM
#  --  the \author and \address commands were not reading their argument
#      safely --- looping could result;  now fixed.
#
# Revision 1.20  1998/07/22 02:03:20  RRM
#  --  implemented {proof} environment and \qed and \qedsymbol
#  --  amsthm  now fully implemented, no longer gets a warning message
#
# Revision 1.19  1998/05/29 09:46:44  latex2html
#  --  removed unneeded declarations
#  --  added declaration for  \operatornamewithlimits
#  --  load  more_amsmath.perl  under more circumstances; with less parsing
#  	aligned environments can now have images of whole table-cells
#
# Revision 1.18  1998/05/06 11:11:50  latex2html
#  --  implemented the  righttag  option
#  --  suppressed 'No implementation ...' messages
#  --  included CD in  %AMSenvs
#
# Revision 1.17  1998/05/04 12:14:16  latex2html
#  --  included  %EQNO <num> in LaTeX code that constructs image containing
#	equation-numbering, to avoid incorrect image-reuse
#  --  removed ALIGN attributes when using HTML 2.0
#
# Revision 1.16  1998/02/20 22:06:57  latex2html
# added log
#
# ----------------------------
# revision 1.15
# date: 1998/02/13 12:57:33;  author: latex2html;  state: Exp;  lines: +11 -0
#  --  images of {subequations} have the correct numbering and alignment
# ----------------------------
# revision 1.14
# date: 1998/02/06 22:57:13;  author: latex2html;  state: Exp;  lines: +39 -2
#  --  copied &get_eqn_number from the  more_amsmath file
# ----------------------------
# revision 1.13
# date: 1998/01/27 11:33:22;  author: RRM;  state: Exp;  lines: +30 -16
#  --  \title needed updating, in line with changes in  latex2html
# ----------------------------
# revision 1.12
# date: 1998/01/19 08:52:29;  author: RRM;  state: Exp;  lines: +3 -746
#  	That part of  amstex.perl and amsmath.perl that needs the `math'
# 	extension has been split-off into  more_amsmath.perl .
# 	This is loaded automatically with switches:
# 		 -no_math -html_version ...,math
# ----------------------------
# revision 1.11
# date: 1997/12/19 11:36:00;  author: RRM;  state: Exp;  lines: +16 -7
#  --  use a specified WIDTH="10%" for equation-numbering cells
# 	(thanks to Bruce Miller for highlighting the problem)
# ----------------------------
# revision 1.10
# date: 1997/12/18 11:18:31;  author: RRM;  state: Exp;  lines: +14 -9
#  --  removed  do_cmd_numberwithin  which is in the  latex2html  script
#  --  added support for CLASS="MATH"  with $USING_STYLES
# ----------------------------
# revision 1.9
# date: 1997/12/17 10:19:19;  author: RRM;  state: Exp;  lines: +30 -16
#  --  appended environment names to the new $display_env_rx variable
#  --  removed the need for `math' extension to be loaded
#  --  removed a redundant closing-tag `>' --- thanks Bruce Miller
#  --  fixed the missing equation-numbers when on the right-hand side
# ----------------------------
# revision 1.8
# date: 1997/12/11 02:42:44;  author: RRM;  state: Exp;  lines: +1 -1
#  --  missing `;' inserted at end of %AMSenvs array (thanks Bruce Miller)
# ----------------------------
# revision 1.7
# date: 1997/10/10 13:15:30;  author: RRM;  state: Exp;  lines: +10 -2
#  --  made loading of some new environments depend on having the `math'
# 	extension loaded. This probably should be made a requirement ?
# ----------------------------
# revision 1.6
# date: 1997/10/04 07:26:37;  author: RRM;  state: Exp;  lines: +742 -17
#  --  handles most of the amsmath alignment macros/environments
#  --  supports leqno/reqno options
#  --  support for more of the AMSbook/art internal commands, that
# 	can also be used externally; e.g. \chapterrunhead, etc.
# 
#     Note: not *all* of the amsmath package is fully supported in the
# 	best possible way; we are still working on it.
# ----------------------------
# revision 1.5
# date: 1997/07/11 11:28:57;  author: RRM;  state: Exp;  lines: +1 -1
#  -  replace  (.*) patterns with something allowing \n s included
# ----------------------------
# revision 1.4
# date: 1997/07/09 13:28:38;  author: RRM;  state: Exp;  lines: +18 -18
#     Too many commas in assoc-array, Oops --- thanks Michel, well spotted
# ----------------------------
# revision 1.3
# date: 1997/05/19 13:27:50;  author: RRM;  state: Exp;  lines: +29 -28
#  -  AmS-TeX style environment delimiters need a  `\\' .
# ----------------------------
# revision 1.2
# date: 1997/05/02 04:08:16;  author: RRM;  state: Exp;  lines: +189 -16
#      Extensive changes, preparatory to complete support for AmS-LaTeX.
#      This work is not yet complete.
# ----------------------------
# revision 1.1
# date: 1997/03/05 00:27:17;  author: RRM;  state: Exp;
# Support for American Math Society (AMS) packages.
# Mostly just recognises options to the AMS packages, to suppress warnings.


package main;
#


# unknown environments:  alignedat, gathered, alignat, multline
#   \gather([^* ])...\endgather
#   \align([^* ])...\endalign

$abstract_name = "Abstract";
$keywords_name = "Keywords";
$subjclassname = "1991 Subject Classification";
$date_name = "Date published";
$Proof_name = "Proof";


sub do_cmd_title {
    local($_) = @_;
    local($text,$s_title,$rest);
    if (/\\endtitle/) {
	$rest = $';
	$t_title = $text = &translate_commands($`);
	$t_title =~ s/(^\s*|\s*$)//g;
	$s_title = &simplify($text);
	$TITLE = (($s_title)? $s_title : $default_title);
	return($rest);
    }
    &get_next_optional_argument;
    $text = &missing_braces
        unless ((s/$next_pair_pr_rx//o)&&($text = $2));
    $t_title = &translate_environments($text);
    $t_title = &translate_commands($t_title);
    $s_title = &simplify(&translate_commands($text));
    $TITLE = (($s_title)? $s_title : $default_title);
    $_
}

#    local($rest) = $_;
#    $rest =~ s/$next_pair_pr_rx//o;
#    $_ =  &translate_commands($&);
#    &extract_pure_text("liberal");
#    s/([\w\W]*)(<A.*><\/A>)([\w\W]*)/$1$3/;  # HWS:  Remove embedded anchors
#    ($t_title) = $_;
#    $TITLE = $t_title if ($TITLE eq $default_title);
#    $TITLE =~ s/<P>//g;		# Remove Newlines
#    $TITLE =~ s/\s+/ /g;	# meh - remove empty lines 
#    $rest;
#}

sub do_cmd_author {
    local($_) = @_;
    if (/\\endauthor/) {
	$t_author = &translate_commands($`);
	$t_author =~ s/(^\s*|\s*$)//g;
	return($');
    }
    &get_next_optional_argument;
    local($rest) = $_;
    $t_author = &missing_braces unless (
	($rest =~ s/$next_pair_pr_rx/$t_author=$&;''/eo)
	||($rest =~ s/$next_pair_rx/$t_author=$&;''/eo));
    ($t_author) =  &translate_commands($t_author);
    $rest;
}

sub do_cmd_address {
    local($_) = @_;
    if (/\\endaddress/) {
	$t_address = &translate_commands($`);
	$t_address =~ s/(^\s*|\s*$)//g;
	return($');
    }
    &get_next_optional_argument;
    local($rest) = $_;
    $t_address = &missing_braces unless (
	($rest =~ s/$next_pair_pr_rx/$t_address=$&;''/eo)
	||($rest =~ s/$next_pair_rx/$t_address=$&;''/eo));
    ($t_address) =  &translate_commands($t_address);
    $rest;
}

sub do_cmd_curraddr {
    local($_) = @_;
    &get_next_optional_argument;
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    ($t_curraddr) =  &translate_commands($&);
    $rest;
}

sub do_cmd_affil {
    local($_) = @_;
    if (/\\endaffil/) {
	$t_affil = &translate_commands($`);
	$t_affil =~ s/(^\s*|\s*$)//g;
	return($');
    }
    &get_next_optional_argument;
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    ($t_curraddr) = &translate_commands($&);
    $rest;
}

sub do_cmd_dedicatory {
    local($_) = @_;
    &get_next_optional_argument;
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    ($t_affil) = &translate_commands($&);
    $rest;
}

sub do_cmd_date {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_date) = &translate_commands($&);
    $_;
}

sub do_cmd_email {
    local($_) = @_;
    &get_next_optional_argument;
    local($rest) = $_;
    $rest =~ s/$next_pair_pr_rx//o;
    ($t_email) = &make_href("mailto:$2","$2");
    $rest;
}

sub do_cmd_urladdr {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_authorURL) = &translate_commands($2);
    $_;
}

sub do_cmd_keywords {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_keywords) = &translate_commands($2);
    $_;
}

sub do_cmd_subjclass {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_subjclass) = &translate_commands($2);
    $_;
}

sub do_cmd_translator {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_translator) = &translate_commands($2);
    $_;
}

sub do_cmd_MR {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_math_rev) = &translate_commands($2);
    $_;
}

sub do_cmd_PII {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_publ_index) = &translate_commands($2);
    $_;
}

sub do_cmd_copyrightinfo {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    ($t_copyright_year) = &translate_commands($2);
    s/$next_pair_pr_rx//o;
    ($t_copyright_holder) = &translate_commands($2);
    $_;
}



sub do_cmd_AmS {
    local($_) = @_;
    "<i>AmS</i>".$_;
}

sub do_cmd_AmSTeX {
    local($_) = @_;
    "<i>AmS-TeX</i>" . $_;
}

sub do_cmd_maketitle {
    local($_) = @_;
    local($the_title) = '';
    if ($t_title) {
	$the_title .= "<H1 ALIGN=CENTER>$t_title</H1>\n";
    } else { &write_warnings("This document has no title."); }
    if ($t_author) {
	$the_title .= "<P ALIGN=CENTER><STRONG>$t_author</STRONG></P>\n";
    } else { &write_warnings("There is no author for this document."); }
    if (($t_translator)&&!($t_translator=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
	$the_title .= "<BR><P ALIGN=CENTER>Translated by $t_translator</P>\n";}
    if (($t_affil)&&!($t_affil=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
	$the_title .= "<BR><P ALIGN=CENTER><I>$t_affil</I></P>\n";}
    if (($t_date)&&!($t_date=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
	$the_title .= "<BR><P ALIGN=CENTER><I>Date:</I> $t_date</P>\n";}

    if ($t_address&&!($t_address=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
	$the_title .= "<BR><P ALIGN=LEFT><FONT SIZE=-1>$t_address</FONT></P>\n";
    } else { $the_title .= "<P ALIGN=LEFT>"}
    if ($t_email&&!($t_email=~/^\s*(($O|$OP)\d+($C|$CP))\s*\1\s*$/)) {
	$the_title .= "<P ALIGN=LEFT><FONT SIZE=-1>$t_email</FONT></P>\n";
    } else { $the_title .= "</P>" }
    if ($t_keywords) {
	$the_title .= "<BR><P><P ALIGN=LEFT><FONT SIZE=-1>".
	    "Key words and phrases: $t_keywords</FONT></P>\n";}
    if ($t_subjclass) {
	$the_title .= "<BR><P><P ALIGN=LEFT><FONT SIZE=-1>".
	    "1991 Mathematics Subject Classification: $t_subjclass</FONT></P>\n";}

    $the_title . $_ ;
}



sub do_cmd_boldsymbol {
    local($_) = @_;
    s/$next_pair_pr_rx//o;
    $_ = join('',"<B><I>$2</I></B>",$_);
    $_;
}



# some simplifying macros that like
# to existing LaTeX constructions.
# are defined already in  latex2html 

#sub do_cmd_eqref {
#    local($_) = @_;
#    join('','(',&process_ref($cross_ref_mark,$cross_ref_mark,'',')'));
#}

#sub do_cmd_numberwithin {
#    local(*_) = @_;
#    local($ctr, $within);
#    $ctr = &get_next(1);
#    $within = &get_next(1);
#    &addto_dependents($within,$ctr) if ($within);
#    $_;
#}

#########  for equation-numbers and tags  ###############

sub get_eqn_number {
    local($outer_num, $scan) = @_;
    # an explicit \tag overrides \notag , \nonumber or *-variant
    local($labels,$tag);
    ($scan,$labels) = &extract_labels($scan); # extract labels
    $scan =~ s/\n//g;
    if ($scan =~ s/\\tag(\*|star\b)?\s*(($O|$OP)\d+($C|$CP))(.*)\2//) {
	local($star) = $1; $tag = $5;
	$tag = &translate_environments($tag) if ($tag =~ /\\begin/);
	$tag = &translate_commands($tag) if ($tag =~ /\\/);
	$tag = (($star)? $tag : $EQNO_START.$tag.$EQNO_END );
    } elsif (($outer_num)&&(!($scan)||!($scan =~ s/\\no(tag|number)//))
	&&(!($scan =~ /^\s*\\begin(<(<|#)\d+(>|#)>)($outer_math_rx)/))
      ) { 
        $global{'eqn_number'}++ ;
	if ($subequation_level) {
	    local($sub_tag) =  &get_counter_value('equation');
	    $tag = join('', $EQNO_START
		, $eqno_prefix
		, &falph($sub_tag)
		, $EQNO_END);
	} else {
	    $tag = join('', $EQNO_START
		, &simplify(&translate_commands("\\theequation"))
		, $EQNO_END);
	}
    } else { $tag = ';SPMnbsp;' }
    if ($labels) {
	$labels =~ s/$anchor_mark/$tag/o;
	($labels , $scan);
    } else { ($tag , $scan) }
}

###   Special environments, for mathematics

sub do_env_equationstar {
    local($no_eqn_numbers) = 1;
    &do_env_displaymath(@_);
}
sub do_env_subequations {
    local($_) = @_;
    local($align);
    $align = join('', " ALIGN=\""
	    , (($EQN_TAGS =~ /L/)? 'LEFT' : 'RIGHT'), "\"")
	unless ($HTML_VERSION < 2.2);

    $latex_body .= join('', "\n\\setcounter{equation}{"
		, $global{'eqn_number'} , "}\n");
    $_ .= "%EQNO:".$global{'eqn_number'}."\n";
    $global{'eqn_number'}++;
    local($this) = &process_undefined_environment('subequations'
	    , ++$global{'max_id'}, $_);
    local($div) = (($HTML_VERSION < 3.2)? 'P' : 'DIV');
    join('', "<$div$align>\n" , $this, "<BR></$div>" )
}

sub do_cmd_proofname { ($prf_name ? $prf_name : 'Proof')  . @_[0] }
sub do_cmd_qed {
    local($env) = 'tex2html_wrap_inline';
    join('', &process_math_in_latex('','',0,"\\qedsymbol"), @_) }

sub do_env_proof {
    local($proof_contents) = @_;
    local($bproof, $eproof);
    local($proof_name,$br_id);
    if ((defined &do_cmd_proofname)||$new_command{'proofname'}) {
	$br_id=++$global{'max_id'};
	$proof_name = &translate_environments("$O$br_id$C\\itshape\\proofname$O$br_id$C");
    } else { $proof_name = '<EM>'.$prf_name.'</EM>' }
    $bproof = (($HTML_VERSION > 3.1)? "<DIV$env_id>" : '<P>');
    $eproof = (($HTML_VERSION > 3.1)? '</DIV>' : '</P>') . '<P></P>';
    local($qed);
    if ($new_command{'qed'}) {
	$br_id = ++$global{'max_id'};
	$qed = &translate_commands(&translate_environments("$O$br_id$C\\qed$O$br_id$C"));
    } else { $qed = &do_cmd_qed() }
    $br_id = ++$global{'max_id'};
    join ('', "<P></P>\n", $bproof , $proof_name.".\n" 
	, &translate_commands(&translate_environments("$O$br_id$C$proof_contents$O$br_id$C "))
	, $qed , "\n".$eproof."\n" )
}

#  Suppress the possible options to   \usepackage[....]{amstex}
#  and  {amsmath}  {amsopn}  {amsthm}

sub do_amstex_leqno { $EQN_TAGS = 'L'; }
sub do_amstex_reqno { $EQN_TAGS = 'R'; }
sub do_amsmath_leqno { $EQN_TAGS = 'L'; }
sub do_amsmath_reqno { $EQN_TAGS = 'R'; }
sub do_amsmath_fleqn {}
sub do_amstex_centereqn {
}
sub do_amstex_centertags {
}
sub do_amstex_tbtags {
}
sub do_amstex_righttag { $EQN_TAGS = 'R'; }

sub do_amstex_ctagsplt {
}

%styles_loaded = ( %styles_loaded
     , 'amsbsy' , 1 , 'amscd' , 1 , 'amsfonts' , 1 , 'amsthm' , 1
     , 'amssymb' , 1 , 'amstext' , 1 , 'amsfonts' , 1 , 'amsopn' , 1
     , 'amstex_noamsfonts' , 1 , 'amsmath_noamsfonts' , 1
     , 'amstex_psamsfonts' , 1 , 'amsmath_psamsfonts' , 1
     , 'amstex_intlim' , 1 , 'amsmath_intlim' , 1
     , 'amstex_nonamelm' , 1 , 'amsmath_nonamelm' , 1
     , 'amstex_nosumlim' , 1 , 'amsmath_nosumlim' , 1
    );


%AMSenvs = (
	  'cases' , 'endcases'
	, 'matrix'  , 'endmatrix'
	, 'bmatrix' , 'endbmatrix'
	, 'Bmatrix' , 'endBmatrix'
	, 'pmatrix' , 'endpmatrix'
	, 'vmatrix' , 'endvmatrix'
	, 'Vmatrix' , 'endVmatrix'
	, 'smallmatrix' , 'endsmallmatrix'
	, 'align'    , 'endalign'
	, 'alignat'  , 'endalignat'
	, 'xalignat' , 'endxalignat'
	, 'xxalignat', 'endxxalignat'
	, 'aligned'  , 'endaligned'
	, 'topaligned'  , 'endtopaligned'
	, 'botaligned'  , 'endbotaligned'
	, 'alignedat', 'endalignedat'
	, 'flalign'  , 'endflalign'
	, 'gather'   , 'endgather'
	, 'multline' , 'endmultline'
	, 'heading' , 'endheading'
	, 'proclaim' , 'endproclaim'
	, 'demo' , 'enddemo'
	, 'roster' , 'endroster'
	, 'ref' , 'endref'
	, 'CD' , 'endCD'
);


&ignore_commands( <<_IGNORED_CMDS_);
comment # <<\\endcomment>>
displaybreak
allowdisplaybreak
allowdisplaybreaks
spreadlines
overlong
allowtthyphens
hyphenation
BlackBoxes
NoBlackBoxes
split
operatorname
operatornamewithlimits
qopname # {} # {}
text
thetag
mspace # {}
smash # []
topsmash
botsmash
medspace
negmedspace
thinspace
negthinspace
thickspace
negthickspace
hdots
hdotsfor # &ignore_numeric_argument
hcorrection # &ignore_numeric_argument
vcorrection # &ignore_numeric_argument
topmatter
endtopmatter
overlong
nofrills
phantom # {}
hphantom # {}
vphantom # {}
minCDarrowwidth # {}
chapterrunhead # {} # {} # {}
sectionrunhead # {} # {} # {}
partrunhead # {} # {} # {}
_IGNORED_CMDS_


&process_commands_in_tex (<<_RAW_ARG_CMDS_);
cases # <<\\endcases>>
matrix # <<\\endmatrix>>
bmatrix # <<\\endbmatrix>>
Bmatrix # <<\\endBmatrix>>
pmatrix # <<\\endpmatrix>>
vmatrix # <<\\endvmatrix>>
Vmatrix # <<\\endVmatrix>>
smallmatrix # <<\\endsmallmatrix>>
align # <<\\endalign>>
alignat # <<\\endalignat>>
xalignat # <<\\endxalignat>>
xxalignat # <<\\endxxalignat>>
aligned # <<\\endaligned>>
alignedat # <<\\endalignedat>>
flalign # <<\\endflalign>>
gather # <<\\endgather>>
multline # <<\\endmultline>>
#overset # {} # {}
#sideset # {} # {}
#underset # {} # {}
#overleftarrow # {}
#underleftarrow # {}
#overrightarrow # {}
#underrightarrow # {}
#overleftrightarrow # {}
#underleftrightarrow # {}
#oversetbrace # <<\\to>> # {}
#undersetbrace # <<\\to>> # {}
lcfrac # <<\\endcfrac>>
rcfrac # <<\\endcfrac>>
cfrac # <<\\endcfrac>>
CD # <<\\endCD>>
fracwithdelims # &ignore_numeric_argument(); # {} # {}
thickfrac # <<\\thickness>> # &ignore_numeric_argument(); # {} # {}
thickfracwithdelims # <<\\thickness>> # &ignore_numeric_argument(); # {} # {}
boxed # {}
mathbb # {}
mathfrak # {}
_RAW_ARG_CMDS_

&process_commands_inline_in_tex (<<_RAW_ARG_CMDS_);
qedsymbol
_RAW_ARG_CMDS_


&process_commands_nowrap_in_tex (<<_RAW_ARG_NOWRAP_CMDS_);
numberwithin # {} # {}
_RAW_ARG_NOWRAP_CMDS_


#   add later extensions, which require `math' to be loaded

if (($NO_SIMPLE_MATH)&&(defined &make_math)) { 
    &do_require_package('more_amsmath');
} elsif ($HTML_VERSION > 3.1) {
    require "$LATEX2HTMLVERSIONS${dd}math.pl";
    $NO_MATH_PARSING = $NO_SIMPLE_MATH = 1;
    &do_require_package('more_amsmath');
}


1;                              # This must be the last line