Index: branches/wmf/1.18wmf1/extensions/Math/mathParserTests.txt |
— | — | @@ -144,6 +144,24 @@ |
145 | 145 | !! input |
146 | 146 | <math>\operatorname{sen}</math> |
147 | 147 | !! result |
148 | | -<p><img class="tex" alt="\operatorname{sen}" src="/images/math/3/e/7/3e71e75d9aac1bf5107271ad89ca7c3b.png" /> |
| 148 | +<p><img class="tex" alt="\operatorname{sen}" src="/images/math/f/a/9/fa9660c7eb053ca8d3c9a87fa86635d9.png" /> |
149 | 149 | </p> |
150 | 150 | !! end |
| 151 | + |
| 152 | +!! test |
| 153 | +BUG 31442: Multiple math accents without braces fails to parse |
| 154 | +!! input |
| 155 | +<math>\dot \vec B</math> |
| 156 | +!! result |
| 157 | +<p><img class="tex" alt="\dot \vec B" src="/images/math/e/6/4/e64939568ecb506a86a392373cec0458.png" /> |
| 158 | +</p> |
| 159 | +!! end |
| 160 | + |
| 161 | +!! test |
| 162 | +BUG 31442: Math accents with math font fail to parse if braces not used |
| 163 | +!! input |
| 164 | +<math>\tilde \mathcal{M}</math> |
| 165 | +!! result |
| 166 | +<p><img class="tex" alt="\tilde \mathcal{M}" src="/images/math/5/5/0/55072ce6ef8c840c4b7687bd8a028bde.png" /> |
| 167 | +</p> |
| 168 | +!! end |
Index: branches/wmf/1.18wmf1/extensions/Math/math/html.ml |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | | TEX_BOX (_,s)::r -> s^html_render_flat ctx r |
58 | 58 | | TEX_LITERAL (TEX_ONLY _)::_ -> raise Too_difficult_for_html |
59 | 59 | | TEX_FUN1 _::_ -> raise Too_difficult_for_html |
| 60 | + | TEX_FUN1nb _::_ -> raise Too_difficult_for_html |
60 | 61 | | TEX_FUN2 _::_ -> raise Too_difficult_for_html |
61 | 62 | | TEX_FUN2nb _::_ -> raise Too_difficult_for_html |
62 | 63 | | TEX_FUN2h _::_ -> raise Too_difficult_for_html |
— | — | @@ -101,6 +102,7 @@ |
102 | 103 | | TEX_BOX (_,s)::r -> ("",s,"")::html_render_deep ctx r |
103 | 104 | | TEX_LITERAL (TEX_ONLY _)::_ -> raise Too_difficult_for_html |
104 | 105 | | TEX_FUN1 _::_ -> raise Too_difficult_for_html |
| 106 | + | TEX_FUN1nb _::_ -> raise Too_difficult_for_html |
105 | 107 | | TEX_FUN2 _::_ -> raise Too_difficult_for_html |
106 | 108 | | TEX_FUN2nb _::_ -> raise Too_difficult_for_html |
107 | 109 | | TEX_FUN2sq _::_ -> raise Too_difficult_for_html |
Index: branches/wmf/1.18wmf1/extensions/Math/math/tex.mli |
— | — | @@ -11,6 +11,7 @@ |
12 | 12 | | TEX_BOX of string * string |
13 | 13 | | TEX_BIG of string * Render_info.t |
14 | 14 | | TEX_FUN1 of string * t |
| 15 | + | TEX_FUN1nb of string * t |
15 | 16 | | TEX_FUN2 of string * t * t |
16 | 17 | | TEX_FUN2nb of string * t * t |
17 | 18 | | TEX_INFIX of string * t list * t list |
Index: branches/wmf/1.18wmf1/extensions/Math/math/parser.mly |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | let sq_close_ri = HTMLABLEC(FONT_UFH,"]", "]") |
7 | 7 | %} |
8 | 8 | %token <Render_info.t> LITERAL DELIMITER |
9 | | -%token <string> FUN_AR2 FUN_INFIX FUN_AR1 DECL FUN_AR1opt BIG FUN_AR2nb |
| 9 | +%token <string> FUN_AR2 FUN_INFIX FUN_AR1 DECL FUN_AR1nb FUN_AR1opt BIG FUN_AR2nb |
10 | 10 | %token <string*string> BOX |
11 | 11 | %token <string*(string*string)> FUN_AR1hl |
12 | 12 | %token <string*Render_info.font_force> FUN_AR1hf DECLh |
— | — | @@ -85,6 +85,7 @@ |
86 | 86 | | BIG SQ_CLOSE { TEX_BIG ($1,sq_close_ri) } |
87 | 87 | | left expr right { TEX_LR ($1,$3,$2) } |
88 | 88 | | FUN_AR1 lit { TEX_FUN1($1,$2) } |
| 89 | + | FUN_AR1nb lit { TEX_FUN1nb($1,$2) } |
89 | 90 | | FUN_AR1hl lit { let t,h=$1 in TEX_FUN1hl(t,h,$2) } |
90 | 91 | | FUN_AR1hf lit { let t,h=$1 in TEX_FUN1hf(t,h,$2) } |
91 | 92 | | FUN_AR1opt expr_nosqc SQ_CLOSE lit { TEX_FUN2sq($1,TEX_CURLY $2,$4) } |
Index: branches/wmf/1.18wmf1/extensions/Math/math/lexer.mll |
— | — | @@ -56,6 +56,7 @@ |
57 | 57 | | "-" { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH,"-"," − ",MO,str))} |
58 | 58 | | literal_uf_op { let str = Lexing.lexeme lexbuf in LITERAL (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } |
59 | 59 | | delimiter_uf_op { let str = Lexing.lexeme lexbuf in DELIMITER (MHTMLABLEC (FONT_UFH, str," "^str^" ",MO,str)) } |
| 60 | + | "\\operatorname" { Texutil.tex_use_ams(); FUN_AR1nb "\\operatorname" } |
60 | 61 | | "\\sqrt" space * "[" { FUN_AR1opt "\\sqrt" } |
61 | 62 | | "\\xleftarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xleftarrow" } |
62 | 63 | | "\\xrightarrow" space * "[" { Texutil.tex_use_ams(); FUN_AR1opt "\\xrightarrow" } |
Index: branches/wmf/1.18wmf1/extensions/Math/math/texutil.ml |
— | — | @@ -20,7 +20,8 @@ |
21 | 21 | | TEX_DQN (a) -> "_{" ^ (render_tex a) ^ "}" |
22 | 22 | | TEX_UQN (a) -> "^{" ^ (render_tex a) ^ "}" |
23 | 23 | | TEX_LITERAL s -> tex_part s |
24 | | - | TEX_FUN1 (f,a) -> f ^ " " ^ (render_tex a) |
| 24 | + | TEX_FUN1 (f,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
| 25 | + | TEX_FUN1nb (f,a) -> f ^ " " ^ (render_tex a) |
25 | 26 | | TEX_FUN1hl (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
26 | 27 | | TEX_FUN1hf (f,_,a) -> "{" ^ f ^ " " ^ (render_tex a) ^ "}" |
27 | 28 | | TEX_DECLh (f,_,a) -> "{" ^ f ^ "{" ^ (mapjoin render_tex a) ^ "}}" |
Index: branches/wmf/1.18wmf1/extensions/Math/Math.i18n.php |
— | — | @@ -1132,6 +1132,7 @@ |
1133 | 1133 | ); |
1134 | 1134 | |
1135 | 1135 | /** Finnish (Suomi) |
| 1136 | + * @author Crt |
1136 | 1137 | * @author Wix |
1137 | 1138 | */ |
1138 | 1139 | $messages['fi'] = array( |
— | — | @@ -1143,7 +1144,7 @@ |
1144 | 1145 | 'mw_math_html' => 'Näytä HTML:nä, jos mahdollista, muuten PNG:nä', |
1145 | 1146 | 'mw_math_source' => 'Näytä TeX-muodossa (tekstiselaimille)', |
1146 | 1147 | 'mw_math_modern' => 'Suositus nykyselaimille', |
1147 | | - 'mw_math_mathml' => 'Näytä MathML:nä jos mahdollista (kokeellinen)', |
| 1148 | + 'mw_math_mathml' => 'Näytä MathML:nä, jos mahdollista (kokeellinen)', |
1148 | 1149 | 'math_failure' => 'Jäsentäminen epäonnistui', |
1149 | 1150 | 'math_unknown_error' => 'Tuntematon virhe', |
1150 | 1151 | 'math_unknown_function' => 'Tuntematon funktio', |
— | — | @@ -1462,7 +1463,7 @@ |
1463 | 1464 | 'math_tip' => 'ગણિતિક સૂત્ર (LaTeX)', |
1464 | 1465 | 'prefs-math' => 'ગણિત', |
1465 | 1466 | 'mw_math_png' => 'PNGને હમેંશા પરત કરો', |
1466 | | - 'mw_math_simple' => 'જો સરળ હોય તો HTML અન્યથા PNG', |
| 1467 | + 'mw_math_simple' => ' જો સરળ હોય તો HTML અન્યથા PNG', |
1467 | 1468 | 'mw_math_html' => 'જો સરળ હોય તો HTML અન્યથા PNG', |
1468 | 1469 | 'mw_math_source' => 'આને શબ્દ રહેવા દો (ટેક્સ્ટ બ્રાઉઝર)', |
1469 | 1470 | 'mw_math_modern' => 'અત્યાધુનિક બ્રાઉઝરો માટે ભલામણ યોગ્ય', |
— | — | @@ -2829,9 +2830,12 @@ |
2830 | 2831 | 'prefs-math' => 'Tlapōhualmatiliztli', |
2831 | 2832 | ); |
2832 | 2833 | |
2833 | | -/** Min Nan Chinese (Bân-lâm-gú) */ |
| 2834 | +/** Min Nan Chinese (Bân-lâm-gú) |
| 2835 | + * @author Ianbu |
| 2836 | + */ |
2834 | 2837 | $messages['nan'] = array( |
2835 | 2838 | 'math_sample' => 'Chia siá hong-thêng-sek', |
| 2839 | + 'math_tip' => '數學的公式 (LaTeX)', |
2836 | 2840 | 'prefs-math' => 'Sò·-ha̍k ê rendering', |
2837 | 2841 | 'mw_math_png' => 'Tiāⁿ-tio̍h iōng PNG render', |
2838 | 2842 | 'mw_math_simple' => 'Tân-sûn ê chêng-hêng iōng HTML; kî-thaⁿ iōng PNG', |
— | — | @@ -3202,12 +3206,12 @@ |
3203 | 3207 | 'mw_math_modern' => 'HTML - radītan per nāunans lasātlins', |
3204 | 3208 | 'mw_math_mathml' => 'MathML ik mazīngi (eksperimentālai)', |
3205 | 3209 | 'math_failure' => 'Parsers ni mazēi skaitātun', |
3206 | | - 'math_unknown_error' => 'niwaīsta blānda', |
3207 | | - 'math_unknown_function' => 'niwaīsta funkciōni', |
| 3210 | + 'math_unknown_error' => 'niwaistā blānda', |
| 3211 | + 'math_unknown_function' => 'niwaistā funkciōni', |
3208 | 3212 | 'math_lexing_error' => 'laksisis blānda', |
3209 | 3213 | 'math_syntax_error' => 'sīntaksis blānda', |
3210 | | - 'math_image_error' => 'Maināsna en PNG ni izpalla. |
3211 | | -Izbāndais, anga latex, dvips, gs be convert ast instalītan tikrōmiskai', |
| 3214 | + 'math_image_error' => 'Mainasnā en PNG ni izpalla. |
| 3215 | +Izbandais, anga latex, dvips, gs be convert ast instalītan tikrōmiskai', |
3212 | 3216 | 'math_bad_tmpdir' => 'Ni mazīngi teīktun anga enpeisātun en kīsmingiskasmu matemātiskan fōlderin', |
3213 | 3217 | 'math_bad_output' => 'Ni mazīngi teīktun anga enpeisātun en izēiseniskasmu matemātiskan fōlderin', |
3214 | 3218 | 'math_notexvc' => 'Ni ast texvc prōgraman. |
— | — | @@ -3358,6 +3362,7 @@ |
3359 | 3363 | * @author Emily |
3360 | 3364 | * @author Laurap |
3361 | 3365 | * @author Minisarm |
| 3366 | + * @author Strainu |
3362 | 3367 | */ |
3363 | 3368 | $messages['ro'] = array( |
3364 | 3369 | 'math_sample' => 'Introduceți formula aici', |
— | — | @@ -3374,7 +3379,7 @@ |
3375 | 3380 | 'math_unknown_function' => 'funcție necunoscută', |
3376 | 3381 | 'math_lexing_error' => 'eroare lexicală', |
3377 | 3382 | 'math_syntax_error' => 'eroare de sintaxă', |
3378 | | - 'math_image_error' => 'Conversiune în PNG eșuată; verificați corectitudinea instalării sistemelor LaTex sau dvipng (sau dvips + gs + convert)', |
| 3383 | + 'math_image_error' => 'Conversie în PNG eșuată; verificați corectitudinea instalării sistemelor LaTex sau dvipng (sau dvips + gs + convert)', |
3379 | 3384 | 'math_bad_tmpdir' => 'Nu se poate crea sau nu se poate scrie în directorul temporar pentru formule matematice', |
3380 | 3385 | 'math_bad_output' => 'Nu se poate crea sau nu se poate scrie în directorul de ieșire pentru formule matematice', |
3381 | 3386 | 'math_notexvc' => 'Lipsește executabilul texvc; vezi math/README pentru configurare.', |
Index: branches/wmf/1.18wmf1/extensions/Math/Math.php |
— | — | @@ -19,6 +19,7 @@ |
20 | 20 | |
21 | 21 | // Extension credits that will show up on Special:Version |
22 | 22 | $wgExtensionCredits['parserhook'][] = array( |
| 23 | + 'path' => __FILE__, |
23 | 24 | 'name' => 'Math', |
24 | 25 | 'version' => '1.0', |
25 | 26 | 'author' => array( 'Tomasz Wegrzanowski', 'Brion Vibber', '...' ), |
— | — | @@ -97,4 +98,4 @@ |
98 | 99 | |
99 | 100 | $wgExtensionMessagesFiles['Math'] = $dir . 'Math.i18n.php'; |
100 | 101 | |
101 | | -$wgParserTestFiles[] = $dir . 'mathParserTests.txt'; |
\ No newline at end of file |
| 102 | +$wgParserTestFiles[] = $dir . 'mathParserTests.txt'; |
Property changes on: branches/wmf/1.18wmf1/extensions/Math |
___________________________________________________________________ |
Modified: svn:mergeinfo |
102 | 103 | Merged /trunk/extensions/Math:r98560,99741,101031,101404,102438,102563,102953,103197 |