localization.html 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <title>Localization</title>
  5. <!-- Copyright (c) 2013-2015 The MathJax Consortium -->
  6. <meta charset="utf-8"/>
  7. <script type="text/javascript" src="../unpacked/MathJax.js?config=TeX-MML-AM_HTMLorMML-full.js">
  8. var _M_ = 'MISSING TRANSLATION';
  9. </script>
  10. <script type="text/x-mathjax-config">
  11. MathJax.Localization.strings.en.isLoaded = false;
  12. MathJax.Hub.Config({
  13. TeX: {
  14. noErrors: { disabled: true },
  15. noUndefined: { disabled: true },
  16. equationNumbers: { autoNumber: "AMS" },
  17. extensions: ["AMSmath.js",
  18. "begingroup.js", "color.js", "extpfeil.js", "mhchem.js",
  19. "newcommand.js"]
  20. }
  21. });
  22. /* Create the list of locales. */
  23. var locales = {};
  24. var i = 0;
  25. for (l in MathJax.Localization.strings) {
  26. if (!MathJax.Localization.strings.hasOwnProperty(l)) continue;
  27. var option = document.createElement('option');
  28. option.appendChild(document.createTextNode(l));
  29. document.form.locale.appendChild(option);
  30. locales[l] = i;
  31. i++;
  32. }
  33. /* Parse the query string to determine the current locale */
  34. var currentLocale = document.form.locale[0].value;
  35. var query = location.search.substring(1);
  36. var params = query.split("&");
  37. for(var i = 0; i < params.length; i++) {
  38. var parts = params[i].split("=");
  39. if (parts.length != 2) continue;
  40. if (parts[0] == "locale" && locales[parts[1]]) {
  41. currentLocale = parts[1];
  42. document.form.locale.selectedIndex = locales[parts[1]];
  43. break;
  44. }
  45. }
  46. /* set the currentLocale */
  47. MathJax.Hub.Config({
  48. menuSettings: { locale: currentLocale }
  49. });
  50. var menu = MathJax.HTML.Cookie.Get("menu");
  51. menu.locale = currentLocale;
  52. MathJax.HTML.Cookie.Set("menu", menu);
  53. /* Main Strings */
  54. MathJax.Hub.Queue(function() {
  55. var s;
  56. s = document.getElementById('s1');
  57. s.MathJax = {};
  58. MathJax.Hub.formatError(s, new Error(''));
  59. s = document.getElementById('s3');
  60. s.MathJax = {};
  61. MathJax.Hub.formatError(s, new Error('ERROR MESSAGE'));
  62. s = document.getElementById('s2');
  63. s.MathJax = {};
  64. MathJax.Hub.Config({errorSettings: { message: ["[",["MathError","MathError"],"]"] }});
  65. MathJax.Hub.formatError(s, new Error(''));
  66. });
  67. /* FontWarnings */
  68. MathJax.Hub.config.extensions.push("FontWarnings.js");
  69. MathJax.HTML.Cookie.Set("fontWarn", { warned: false });
  70. function displayFontWarning(aSignal, aAvailableFonts)
  71. {
  72. MathJax.Hub.config['HTML-CSS'].allowWebFonts = false;
  73. MathJax.Hub.config['HTML-CSS'].availableFonts = aAvailableFonts;
  74. MathJax.HTML.Cookie.Set("fontWarn", { warned: false });
  75. MathJax.OutputJax['HTML-CSS'].addElement = MathJax.HTML.addElement;
  76. MathJax.Hub.Startup.signal.Post(aSignal);
  77. setTimeout("document.body.setAttribute('onclick', 'location.reload()')", 1000);
  78. }
  79. /* MathMenu */
  80. function switchRendererWarning(aWarning)
  81. {
  82. var message = MathJax.Localization._(["MathMenu",aWarning], _M_);
  83. message += "\n\n";
  84. message += MathJax.Localization._(["MathMenu","SwitchAnyway"], _M_);
  85. alert(message);
  86. }
  87. function showAllItems(aMenu)
  88. {
  89. for (var i = 0, m = aMenu.items.length; i < m; i++) {
  90. var item = aMenu.items[i];
  91. item.hidden = false;
  92. item.disabled = false;
  93. if (item.menu) showAllItems(item.menu);
  94. }
  95. }
  96. MathJax.Hub.Register.StartupHook("MathMenu Ready", function () {
  97. showAllItems(MathJax.Menu.menu);
  98. });
  99. /* These MathML parsing errors happen only in rare cases, so we fake them... */
  100. MathJax.Hub.Queue(function() {
  101. document.getElementById('ErrorParsingMathML').innerHTML = MathJax.Localization._(['MathML','ErrorParsingMathML'], _M_);
  102. document.getElementById('MathMLSingleElement').innerHTML = MathJax.Localization._(['MathML','MathMLSingleElement'], _M_);
  103. });
  104. </script>
  105. </head>
  106. <body>
  107. <h1>MathJax Localization</h1>
  108. <form name="form" action="localization.html" method="get">
  109. <p style="text-align: center;">
  110. Language:
  111. <select name="locale" onchange="document.form.submit()">
  112. </select>
  113. </p>
  114. </form>
  115. <ul>
  116. <li id="main">Main strings
  117. <ul>
  118. <li>CookieConfig: <input type="button" onclick="confirm(MathJax.Localization._('CookieConfig', _M_))" value="Show confirm box"/></li>
  119. <li>MathProcessingError: <script id="s1"></script></li>
  120. <li>MathError: <script id="s2"></script></li>
  121. <li>LoadFile: <input type="button" onclick="MathJax.Message.Set(['LoadFile',_M_,'MYFILE.JS'],null,null)" value="Show message box"/></li>
  122. <li>Loading: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._('Loading',_M_)+'.....',null,null)" value="Show message box"/></li>
  123. <li>LoadFailed: <input type="button" onclick="MathJax.Message.Set(['LoadFailed',_M_,'MYFILE.JS'],null,null)" value="Show message box"/></li>
  124. <li>ProcessMath: <input type="button" onclick="MathJax.Message.Set(['ProcessMath',_M_,50],null,null)" value="Show message box"/></li>
  125. <li>Processing: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._('Processing',_M_)+'.....',null,null)" value="Show message box"/></li>
  126. <li>TypesetMath: <input type="button" onclick="MathJax.Message.Set(['TypesetMath',_M_,50],null,null)" value="Show message box"/></li>
  127. <li>Typesetting: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._('Typesetting',_M_)+'.....',null,null)" value="Show message box"/></li>
  128. <li>MathJaxNotSupported: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._('MathJaxNotSupported',_M_),null,null)" value="Show message box"/></li>
  129. </ul>
  130. </li>
  131. <li id="HelpDialog">HelpDialog: <input type="button" onclick="MathJax.Menu.Help()" value="Show Help"/>
  132. </li>
  133. <li id="MathML">MathML:
  134. <ul>
  135. <li>BadMglyph: <math><mi><mglyph alt="" src="BADURL"/></mi></math></li>
  136. <li>BadMglyphFont: <math><mi><mglyph fontfamily="BADFONT" alt="" src="" index="0"/></mi></math></li>
  137. <li>MathPlayer: <input type="button" onclick="alert(MathJax.Localization._(['MathML','MathPlayer'], _M_))" value="Show alert box"/></li>
  138. <li>CantCreateXMLParser: <input type="button" onclick="alert(MathJax.Localization._(['MathML','CantCreateXMLParser'], _M_))" value="Show alert box"/></li>
  139. <li>UnknownNodeType: <math><UNKNOWNNODE/></math></li>
  140. <li>UnexpectedTextNode: <math>UNEXPECTEDTEXT</math></li>
  141. <li>ErrorParsingMathML: <math><merror><mtext id="ErrorParsingMathML"></mtext></merror></math>
  142. </li>
  143. <li>ParsingError: <script type="math/mml"></script></li>
  144. <li>MathMLSingleElement: <math><merror><mtext id="MathMLSingleElement"></mtext></merror></math>
  145. <li>MathMLRootElement: <script type="math/mml"><INVALIDROOT/></script></li>
  146. </ul>
  147. </li>
  148. <li id="FontWarnings">FontWarnings
  149. <ul>
  150. <li>webFont, fonts: <input type="button" onclick="displayFontWarning('HTML-CSS Jax - Web-Font',['TeX','STIX'])" value="Show Warning Message"/></li>
  151. <li>imageFonts, fonts: <input type="button" onclick="displayFontWarning('HTML-CSS Jax - using image fonts',['TeX','STIX'])" value="Show Warning Message"/></li>
  152. <li>noFonts, fonts: <input type="button" onclick="displayFontWarning('HTML-CSS Jax - no valid font',['TeX','STIX'])" value="Show Warning Message"/></li>
  153. <li>webFont, TeX: <input type="button" onclick="displayFontWarning('HTML-CSS Jax - Web-Font',['TeX'])" value="Show Warning Message"/></li>
  154. <li>webFont, STIX: <input type="button" onclick="displayFontWarning('HTML-CSS Jax - Web-Font',['STIX'])" value="Show Warning Message"/></li>
  155. </ul>
  156. </li>
  157. <li id="MathMenu">MathMenu:
  158. <ul>
  159. <li>Right click on one these formulas to display the menu:
  160. <ul>
  161. <li>TeX: \( x \)</li>
  162. <li>AsciiMath: `x`</li>
  163. <li>MathML: <math><mi>x</mi></math></li>
  164. <li>MathProcessingError: <script id="s3"></script></li>
  165. <li>Annotation:
  166. <math>
  167. <semantics>
  168. <mi>x</mi>
  169. <annotation encoding="TeX">x (TeX)</annotation>
  170. <annotation encoding="StarMath 5.0">x (StarMath)</annotation>
  171. <annotation encoding="Maple">x (Maple)</annotation>
  172. <annotation-xml encoding="MathML-Content"><ci>x</ci></annotation-xml>
  173. <annotation-xml encoding="OpenMath"><OMV name="x"/></annotation-xml>
  174. </semantics>
  175. </math>
  176. </li>
  177. </ul>
  178. </li>
  179. <li>About Box: <input type="button" onclick="MathJax.Menu.About()" value="Show About Box"/></li>
  180. <li>WebkitNativeMMLWarning: <input type="button" onclick="switchRendererWarning('WebkitNativeMMLWarning')" value="Show alert box"/></li>
  181. <li>MSIENativeMMLWarning: <input type="button" onclick="switchRendererWarning('MSIENativeMMLWarning')" value="Show alert box"/></li>
  182. <li>OperaNativeMMLWarning: <input type="button" onclick="switchRendererWarning('OperaNativeMMLWarning')" value="Show alert box"/></li>
  183. <li>SafariNativeMMLWarning: <input type="button" onclick="switchRendererWarning('SafariNativeMMLWarning')" value="Show alert box"/></li>
  184. <li>FirefoxNativeMMLWarning: <input type="button" onclick="switchRendererWarning('FirefoxNativeMMLWarning')" value="Show alert box"/></li>
  185. <li>MSIESVGWarning: <input type="button" onclick="switchRendererWarning('MSIESVGWarning')" value="Show alert box"/></li>
  186. <li>LoadURL: <input type="button" onclick="prompt(MathJax.Localization._(['MathMenu','LoadURL'], _M_))" value="Show prompt box"/></li>
  187. <li>BadURL: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','BadURL'], _M_))" value="Show alert box"/></li>
  188. <li>BadData: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','BadData'], _M_, 'BADDATA'))" value="Show alert box"/></li>
  189. <li>ScaleMath: <input type="button" onclick="prompt(MathJax.Localization._(['MathMenu','ScaleMath'], _M_))" value="Show prompt box"/></li>
  190. <li>NonZeroScale: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','NonZeroScale'], _M_))" value="Show alert box"/></li>
  191. <li>PercentScale: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','PercentScale'], _M_))" value="Show alert box"/></li>
  192. <li>IE8warning: <input type="button" onclick="confirm(MathJax.Localization._(['MathMenu','IE8warning'], _M_))" value="Show confirm box"/></li>
  193. <li>IE9warning: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','IE9warning'], _M_))" value="Show alert box"/></li>
  194. <li>NoOriginalForm: <input type="button" onclick="alert(MathJax.Localization._(['MathMenu','NoOriginalForm'], _M_))" value="Show alert box"/></li>
  195. <li>'Show Math As' window: <input type="button" onclick="MathJax.Menu.ShowSource.Text('POPUP CONTENT')" value="Open popup"/></li>
  196. </ul>
  197. </li>
  198. <li id="HTML-CSS">HTML-CSS:
  199. <ul>
  200. <li>LoadWebFont: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._(['HTML-CSS','LoadWebFont'],_M_,'FONTNAME'),null,null)" value="Show message box"/></li>
  201. <li>CantLoadWebFont: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._(['HTML-CSS','CantLoadWebFont'],_M_,'FONTNAME'),null,null)" value="Show message box"/></li>
  202. <li>FirefoxCantLoadWebFont: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._(['HTML-CSS','FirefoxCantLoadWebFont'],_M_),null,null)" value="Show message box"/></li>
  203. <li>CantFindFontUsing: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._(['HTML-CSS','CantFindFontUsing'],_M_,'FONT1,FONT2'),null,null)" value="Show message box"/></li>
  204. <li>WebFontsNotAvailable: <input type="button" onclick="MathJax.Message.Set(MathJax.Localization._(['HTML-CSS','WebFontsNotAvailable'],_M_),null,null)" value="Show message box"/></li>
  205. </ul>
  206. </li>
  207. <li id="TeX">TeX:
  208. <ul>
  209. <li>Main commands
  210. <ul>
  211. <li>ExtraOpenMissingClose: \( { \) </li>
  212. <li>ExtraCloseMissingOpen: \( } \)</li>
  213. <li>MissingLeftExtraRight: \( \right) \)</li>
  214. <li>MissingScript: \( x^ \)</li>
  215. <li>ExtraLeftMissingRight: \( \left( \)</li>
  216. <li>Misplaced: \( & \)</li>
  217. <li>MissingOpenForSub: \( x__ \)</li>
  218. <li>MissingOpenForSup: \( x^^ \)</li>
  219. <li>AmbiguousUseOf: \( x \over y \over z \)</li>
  220. <li>EnvBadEnd: \( \begin{aligned} \end{eqarray} \)</li>
  221. <li>EnvMissingEnd: \( \begin{aligned} \)</li>
  222. <li>MissingBoxFor: \( \raise 1pt \)</li>
  223. <li>MissingCloseBrace: \( \array{ \)</li>
  224. <li>UndefinedControlSequence: \( \UNDEFINED \)</li>
  225. <li>DoubleExponent: \( x^3^2 \) </li>
  226. <li>DoubleSubscripts: \( x_3_2 \) </li>
  227. <li>DoubleExponentPrime: \( x^2' \)</li>
  228. <li>CantUseHash1: \( # \)</li>
  229. <li>MisplacedMiddle: \( \middle| \)</li>
  230. <li>MisplacedLimits: \( \limits \) </li>
  231. <li>MisplacedMoveRoot: \( \uproot \)</li>
  232. <li>IntegerArg: \( \sqrt[\uproot{INVALID}]{x} \) </li>
  233. <li>NotMathMLToken: \( \mmlToken{INVALID}{x} \)</li>
  234. <li>InvalidMathMLAttr: \( \mmlToken{mi}[_INVALID_]{x} \)</li>
  235. <li>UnknownAttrForElement: \( \mmlToken{mi}[INVALIDATTR='']{x} \)</li>
  236. <li>MaxMacroSub1: \( \newcommand{\a}{\a} \a \)</li>
  237. <li>MaxMacroSub2: \( \newenvironment{a}{\begin{a}}{\end{a}} \begin{a}\end{a} \)</li>
  238. <li>MissingArgFor: \( \frac{a} \)</li>
  239. <li>ExtraAlignTab: \( \cases{a & b & c} \)</li>
  240. <li>BracketMustBeDimension: \(\begin{array} x \\[INVALID] y \end{array}\)</li>
  241. <li>InvalidEnv: \( \begin{_INVALID_} \end{_INVALID_} \)</li>
  242. <li>UnknownEnv: \( \begin{UNKNOWN} \end{UNKNOWN} \) </li>
  243. <li>ExtraCloseLooking: \( \sqrt[}]x \)</li>
  244. <li>MissingCloseBracket: \( \sqrt[ \)</li>
  245. <li>MissingOrUnrecognizedDelim: \( \left \)</li>
  246. <li>MissingDimOrUnits: \( x \above y \)</li>
  247. <li>TokenNotFoundForCommand: \( \root{x} \)</li>
  248. <li>MathNotTerminated: \( \text{$x} \)</li>
  249. <li>IllegalMacroParam: \( \def\mymacro#1{#2} \mymacro{x} \) </li>
  250. <li>MaxBufferSize: \( \newcommand{\a}{\a\a} \a \)
  251. </li>
  252. </ul>
  253. </li>
  254. <li>AMSmath
  255. <ul>
  256. <li>CommandNotAllowedInEnv: \(\begin{split} x \tag{x} \end{split} \)</li>
  257. <li>MultipleCommand: \( \tag{x} \tag{y} \) </li>
  258. <li>MultipleLabel: \( \label{x} \) \(\ \label{x} \)</li>
  259. <li>CommandAtTheBeginingOfLine: \( \shoveleft \) </li>
  260. <li>IllegalAlign: \( \cfrac[INVALID]{a}{b} \) </li>
  261. <li>BadMathStyleFor: \( \genfrac{\{}{\}}{0pt}{INVALID}{a}{b} \) </li>
  262. <li>PositiveIntegerArg: \(\begin{alignedat}{INVALID}\end{alignedat}\)</li>
  263. <li>ErroneousNestingEq: \( \begin{multline} \begin{multline} \end{multline} \end{multline} \)</li>
  264. <li>MultlineRowsOneCol: \( \begin{multline} x & y \end{multline} \)</li>
  265. </ul>
  266. </li>
  267. <li>bbox
  268. <ul>
  269. <li>MultipleBBoxProperty: \( \bbox[green,blue]{} \)</li>
  270. <li>InvalidBBoxProperty: \( \bbox[_INVALID_]{} \)</li>
  271. </ul>
  272. </li>
  273. <li>begingroup
  274. <ul>
  275. <li>ExtraEndMissingBegin: \( \endgroup \)</li>
  276. <li>GlobalNotFollowedBy: \( \global\unknown \)</li>
  277. </ul>
  278. </li>
  279. <li>color
  280. <ul>
  281. <li>UndefinedColorModel: \( \color[COLORMODEL]{}{} \)</li>
  282. <li>ModelArg1: \( \color[RGB]{}{} \)</li>
  283. <li>InvalidDecimalNumber: \( \color[rgb]{,,}{} \)</li>
  284. <li>ModelArg2: \( \color[RGB]{256,,}{} \)</li>
  285. <li>InvalidNumber: \( \color[RGB]{,,}{} \)</li>
  286. </ul>
  287. </li>
  288. <li>extpfeil
  289. <ul>
  290. <li>NewextarrowArg1: \( \Newextarrow{}{}{} \)</li>
  291. <li>NewextarrowArg2: \( \Newextarrow{\myarrow}{}{} \)</li>
  292. <li>NewextarrowArg3: \( \Newextarrow{\myarrow}{0,0}{} \) </li>
  293. </ul>
  294. </li>
  295. <li>mhchem
  296. <ul>
  297. <li>NoClosingChar: \( \ce{ ->[ } \)</li>
  298. </ul>
  299. </li>
  300. <li>newcommand
  301. <ul>
  302. <li>IllegalControlSequenceName: \( \newcommand{_INVALID_}{} \)</li>
  303. <li>IllegalParamNumber: \( \newcommand{mycommand}[INVALID]{} \) </li>
  304. <li>MissingCS: \( \let INVALID \)</li>
  305. <li>CantUseHash2: \( \def\mycommand#A \)</li>
  306. <li>SequentialParam: \( \def\mycommand#2#1 \)</li>
  307. <li>MissingReplacementString: \( \def\mycommand \)</li>
  308. <li>MismatchUseDef: \( \def\mycommand[#1]#2[#3]{#1+#2+#3} \mycommand{a}{b}[c] \)</li>
  309. <li>RunawayArgument: \( \def\mycommand[#1][#2]#3{#1+#2+#3} \mycommand[a]{b} \)</li>
  310. </ul>
  311. </li>
  312. <li>NoClosingDelim: \( \verb?... \)</li>
  313. </ul>
  314. </ul>
  315. </body>
  316. </html>