Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F3216
math.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 21 2014, 9:24 PM
2014-11-21 21:24:12 (UTC+0)
Size
3 KB
Referenced Files
None
Subscribers
None
math.patch
View Options
Index: math/parser.mly
===================================================================
--- math/parser.mly (revision 17265)
+++ math/parser.mly (arbetskopia)
@@ -12,8 +12,8 @@
%token <string*(Tex.t->Tex.t->string*string*string)> FUN_AR2h
%token <string*(Tex.t list->Tex.t list->string*string*string)> FUN_INFIXh
%token EOF CURLY_OPEN CURLY_CLOSE SUB SUP SQ_CLOSE NEXT_CELL NEXT_ROW
-%token BEGIN__MATRIX BEGIN_PMATRIX BEGIN_BMATRIX BEGIN_BBMATRIX BEGIN_VMATRIX BEGIN_VVMATRIX BEGIN_CASES
-%token END__MATRIX END_PMATRIX END_BMATRIX END_BBMATRIX END_VMATRIX END_VVMATRIX END_CASES
+%token BEGIN__MATRIX BEGIN_PMATRIX BEGIN_BMATRIX BEGIN_BBMATRIX BEGIN_VMATRIX BEGIN_VVMATRIX BEGIN_CASES BEGIN_ARRAY
+%token END__MATRIX END_PMATRIX END_BMATRIX END_BBMATRIX END_VMATRIX END_VVMATRIX END_CASES END_ARRAY
%token LEFT RIGHT
%type <Tex.t list> tex_expr
@@ -93,6 +93,7 @@
| BEGIN_BBMATRIX matrix END_BBMATRIX { TEX_MATRIX ("Bmatrix", $2) }
| BEGIN_VMATRIX matrix END_VMATRIX { TEX_MATRIX ("vmatrix", $2) }
| BEGIN_VVMATRIX matrix END_VVMATRIX { TEX_MATRIX ("Vmatrix", $2) }
+ | BEGIN_ARRAY matrix END_ARRAY { TEX_MATRIX ("array", $2) }
| BEGIN_CASES matrix END_CASES { TEX_MATRIX ("cases", $2) }
matrix:
line { [$1] }
Index: math/lexer.mll
===================================================================
--- math/lexer.mll (revision 17265)
+++ math/lexer.mll (arbetskopia)
@@ -77,6 +77,8 @@
| "\\end{vmatrix}" { END_VMATRIX }
| "\\begin{Vmatrix}" { Texutil.tex_use_ams(); BEGIN_VVMATRIX }
| "\\end{Vmatrix}" { END_VVMATRIX }
+ | "\\begin{array}" { Texutil.tex_use_ams(); BEGIN_ARRAY }
+ | "\\end{array}" { END_ARRAY }
| "\\begin{cases}" { Texutil.tex_use_ams(); BEGIN_CASES }
| "\\end{cases}" { END_CASES }
| '>' { LITERAL (HTMLABLEC(FONT_UFH,">"," > ")) }
Index: math/texutil.ml
===================================================================
--- math/texutil.ml (revision 17265)
+++ math/texutil.ml (arbetskopia)
@@ -425,14 +425,14 @@
| "\\left" -> LEFT
| "\\right" -> RIGHT
| "\\hat" -> FUN_AR1 "\\hat "
- | "\\widehat" -> FUN_AR1 "\\widehat "
- | "\\overline" -> FUN_AR1 "\\overline "
- | "\\overbrace" -> FUN_AR1 "\\overbrace "
- | "\\underline" -> FUN_AR1 "\\underline "
- | "\\underbrace" -> FUN_AR1 "\\underbrace "
- | "\\overleftarrow" -> FUN_AR1 "\\overleftarrow "
- | "\\overrightarrow" -> FUN_AR1 "\\overrightarrow "
- | "\\overleftrightarrow"->FUN_AR1 "\\overleftrightarrow "
+ | "\\widehat" -> LITERAL (TEX_ONLY "\\widehat ")
+ | "\\overline" -> LITERAL (TEX_ONLY "\\overline ")
+ | "\\overbrace" -> LITERAL (TEX_ONLY "\\overbrace ")
+ | "\\underline" -> LITERAL (TEX_ONLY "\\underline ")
+ | "\\underbrace" -> LITERAL (TEX_ONLY "\\underbrace ")
+ | "\\overleftarrow" -> LITERAL (TEX_ONLY "\\overleftarrow ")
+ | "\\overrightarrow" -> LITERAL (TEX_ONLY "\\overrightarrow ")
+ | "\\overleftrightarrow"->LITERAL (TEX_ONLY "\\overleftrightarrow ")
| "\\check" -> FUN_AR1 "\\check "
| "\\acute" -> FUN_AR1 "\\acute "
| "\\grave" -> FUN_AR1 "\\grave "
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2785
Default Alt Text
math.patch (3 KB)
Attached To
Mode
T9741: broken syntax of underbrace etc. and arrays
Attached
Detach File
Event Timeline
Log In to Comment