/itexToMML

To download this project, use:
bzr branch http://golem.ph.utexas.edu/~distler/code/itexToMML/

« back to all changes in this revision

Viewing changes to itex-src/itex2MML.l

  • Committer: Jacques Distler
  • Date: 2010-09-29 20:44:12 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20100929204412-1mx4dpbzubk0nlm7
Tags: 1.4.3
itex2MML 1.4.3: Better extensible arrows

Per a suggestion by Frederic Wang, allow
the optional argument to contain square
bracket(s) *provided* they are "protected"
by braces. This is the LaTeX behaviour, and
we should follow it.

Also, fix a bug when the mandatory argument
is blank.

Show diffs side-by-side

added added

removed removed

1
 
/*             itex2MML 1.4.1
2
 
 *   itex2MML.l last modified 9/7/2010
 
1
/*             itex2MML 1.4.3
 
2
 *   itex2MML.l last modified 9/29/2010
3
3
 */
4
4
 
5
5
%{
52
52
"^"            return SUP;
53
53
"_"            return SUB; 
54
54
"{"[\t\r\n ]*"}"   return EMPTYMROW;
55
 
"{"            {itex2MML_rowposn = 2; return MROWOPEN;}
56
 
"}"            return MROWCLOSE;
 
55
"{"            {itex2MML_rowposn = 2; itex2MML_inoptarg = itex2MML_inoptarg*2; return MROWOPEN;}
 
56
"}"            {itex2MML_inoptarg = itex2MML_inoptarg/2; return MROWCLOSE;}
57
57
 
58
58
"\\left"       itex2MML_rowposn=2; return LEFT;
59
59
"\\right"      return RIGHT;