[lasem] itex2mml: update to 1.4.5.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] itex2mml: update to 1.4.5.
- Date: Tue, 1 Mar 2011 20:53:41 +0000 (UTC)
commit 5268cb84da37f26862f9a9c803d9b8521f450057
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Tue Mar 1 21:53:08 2011 +0100
itex2mml: update to 1.4.5.
itex2mml/itex2MML.h | 6 +-
itex2mml/itex2MML.l | 107 ++++++++++++++++++++++++++++++++++++---------------
itex2mml/itex2MML.y | 101 ++++++++++++++++++++++++++++++++++++++++--------
3 files changed, 164 insertions(+), 50 deletions(-)
---
diff --git a/itex2mml/itex2MML.h b/itex2mml/itex2MML.h
index d2cf4d8..37c2215 100644
--- a/itex2mml/itex2MML.h
+++ b/itex2mml/itex2MML.h
@@ -1,11 +1,11 @@
-/* itex2MML 1.3.22
- * itex2MML.h last modified 4/18/2010
+/* itex2MML 1.4.5
+ * itex2MML.h last modified 10/2/2010
*/
#ifndef ITEX2MML_H
#define ITEX2MML_H
-#define ITEX2MML_VERSION "1.3.22"
+#define ITEX2MML_VERSION "1.4.5"
#ifdef __cplusplus
extern "C" {
diff --git a/itex2mml/itex2MML.l b/itex2mml/itex2MML.l
index 3ba725b..15c6b85 100644
--- a/itex2mml/itex2MML.l
+++ b/itex2mml/itex2MML.l
@@ -1,11 +1,11 @@
-/* itex2MML 1.3.22
- * itex2MML.l last modified 4/18/2010
+/* itex2MML 1.4.5
+ * itex2MML.l last modified 10/2/2010
*/
%{
%}
%option noyywrap
-%x MATH ATTRIBUTELIST BBOLD FRAKTUR CALLIGRAPHIC ROMAN PLAINTEXT INT1 INT2 INT3 MATHENV SVGENV
+%x MATH ATTRIBUTELIST BBOLD FRAKTUR CALLIGRAPHIC ROMAN PLAINTEXT INT1 INT2 INT3 MATHENV SVGENV SVGEND OPTARG ARRAYOPTIONS COLOPTS
%{
#include <string.h>
@@ -20,21 +20,26 @@
static int s_itex2MML_read (char * buffer, int max_size);
#define yylval itex2MML_yylval
+#define itex2MML_optarg_depth 100
extern char * yylval;
int itex2MML_lineno = 1;
+int itex2MML_inoptarg[itex2MML_optarg_depth];
+int itex2MML_optarg_ind = 0;
+int itex2MML_env_start = 0;
int itex2MML_rowposn = 0;
int itex2MML_displaymode = 0;
+
%}
%%
%{ if (itex2MML_rowposn==1) itex2MML_rowposn=0;
if (itex2MML_rowposn==2) itex2MML_rowposn=1;
%}
-<INITIAL>"$"{1,2} BEGIN(MATH); itex2MML_rowposn=2; if (yyleng==2) { itex2MML_displaymode=1; return STARTDMATH;}; itex2MML_displaymode=0; return STARTMATH;
-<INITIAL>"\\[" BEGIN(MATH); itex2MML_rowposn=2; itex2MML_displaymode=1; return STARTDMATH;
+<INITIAL>"$"{1,2} BEGIN(MATH); itex2MML_inoptarg[0] = 0; itex2MML_rowposn=2; if (yyleng==2) { itex2MML_displaymode=1; return STARTDMATH;}; itex2MML_displaymode=0; return STARTMATH;
+<INITIAL>"\\[" BEGIN(MATH); itex2MML_inoptarg[0] = 0; itex2MML_rowposn=2; itex2MML_displaymode=1; return STARTDMATH;
<INITIAL>EOF return 0;
<INITIAL>"\n" {itex2MML_lineno++; yylval=itex2MML_copy_string(yytext); return CHAR;}
<INITIAL>. {yylval=itex2MML_copy_string(yytext); return CHAR;}
@@ -51,8 +56,8 @@ int itex2MML_displaymode = 0;
"^" return SUP;
"_" return SUB;
"{"[\t\r\n ]*"}" return EMPTYMROW;
-"{" {itex2MML_rowposn = 2; return MROWOPEN;}
-"}" return MROWCLOSE;
+"{" {itex2MML_rowposn = 2; if(itex2MML_inoptarg[itex2MML_optarg_ind] != 0) itex2MML_inoptarg[itex2MML_optarg_ind]++; return MROWOPEN;}
+"}" {if(itex2MML_inoptarg[itex2MML_optarg_ind] != 0) itex2MML_inoptarg[itex2MML_optarg_ind]--; return MROWCLOSE;}
"\\left" itex2MML_rowposn=2; return LEFT;
"\\right" return RIGHT;
@@ -99,8 +104,8 @@ int itex2MML_displaymode = 0;
"(" |
"[" {yylval=itex2MML_copy_string(yytext); return LEFTDELIM;}
-")" |
-"]" {yylval=itex2MML_copy_string(yytext); return RIGHTDELIM;}
+")" {yylval=itex2MML_copy_string(yytext); return RIGHTDELIM;}
+"]" {if(itex2MML_inoptarg[itex2MML_optarg_ind]==1 && itex2MML_optarg_ind > 0) {itex2MML_inoptarg[itex2MML_optarg_ind]=0; itex2MML_optarg_ind--; return OPTARGCLOSE;} else {yylval=itex2MML_copy_string(yytext); return RIGHTDELIM;}}
"\\lbrace" |
"\\{" {yylval=itex2MML_copy_string("{"); return LEFTDELIM;}
@@ -116,7 +121,7 @@ int itex2MML_displaymode = 0;
"\\backslash" {yylval=itex2MML_copy_string("\"); return MO;}
"\\smallsetminus" {yylval=itex2MML_copy_string("﹨"); return MOF;}
-"\\sslash" {yylval=itex2MML_copy_string("⃫"); return MO;}
+"\\sslash" {yylval=itex2MML_copy_string("⫽"); return MO;}
"\\lfloor" |
"\\lceil" |
@@ -366,13 +371,24 @@ int itex2MML_displaymode = 0;
"\\upharpoonleft" |
"\\upharpoonright" {yylval=itex2MML_copy2(yytext, ";"); if (yylval != itex2MML_empty_string) yylval[0]='&'; return MOL;}
+"\\xrightarrow" |
+"\\xleftarrow" |
+"\\xleftrightarrow" |
+"\\xLeftarrow" |
+"\\xRightarrow" |
+"\\xLeftrightarrow" |
+"\\xleftrightharpoons" |
+"\\xrightleftharpoons" |
+"\\xhookleftarrow" |
+"\\xhookrightarrow" |
+"\\xmapsto" {BEGIN(OPTARG); char * s1 = itex2MML_copy_string(yytext+2); yylval = itex2MML_copy3("&", s1, ";"); itex2MML_free_string(s1); return XARROW;}
"\\dots" |
-"\\ldots" {yylval=itex2MML_copy_string("…"); return MO;}
-"\\cdots" {yylval=itex2MML_copy_string("⋯"); return MO;}
-"\\ddots" {yylval=itex2MML_copy_string("⋱"); return MO;}
-"\\udots" {yylval=itex2MML_copy_string("⋰"); return MO;}
-"\\vdots" {yylval=itex2MML_copy_string("⋮"); return MO;}
+"\\ldots" {yylval=itex2MML_copy_string("…"); return MI;}
+"\\cdots" {yylval=itex2MML_copy_string("⋯"); return MI;}
+"\\ddots" {yylval=itex2MML_copy_string("⋱"); return MI;}
+"\\udots" {yylval=itex2MML_copy_string("⋰"); return MI;}
+"\\vdots" {yylval=itex2MML_copy_string("⋮"); return MI;}
"\\colon" {yylval=itex2MML_copy_string(":"); return MOR;}
"\\cup" |
@@ -738,6 +754,7 @@ int itex2MML_displaymode = 0;
"\\tfrac" {return TFRAC;}
"\\binom" {return BINOM;}
+"\\tbinom" {return TBINOM;}
"\\tensor" {return TENSOR;}
@@ -783,7 +800,7 @@ int itex2MML_displaymode = 0;
"\\underoverset" {return UNDEROVER;}
-"\\sqrt" {return SQRT;}
+"\\sqrt" {BEGIN(OPTARG); return SQRT;}
"\\root" {return ROOT;}
@@ -829,9 +846,11 @@ int itex2MML_displaymode = 0;
"\\slash" {return SLASHED;}
+"\\boxed" {return BOXED;}
+
"\\mathcal" {BEGIN(CALLIGRAPHIC); return CAL;}
-"\\begin" {BEGIN(MATHENV); return BEGINENV;}
+"\\begin" {itex2MML_env_start = 1; BEGIN(MATHENV); return BEGINENV;}
"\\end" {BEGIN(MATHENV); return ENDENV;}
"\\substack" {return SUBSTACK;}
@@ -910,24 +929,50 @@ int itex2MML_displaymode = 0;
<ATTRIBUTELIST>"{"[ \t\n\r #a-zA-Z0-9.\-]*"}" {BEGIN(MATH); yylval=itex2MML_copy_string(yytext); if (yylval != itex2MML_empty_string) { yylval[0]='"'; yylval[yyleng-1]='"'; } return ATTRLIST;}
+<OPTARG>{
+"[" {if(itex2MML_optarg_ind < itex2MML_optarg_depth - 1 && itex2MML_inoptarg[itex2MML_optarg_ind] !=1 ){itex2MML_optarg_ind++; itex2MML_inoptarg[itex2MML_optarg_ind]=1;}; BEGIN(MATH); return OPTARGOPEN;}
+. {BEGIN(MATH); unput(yytext[0]);}
+}
+
<MATHENV>{
-"\{matrix\}" {BEGIN(MATH); return MATRIX;}
-"\{pmatrix\}" {BEGIN(MATH); return PMATRIX;}
-"\{bmatrix\}" {BEGIN(MATH); return BMATRIX;}
-"\{Bmatrix\}" {BEGIN(MATH); return BBMATRIX;}
-"\{vmatrix\}" {BEGIN(MATH); return VMATRIX;}
-"\{Vmatrix\}" {BEGIN(MATH); return VVMATRIX;}
-"\{smallmatrix\}" {BEGIN(MATH); return SMALLMATRIX;}
-"\{cases\}" {BEGIN(MATH); return CASES;}
-"\{aligned\}" {BEGIN(MATH); return ALIGNED;}
-"\{gathered\}" {BEGIN(MATH); return GATHERED;}
-"\{split\}" {BEGIN(MATH); return ALIGNED;}
-"\{svg\}" {BEGIN(SVGENV); return SVG;}
+"\{matrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return MATRIX;}
+"\{pmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return PMATRIX;}
+"\{bmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return BMATRIX;}
+"\{Bmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return BBMATRIX;}
+"\{vmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return VMATRIX;}
+"\{Vmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return VVMATRIX;}
+"\{smallmatrix\}" {itex2MML_env_start = 0; BEGIN(MATH); return SMALLMATRIX;}
+"\{cases\}" {itex2MML_env_start = 0; BEGIN(MATH); return CASES;}
+"\{aligned\}" {itex2MML_env_start = 0; BEGIN(MATH); return ALIGNED;}
+"\{gathered\}" {itex2MML_env_start = 0; BEGIN(MATH); return GATHERED;}
+"\{split\}" {itex2MML_env_start = 0; BEGIN(MATH); return ALIGNED;}
+"\{array\}" {if (itex2MML_env_start == 1) BEGIN(ARRAYOPTIONS); else BEGIN(MATH); return ARRAY;}
+"\{svg\}" {itex2MML_env_start = 0; BEGIN(SVGENV); return SVG;}
+}
+
+<ARRAYOPTIONS>{
+"[t]" {yylval=itex2MML_copy_string("axis 1"); return ARRAYALIGN;}
+"[c]" {yylval=itex2MML_copy_string("center"); return ARRAYALIGN;}
+"[b]" {yylval=itex2MML_copy_string("axis -1"); return ARRAYALIGN;}
+"\{" {BEGIN(COLOPTS); return ST;}
+[\t\n\r ]+ ;
+}
+
+<COLOPTS>{
+"\}" {itex2MML_env_start = 0; BEGIN(MATH); return END;}
+"c" {yylval=itex2MML_copy_string("center"); return COLUMNALIGN;}
+"l" {yylval=itex2MML_copy_string("left"); return COLUMNALIGN;}
+"r" {yylval=itex2MML_copy_string("right"); return COLUMNALIGN;}
+[\t\n\r ]+ ;
}
<SVGENV>{
-"\\end\{svg\}" {BEGIN(MATH); return ENDSVG;}
-[^\\]* {yylval=itex2MML_copy_string(yytext); BEGIN(SVGENV); return XMLSTRING;}
+"\\end\{svg" {yylval=itex2MML_copy_string(yytext); yylval[yyleng-8]=0; BEGIN(SVGEND); return XMLSTRING;}
+(.|\n) {yymore();}
+}
+
+<SVGEND>{
+"\}" {BEGIN(MATH); return ENDSVG;}
}
<ROMAN>{
diff --git a/itex2mml/itex2MML.y b/itex2mml/itex2MML.y
index 223de3b..3c47cdd 100644
--- a/itex2mml/itex2MML.y
+++ b/itex2mml/itex2MML.y
@@ -1,9 +1,7 @@
-/* itex2MML 1.3.21
- * itex2MML.y last modified 4/4/2010
+/* itex2MML 1.4.5
+ * itex2MML.y last modified 10/2/2010
*/
-%expect 220
-
%{
#include <stdio.h>
#include <string.h>
@@ -279,7 +277,7 @@
%}
%left TEXOVER TEXATOP
-%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS BOLD SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOOLTIP TOGGLE FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDENV MATRIX PMATRIX BMATRIX BBMATRIX VM
ATRIX VVMATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR
+%token CHAR STARTMATH STARTDMATH ENDMATH MI MIB MN MO SUP SUB MROWOPEN MROWCLOSE LEFT RIGHT BIG BBIG BIGG BBIGG BIGL BBIGL BIGGL BBIGGL FRAC TFRAC OPERATORNAME MATHOP MATHBIN MATHREL MOP MOL MOLL MOF MOR PERIODDELIM OTHERDELIM LEFTDELIM RIGHTDELIM MOS MOB SQRT ROOT BINOM TBINOM UNDER OVER OVERBRACE UNDERLINE UNDERBRACE UNDEROVER TENSOR MULTI ARRAYALIGN COLUMNALIGN ARRAY COLSEP ROWSEP ARRAYOPTS COLLAYOUT COLALIGN ROWALIGN ALIGN EQROWS EQCOLS ROWLINES COLLINES FRAME PADDING ATTRLIST ITALICS BOLD BOXED SLASHED RM BB ST END BBLOWERCHAR BBUPPERCHAR BBDIGIT CALCHAR FRAKCHAR CAL FRAK CLAP LLAP RLAP ROWOPTS TEXTSIZE SCSIZE SCSCSIZE DISPLAY TEXTSTY TEXTBOX TEXTSTRING XMLSTRING CELLOPTS ROWSPAN COLSPAN THINSPACE MEDSPACE THICKSPACE QUAD QQUAD NEGSPACE PHANTOM HREF UNKNOWNCHAR EMPTYMROW STATLINE TOOLTIP TOGGLE FGHIGHLIGHT BGHIGHLIGHT SPACE INTONE INTTWO INTTHREE BAR WIDEBAR VEC WIDEVEC HAT WIDEHAT CHECK WIDECHECK TILDE WIDETILDE DOT DDOT DDDOT DDDDOT UNARYMINUS UNARYPLUS BEGINENV ENDEN
V MATRIX PMATRIX BMATRIX BBMATRIX VMATRIX VVMATRIX SVG ENDSVG SMALLMATRIX CASES ALIGNED GATHERED SUBSTACK PMOD RMCHAR COLOR BGCOLOR XARROW OPTARGOPEN OPTARGCLOSE
%%
@@ -562,6 +560,7 @@ closedTerm: array
| bbold
| frak
| slashed
+| boxed
| cal
| space
| textstring
@@ -826,10 +825,6 @@ mo: mob
itex2MML_free_string($2);
};
-emptymrow: EMPTYMROW {
- $$ = itex2MML_copy_string("<mrow></mrow>");
-};
-
space: SPACE ST INTONE END ST INTTWO END ST INTTHREE END {
char * s1 = itex2MML_copy3("<mspace height=\"", $3, "ex\" depth=\"");
char * s2 = itex2MML_copy3($6, "ex\" width=\"", $9);
@@ -947,7 +942,12 @@ italics: ITALICS closedTerm {
};
slashed: SLASHED closedTerm {
- $$ = itex2MML_copy3("<mrow><mpadded width=\"0.125em\"><mo>/</mo></mpadded>", $2, "</mrow>");
+ $$ = itex2MML_copy3("<menclose notation=\"updiagonalstrike\">", $2, "</menclose>");
+ itex2MML_free_string($2);
+};
+
+boxed: BOXED closedTerm {
+ $$ = itex2MML_copy3("<menclose notation=\"box\">", $2, "</menclose>");
itex2MML_free_string($2);
};
@@ -1217,6 +1217,13 @@ binom: BINOM closedTerm closedTerm {
itex2MML_free_string(s1);
itex2MML_free_string($2);
itex2MML_free_string($3);
+}
+| TBINOM closedTerm closedTerm {
+ char * s1 = itex2MML_copy3("<mrow><mo>(</mo><mstyle displaystyle=\"false\"><mfrac linethickness=\"0\">", $2, $3);
+ $$ = itex2MML_copy2(s1, "</mfrac></mstyle><mo>)</mo></mrow>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string($2);
+ itex2MML_free_string($3);
};
munderbrace: UNDERBRACE closedTerm {
@@ -1291,11 +1298,11 @@ check: CHECK closedTerm {
};
hat: HAT closedTerm {
- $$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">̂</mo></mover>");
+ $$ = itex2MML_copy3("<mover>", $2, "<mo stretchy=\"false\">^</mo></mover>");
itex2MML_free_string($2);
}
| WIDEHAT closedTerm {
- $$ = itex2MML_copy3("<mover>", $2, "<mo>̂</mo></mover>");
+ $$ = itex2MML_copy3("<mover>", $2, "<mo>^</mo></mover>");
itex2MML_free_string($2);
};
@@ -1304,7 +1311,14 @@ msqrt: SQRT closedTerm {
itex2MML_free_string($2);
};
-mroot: ROOT closedTerm closedTerm {
+mroot: SQRT OPTARGOPEN compoundTermList OPTARGCLOSE closedTerm {
+ char * s1 = itex2MML_copy3("<mroot>", $5, $3);
+ $$ = itex2MML_copy2(s1, "</mroot>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string($3);
+ itex2MML_free_string($5);
+}
+| ROOT closedTerm closedTerm {
char * s1 = itex2MML_copy3("<mroot>", $3, $2);
$$ = itex2MML_copy2(s1, "</mroot>");
itex2MML_free_string(s1);
@@ -1312,7 +1326,14 @@ mroot: ROOT closedTerm closedTerm {
itex2MML_free_string($3);
};
-munder: UNDER closedTerm closedTerm {
+munder: XARROW OPTARGOPEN compoundTermList OPTARGCLOSE EMPTYMROW {
+ char * s1 = itex2MML_copy3("<munder><mo>", $1, "</mo><mrow>");
+ $$ = itex2MML_copy3(s1, $3, "</mrow></munder>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string($1);
+ itex2MML_free_string($3);
+}
+| UNDER closedTerm closedTerm {
char * s1 = itex2MML_copy3("<munder>", $3, $2);
$$ = itex2MML_copy2(s1, "</munder>");
itex2MML_free_string(s1);
@@ -1320,7 +1341,14 @@ munder: UNDER closedTerm closedTerm {
itex2MML_free_string($3);
};
-mover: OVER closedTerm closedTerm {
+mover: XARROW closedTerm {
+ char * s1 = itex2MML_copy3("<mover><mo>", $1, "</mo>");
+ $$ = itex2MML_copy3(s1, $2, "</mover>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string($1);
+ itex2MML_free_string($2);
+}
+| OVER closedTerm closedTerm {
char * s1 = itex2MML_copy3("<mover>", $3, $2);
$$ = itex2MML_copy2(s1, "</mover>");
itex2MML_free_string(s1);
@@ -1328,7 +1356,17 @@ mover: OVER closedTerm closedTerm {
itex2MML_free_string($3);
};
-munderover: UNDEROVER closedTerm closedTerm closedTerm {
+munderover: XARROW OPTARGOPEN compoundTermList OPTARGCLOSE closedTerm {
+ char * s1 = itex2MML_copy3("<munderover><mo>", $1, "</mo><mrow>");
+ char * s2 = itex2MML_copy3(s1, $3, "</mrow>");
+ $$ = itex2MML_copy3(s2, $5, "</munderover>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string(s2);
+ itex2MML_free_string($1);
+ itex2MML_free_string($3);
+ itex2MML_free_string($5);
+}
+| UNDEROVER closedTerm closedTerm closedTerm {
char * s1 = itex2MML_copy3("<munderover>", $4, $2);
$$ = itex2MML_copy3(s1, $3, "</munderover>");
itex2MML_free_string(s1);
@@ -1337,6 +1375,10 @@ munderover: UNDEROVER closedTerm closedTerm closedTerm {
itex2MML_free_string($4);
};
+emptymrow: EMPTYMROW {
+ $$ = itex2MML_copy_string("<mrow></mrow>");
+};
+
mathenv: BEGINENV MATRIX tableRowList ENDENV MATRIX {
$$ = itex2MML_copy3("<mrow><mtable rowspacing=\"0.5ex\">", $3, "</mtable></mrow>");
itex2MML_free_string($3);
@@ -1377,6 +1419,23 @@ mathenv: BEGINENV MATRIX tableRowList ENDENV MATRIX {
$$ = itex2MML_copy3("<mrow><mtable columnalign=\"right left right left right left right left right left\" columnspacing=\"0em\">", $3, "</mtable></mrow>");
itex2MML_free_string($3);
}
+| BEGINENV ARRAY ARRAYALIGN ST columnAlignList END tableRowList ENDENV ARRAY {
+ char * s1 = itex2MML_copy3("<mtable rowspacing=\"0.5ex\" align=\"", $3, "\" columnalign=\"");
+ char * s2 = itex2MML_copy3(s1, $5, "\">");
+ $$ = itex2MML_copy3(s2, $7, "</mtable>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string(s2);
+ itex2MML_free_string($3);
+ itex2MML_free_string($5);
+ itex2MML_free_string($7);
+}
+| BEGINENV ARRAY ST columnAlignList END tableRowList ENDENV ARRAY {
+ char * s1 = itex2MML_copy3("<mtable rowspacing=\"0.5ex\" columnalign=\"", $4, "\">");
+ $$ = itex2MML_copy3(s1, $6, "</mtable>");
+ itex2MML_free_string(s1);
+ itex2MML_free_string($4);
+ itex2MML_free_string($6);
+}
| BEGINENV SVG XMLSTRING ENDSVG {
$$ = itex2MML_copy3("<semantics><annotation-xml encoding=\"SVG1.1\">", $3, "</annotation-xml></semantics>");
itex2MML_free_string($3);
@@ -1385,6 +1444,16 @@ mathenv: BEGINENV MATRIX tableRowList ENDENV MATRIX {
$$ = itex2MML_copy_string(" ");
};
+columnAlignList: columnAlignList COLUMNALIGN {
+ $$ = itex2MML_copy3($1, " ", $2);
+ itex2MML_free_string($1);
+ itex2MML_free_string($2);
+}
+| COLUMNALIGN {
+ $$ = itex2MML_copy_string($1);
+ itex2MML_free_string($1);
+};
+
substack: SUBSTACK MROWOPEN tableRowList MROWCLOSE {
$$ = itex2MML_copy3("<mrow><mtable columnalign=\"center\" rowspacing=\"0.5ex\">", $3, "</mtable></mrow>");
itex2MML_free_string($3);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]