/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: 2009-10-05 07:21:53 UTC
  • Revision ID: distler@golem.ph.utexas.edu-20091005072153-bibw6asyyutv35n2
Tags: 1.3.13
itex2MML 1.3.13

Introduce \mathrlap{}, \mathllap{} and \mathclap{}.
Actually, \mathrlap{} is equivalent to the foolishly
named \rlap{} command, introduced in itex2MML 1.3.9.
The problem is that TeX's \rlap{} command does not
work in math mode. It is possible to define a TeX
equivalent that does work in math mode (see
http://math.arizona.edu/~aprl/publications/mathclap/ )
and we should give the corresponding itex command the
same name (distinct from \rlap{}).

At the same time, I figured out how to implement
\mathllap{} (a math-mode version of \llap{}) and
\mathclap{} in MathML. So those come as a bonus.

Also, I implemented \colon, which has the correct
math-spacing, unlike ':'.

Show diffs side-by-side

added added

removed removed

1
 
/*             itex2MML 1.3.12
2
 
 *   itex2MML.l last modified 10/4/2009
 
1
/*             itex2MML 1.3.13
 
2
 *   itex2MML.l last modified 10/5/2009
3
3
 */
4
4
 
5
5
%{
71
71
"\\biggl" {return BIGGL;}
72
72
"\\Biggl" {return BBIGGL;}
73
73
 
74
 
"\\rlap"  {return RLAP;}
 
74
"\\mathrlap"  {return RLAP;}
 
75
"\\mathllap"  {return LLAP;}
 
76
"\\mathclap"  {return CLAP;}
 
77
"\\rlap" |
75
78
"\\llap" |
76
79
"\\ulap" |
77
80
"\\dlap"               {/* Ignore */ ;}
370
373
"\\ddots"   {yylval=itex2MML_copy_string("⋱"); return MO;}
371
374
"\\udots"   {yylval=itex2MML_copy_string("⋰"); return MO;}
372
375
"\\vdots"   {yylval=itex2MML_copy_string("⋮"); return MO;}
 
376
"\\colon"   {yylval=itex2MML_copy_string(":"); return MOR;}
373
377
 
374
378
"\\cup"  |
375
379
"\&union;" |