localization.html 16 KB

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