More translations...
This commit is contained in:
parent
e1761573bf
commit
dd019796b0
|
@ -1136,6 +1136,13 @@ MathJax.Message = {
|
||||||
frame.style.height = body.clientHeight + 'px';
|
frame.style.height = body.clientHeight + 'px';
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Localization:
|
||||||
|
// - This will be a bit tedious, because some regexp matching and other
|
||||||
|
// concatenations are done.
|
||||||
|
// - In RTL languages: perhaps a "direction: rtl" style is needed somewhere ;
|
||||||
|
// the message box may need to be placed on the right hand side.
|
||||||
|
// - Perhaps related to the other messages "Loading", "Processing",
|
||||||
|
// "Typesetting" elsewhere.
|
||||||
filterText: function (text,n) {
|
filterText: function (text,n) {
|
||||||
if (MathJax.Hub.config.messageStyle === "simple") {
|
if (MathJax.Hub.config.messageStyle === "simple") {
|
||||||
if (text.match(/^Loading /)) {
|
if (text.match(/^Loading /)) {
|
||||||
|
@ -1210,6 +1217,9 @@ MathJax.Message = {
|
||||||
File: function (file) {
|
File: function (file) {
|
||||||
var root = MathJax.Ajax.config.root;
|
var root = MathJax.Ajax.config.root;
|
||||||
if (file.substr(0,root.length) === root) {file = "[MathJax]"+file.substr(root.length)}
|
if (file.substr(0,root.length) === root) {file = "[MathJax]"+file.substr(root.length)}
|
||||||
|
// Localization:
|
||||||
|
// This is used in the HTML output jax,
|
||||||
|
// MathJax.Message.File("Web-Font "+...) and so needs to be adapted.
|
||||||
return this.Set("Loading "+file);
|
return this.Set("Loading "+file);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1269,7 +1279,8 @@ MathJax.Hub = {
|
||||||
},
|
},
|
||||||
|
|
||||||
errorSettings: {
|
errorSettings: {
|
||||||
message: ["[Math Processing Error]"], // HTML snippet structure for message to use
|
// Localization: should be updated when the language is changed
|
||||||
|
message: ["["+MathJax.Localization_("MathProcessingError", "Math Processing Error")+"]"], // HTML snippet structure for message to use
|
||||||
style: {color: "#CC0000", "font-style":"italic"} // style for message
|
style: {color: "#CC0000", "font-style":"italic"} // style for message
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -1554,6 +1565,7 @@ MathJax.Hub = {
|
||||||
// Put up final message, reset the state and return
|
// Put up final message, reset the state and return
|
||||||
//
|
//
|
||||||
if (state.scripts.length && this.config.showProcessingMessages)
|
if (state.scripts.length && this.config.showProcessingMessages)
|
||||||
|
// Localization: see filterText
|
||||||
{MathJax.Message.Set("Processing math: 100%",0)}
|
{MathJax.Message.Set("Processing math: 100%",0)}
|
||||||
state.start = new Date().getTime(); state.i = state.j = 0;
|
state.start = new Date().getTime(); state.i = state.j = 0;
|
||||||
return null;
|
return null;
|
||||||
|
@ -1653,6 +1665,7 @@ MathJax.Hub = {
|
||||||
// Put up the typesetting-complete message
|
// Put up the typesetting-complete message
|
||||||
//
|
//
|
||||||
if (state.scripts.length && this.config.showProcessingMessages) {
|
if (state.scripts.length && this.config.showProcessingMessages) {
|
||||||
|
// Localization: see filterText
|
||||||
MathJax.Message.Set("Typesetting math: 100%",0);
|
MathJax.Message.Set("Typesetting math: 100%",0);
|
||||||
MathJax.Message.Clear(0);
|
MathJax.Message.Clear(0);
|
||||||
}
|
}
|
||||||
|
@ -1662,6 +1675,7 @@ MathJax.Hub = {
|
||||||
|
|
||||||
processMessage: function (state,type) {
|
processMessage: function (state,type) {
|
||||||
var m = Math.floor(state.i/(state.scripts.length)*100);
|
var m = Math.floor(state.i/(state.scripts.length)*100);
|
||||||
|
// Localization: see filterText
|
||||||
var message = (type === "Output" ? "Typesetting" : "Processing");
|
var message = (type === "Output" ? "Typesetting" : "Processing");
|
||||||
if (this.config.showProcessingMessages) {MathJax.Message.Set(message+" math: "+m+"%",0)}
|
if (this.config.showProcessingMessages) {MathJax.Message.Set(message+" math: "+m+"%",0)}
|
||||||
},
|
},
|
||||||
|
@ -2302,10 +2316,13 @@ MathJax.Hub.Startup = {
|
||||||
id: "Error", version: "2.1", config: {},
|
id: "Error", version: "2.1", config: {},
|
||||||
ContextMenu: function () {return BASE.Extension.MathEvents.Event.ContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
|
ContextMenu: function () {return BASE.Extension.MathEvents.Event.ContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
|
||||||
Mousedown: function () {return BASE.Extension.MathEvents.Event.AltContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
|
Mousedown: function () {return BASE.Extension.MathEvents.Event.AltContextMenu.apply(BASE.Extension.MathEvents.Event,arguments)},
|
||||||
|
// Localization: should this be translated?
|
||||||
getJaxFromMath: function () {return {inputJax:"Error", outputJax:"Error", originalText:"Math Processing Error"}}
|
getJaxFromMath: function () {return {inputJax:"Error", outputJax:"Error", originalText:"Math Processing Error"}}
|
||||||
};
|
};
|
||||||
BASE.InputJax.Error = {
|
BASE.InputJax.Error = {
|
||||||
id: "Error", version: "2.1", config: {},
|
id: "Error", version: "2.1", config: {},
|
||||||
|
// Localization: should this be translated?
|
||||||
|
// should be updated when the language is changed
|
||||||
sourceMenuTitle: "Error Message"
|
sourceMenuTitle: "Error Message"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -2494,10 +2511,14 @@ MathJax.Localization = {
|
||||||
"_": {
|
"_": {
|
||||||
isLoaded: true,
|
isLoaded: true,
|
||||||
strings: {
|
strings: {
|
||||||
CookieConfie:
|
CookieConfig:
|
||||||
"MathJax a trouvé un cookie de configuration utilisateur qui inclut"+
|
"MathJax a trouvé un cookie de configuration utilisateur qui inclut"+
|
||||||
"du code à exécuter. Souhaitez vous l'exécuter?\n\n"+
|
"du code à exécuter. Souhaitez vous l'exécuter?\n\n"+
|
||||||
"(Choisissez Annuler sauf si vous avez créé ce cookie vous-même",
|
"(Choisissez Annuler sauf si vous avez créé ce cookie vous-même",
|
||||||
|
MathProcessingError:
|
||||||
|
"Erreur de traitement de la formule mathématique",
|
||||||
|
MathError:
|
||||||
|
"Erreur dans la formule mathématique"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
Message: {
|
Message: {
|
||||||
|
@ -2691,8 +2712,11 @@ MathJax.Localization = {
|
||||||
"La commande %1 n'est autorisée qu'à l'intérieur d'une racine",
|
"La commande %1 n'est autorisée qu'à l'intérieur d'une racine",
|
||||||
MultipleMoveRoot:
|
MultipleMoveRoot:
|
||||||
"Commande %1 redondante",
|
"Commande %1 redondante",
|
||||||
MoveRootArg:
|
IntegerArg:
|
||||||
"L'argument de la commande %1 doit être un entier",
|
"L'argument de la commande %1 doit être un entier",
|
||||||
|
PositiveIntegerArg:
|
||||||
|
"L'argument de la commande %1 doit être un entier strictement"+
|
||||||
|
"positif",
|
||||||
NotMathMLToken:
|
NotMathMLToken:
|
||||||
"L'élément %1 n'est pas un élément MathML élémentaire",
|
"L'élément %1 n'est pas un élément MathML élémentaire",
|
||||||
InvalidMathMLAttr:
|
InvalidMathMLAttr:
|
||||||
|
@ -2736,7 +2760,28 @@ MathJax.Localization = {
|
||||||
IllegalMacroParam:
|
IllegalMacroParam:
|
||||||
"Paramètre de référence de macro non autorisé",
|
"Paramètre de référence de macro non autorisé",
|
||||||
MaxBufferSize:
|
MaxBufferSize:
|
||||||
"Taille maximale du tampon interne de MathJax dépassée. Il y a t'il un appel de macro récursif?"
|
"Taille maximale du tampon interne de MathJax dépassée. Il y a t'il un appel de macro récursif?",
|
||||||
|
CommandNotAllowedInEnv:
|
||||||
|
"La commande %1 n'est pas autorisé à l'intérieur de"+
|
||||||
|
"l'environnement %2",
|
||||||
|
MultipleCommand: "Usage multiple de la commande %1",
|
||||||
|
MultipleLabel: "Étiquette '%1' déjà définie",
|
||||||
|
CommandAtTheBeginingOfLine:
|
||||||
|
"La commande %1 doit être placée en début de ligne",
|
||||||
|
IllegalAlign: "Alignement non autorisé pour la commande %1",
|
||||||
|
BadMathStyleFor:
|
||||||
|
"Style mathématique non valide pour la commande %1",
|
||||||
|
ErroneousNestingEq:
|
||||||
|
"Emboitement incorrect des structures d'équation"
|
||||||
|
MultipleRowsOneCol:
|
||||||
|
"Les lignes multiples doivent avoir exactement une colonne"
|
||||||
|
NoClosingDelim:
|
||||||
|
"Impossible de trouver le délimiteur fermant pour la commande %1",
|
||||||
|
MultipleBBoxProperty:
|
||||||
|
"La propriété %1 de la commande %2 spécifiée deux fois",
|
||||||
|
InvalidBboxProperty:
|
||||||
|
"La valeur '%1' ne semble pas être une couleur, une dimension ou"+
|
||||||
|
"de marge intérieur ou un style."
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*
|
/*
|
||||||
* /MathJax/unpacked/config/Accessible-full.js
|
* /MathJax/unpacked/config/Accessible-full.js
|
||||||
*
|
*
|
||||||
|
@ -22,7 +24,8 @@ MathJax.Hub.Config({
|
||||||
mpMouse: true
|
mpMouse: true
|
||||||
},
|
},
|
||||||
errorSettings: {
|
errorSettings: {
|
||||||
message: ["[Math Error]"]
|
// Localization: should be updated when the language is changed
|
||||||
|
message: ["["+MathJax.Localization._("MathError", "Math Error")+"]"]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*
|
/*
|
||||||
* /MathJax/unpacked/config/Accessible.js
|
* /MathJax/unpacked/config/Accessible.js
|
||||||
*
|
*
|
||||||
|
@ -22,7 +24,8 @@ MathJax.Hub.Config({
|
||||||
mpMouse: true
|
mpMouse: true
|
||||||
},
|
},
|
||||||
errorSettings: {
|
errorSettings: {
|
||||||
message: ["[Math Error]"]
|
// Localization: should be updated when the language is changed
|
||||||
|
message: ["["+MathJax.Localization._("MathError", "Math Error")+"]"]
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/config/MMLorHTML.js
|
* MathJax/config/MMLorHTML.js
|
||||||
|
@ -95,7 +97,10 @@
|
||||||
} else {
|
} else {
|
||||||
HUB.PreProcess.disabled = true;
|
HUB.PreProcess.disabled = true;
|
||||||
HUB.prepareScripts.disabled = true;
|
HUB.prepareScripts.disabled = true;
|
||||||
MathJax.Message.Set("Your browser does not support MathJax",null,4000);
|
MathJax.Message.Set(
|
||||||
|
MathJax.Localization._(["Message", MathJaxNotSupported],
|
||||||
|
"Your browser does not support MathJax"),
|
||||||
|
null,4000);
|
||||||
HUB.Startup.signal.Post("MathJax not supported");
|
HUB.Startup.signal.Post("MathJax not supported");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/config/default.js
|
* MathJax/config/default.js
|
||||||
|
@ -234,7 +236,8 @@ MathJax.Hub.Config({
|
||||||
// jax that prevents it from operating properly).
|
// jax that prevents it from operating properly).
|
||||||
//
|
//
|
||||||
errorSettings: {
|
errorSettings: {
|
||||||
message: ["[Math Processing Error]"], // HTML snippet structure for message to use
|
// Localization: should be updated when the language is changed
|
||||||
|
message: ["["+MathJax.Localization._("MathProcessingError", "Math Processing Error"])+"]"], // HTML snippet structure for message to use
|
||||||
style: {color: "#CC0000", "font-style":"italic"} // style for message
|
style: {color: "#CC0000", "font-style":"italic"} // style for message
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -118,6 +118,8 @@
|
||||||
// The messages for the various situations
|
// The messages for the various situations
|
||||||
//
|
//
|
||||||
Message: {
|
Message: {
|
||||||
|
// Localization:
|
||||||
|
// how do we ensure it is updated when the language is changed?
|
||||||
webFont: [
|
webFont: [
|
||||||
["closeBox"],
|
["closeBox"],
|
||||||
_("webFont",
|
_("webFont",
|
||||||
|
@ -180,6 +182,9 @@
|
||||||
[["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
|
[["span",{style:{position:"relative", bottom:".2em"}},["x"]]]
|
||||||
]],
|
]],
|
||||||
|
|
||||||
|
// Localization:
|
||||||
|
// - decide HTML snippet format
|
||||||
|
// how do we ensure it is updated when the language is changed?
|
||||||
webFonts: [
|
webFonts: [
|
||||||
["p"],
|
["p"],
|
||||||
_("webFonts",
|
_("webFonts",
|
||||||
|
|
|
@ -602,6 +602,10 @@
|
||||||
/*
|
/*
|
||||||
* Handle the ABOUT box
|
* Handle the ABOUT box
|
||||||
*/
|
*/
|
||||||
|
// Localization: need to be reorganized. currently, there are concatenation
|
||||||
|
// of HTMLCSS.fontInUse and English strings based on the values of
|
||||||
|
// HTMLCSS.webFonts and HTMLCSS.imgFonts, HTMLCSS.allowWebFonts etc Update
|
||||||
|
// MENU.About.GetJax too.
|
||||||
MENU.About = function () {
|
MENU.About = function () {
|
||||||
var HTMLCSS = OUTPUT["HTML-CSS"] || {fontInUse: ""};
|
var HTMLCSS = OUTPUT["HTML-CSS"] || {fontInUse: ""};
|
||||||
var local = (HTMLCSS.webFonts ? "" : "local "), web = (HTMLCSS.webFonts ? " web" : "");
|
var local = (HTMLCSS.webFonts ? "" : "local "), web = (HTMLCSS.webFonts ? " web" : "");
|
||||||
|
@ -619,6 +623,9 @@
|
||||||
(HTMLCSS.webFonts && !HTMLCSS.imgFonts ? " \u2014 " +
|
(HTMLCSS.webFonts && !HTMLCSS.imgFonts ? " \u2014 " +
|
||||||
HTMLCSS.allowWebFonts.replace(/otf/,"woff or otf") + " fonts" : "")
|
HTMLCSS.allowWebFonts.replace(/otf/,"woff or otf") + " fonts" : "")
|
||||||
]]);
|
]]);
|
||||||
|
// Localization:
|
||||||
|
// - decide HTML snippet format
|
||||||
|
// - how do we ensure it is updated when the language is changed?
|
||||||
MENU.About.div = MENU.Background(MENU.About);
|
MENU.About.div = MENU.Background(MENU.About);
|
||||||
var about = HTML.addElement(MENU.About.div,"div",{
|
var about = HTML.addElement(MENU.About.div,"div",{
|
||||||
id: "MathJax_About"
|
id: "MathJax_About"
|
||||||
|
@ -807,6 +814,7 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (message) {
|
if (message) {
|
||||||
|
// Localization: concatenation, new line
|
||||||
message += "\n\n";
|
message += "\n\n";
|
||||||
message += _("SwitchAnyway",
|
message += _("SwitchAnyway",
|
||||||
"Switch the renderer anyway?\n\n" +
|
"Switch the renderer anyway?\n\n" +
|
||||||
|
@ -823,6 +831,8 @@
|
||||||
};
|
};
|
||||||
MENU.Renderer.Messages = {
|
MENU.Renderer.Messages = {
|
||||||
MML: {
|
MML: {
|
||||||
|
// Localization: should be updated when the language is changed
|
||||||
|
// concatenation
|
||||||
WebKit: _("WebkitNativeMMLWarning",
|
WebKit: _("WebkitNativeMMLWarning",
|
||||||
"Your browser doesn't seem to support MathML natively, " +
|
"Your browser doesn't seem to support MathML natively, " +
|
||||||
"so switching to MathML output may cause the mathematics " +
|
"so switching to MathML output may cause the mathematics " +
|
||||||
|
@ -883,6 +893,8 @@
|
||||||
alert(MESSAGE.IE9warning);
|
alert(MESSAGE.IE9warning);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
// Localization: should be updated when the language is changed
|
||||||
|
// concatenation
|
||||||
MENU.MPEvents.Messages = {
|
MENU.MPEvents.Messages = {
|
||||||
IE8warning:
|
IE8warning:
|
||||||
_("IE8warning",
|
_("IE8warning",
|
||||||
|
@ -940,6 +952,7 @@
|
||||||
/*
|
/*
|
||||||
* The main menu
|
* The main menu
|
||||||
*/
|
*/
|
||||||
|
// Localization: items used as key, should be refactored.
|
||||||
MENU.menu = MENU(
|
MENU.menu = MENU(
|
||||||
ITEM.SUBMENU("Show Math As",
|
ITEM.SUBMENU("Show Math As",
|
||||||
ITEM.COMMAND("MathML Code", MENU.ShowSource, {nativeTouch: true, format: "MathML"}),
|
ITEM.COMMAND("MathML Code", MENU.ShowSource, {nativeTouch: true, format: "MathML"}),
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/AMSmath.js
|
* MathJax/extensions/TeX/AMSmath.js
|
||||||
|
@ -159,8 +161,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var arg = this.trimSpaces(this.GetArgument(name)), tag = arg;
|
var arg = this.trimSpaces(this.GetArgument(name)), tag = arg;
|
||||||
if (!star) {arg = CONFIG.formatTag(arg)}
|
if (!star) {arg = CONFIG.formatTag(arg)}
|
||||||
var global = this.stack.global; global.tagID = tag;
|
var global = this.stack.global; global.tagID = tag;
|
||||||
if (global.notags) {TEX.Error(name+" not allowed in "+global.notags+" environment")}
|
if (global.notags) {
|
||||||
if (global.tag) {TEX.Error("Multiple "+name)}
|
TEX.Error(MathJax.Localization._(["TeX", "CommandNotAllowedInEnv"],
|
||||||
|
"%1 not allowed in %2 environment",
|
||||||
|
name, global.notags)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
if (global.tag) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "MultipleCommand"],
|
||||||
|
"Multiple %1", name))
|
||||||
|
}
|
||||||
global.tag = MML.mtd.apply(MML,this.InternalMath(arg)).With({id:CONFIG.formatID(tag)});
|
global.tag = MML.mtd.apply(MML,this.InternalMath(arg)).With({id:CONFIG.formatID(tag)});
|
||||||
},
|
},
|
||||||
HandleNoTag: function (name) {
|
HandleNoTag: function (name) {
|
||||||
|
@ -175,9 +185,16 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var global = this.stack.global, label = this.GetArgument(name);
|
var global = this.stack.global, label = this.GetArgument(name);
|
||||||
if (label === "") return;
|
if (label === "") return;
|
||||||
if (!AMS.refUpdate) {
|
if (!AMS.refUpdate) {
|
||||||
if (global.label) {TEX.Error("Multiple "+name+"'s")}
|
if (global.label) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "MultipleCommand"],
|
||||||
|
"Multiple %1", name))
|
||||||
|
}
|
||||||
global.label = label;
|
global.label = label;
|
||||||
if (AMS.labels[label] || AMS.eqlabels[label]) {TEX.Error("Label '"+label+"' mutiply defined")}
|
if (AMS.labels[label] || AMS.eqlabels[label]) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "MultipleLabel"],
|
||||||
|
"Label '%1' mutiply defined",
|
||||||
|
label)
|
||||||
|
}
|
||||||
AMS.eqlabels[label] = "???"; // will be replaced by tag value later
|
AMS.eqlabels[label] = "???"; // will be replaced by tag value later
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -221,7 +238,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
*/
|
*/
|
||||||
HandleShove: function (name,shove) {
|
HandleShove: function (name,shove) {
|
||||||
var top = this.stack.Top();
|
var top = this.stack.Top();
|
||||||
if (top.type !== "multline" || top.data.length) {TEX.Error(name+" must come at the beginning of the line")}
|
if (top.type !== "multline" || top.data.length) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "CommandAtTheBeginingOfLine",
|
||||||
|
"%1 must come at the beginning of the line"))
|
||||||
|
}
|
||||||
top.data.shove = shove;
|
top.data.shove = shove;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -235,7 +255,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var frac = MML.mfrac(TEX.Parse('\\strut\\textstyle{'+num+'}',this.stack.env).mml(),
|
var frac = MML.mfrac(TEX.Parse('\\strut\\textstyle{'+num+'}',this.stack.env).mml(),
|
||||||
TEX.Parse('\\strut\\textstyle{'+den+'}',this.stack.env).mml());
|
TEX.Parse('\\strut\\textstyle{'+den+'}',this.stack.env).mml());
|
||||||
lr = ({l:MML.ALIGN.LEFT, r:MML.ALIGN.RIGHT,"":""})[lr];
|
lr = ({l:MML.ALIGN.LEFT, r:MML.ALIGN.RIGHT,"":""})[lr];
|
||||||
if (lr == null) {TEX.Error("Illegal alignment specified in "+name)}
|
if (lr == null) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "IllegalAlign"],
|
||||||
|
"Illegal alignment specified in %1",
|
||||||
|
name))
|
||||||
|
}
|
||||||
if (lr) {frac.numalign = frac.denomalign = lr}
|
if (lr) {frac.numalign = frac.denomalign = lr}
|
||||||
this.Push(frac);
|
this.Push(frac);
|
||||||
},
|
},
|
||||||
|
@ -255,7 +279,10 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
if (left || right) {frac = MML.mfenced(frac).With({open: left, close: right})}
|
if (left || right) {frac = MML.mfenced(frac).With({open: left, close: right})}
|
||||||
if (style !== "") {
|
if (style !== "") {
|
||||||
var STYLE = (["D","T","S","SS"])[style];
|
var STYLE = (["D","T","S","SS"])[style];
|
||||||
if (STYLE == null) {TEX.Error("Bad math style for "+name)}
|
if (STYLE == null) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "BadMathStyleFor"],
|
||||||
|
"Bad math style for %1", name)
|
||||||
|
}
|
||||||
frac = MML.mstyle(frac);
|
frac = MML.mstyle(frac);
|
||||||
if (STYLE === "D") {frac.displaystyle = true; frac.scriptlevel = 0}
|
if (STYLE === "D") {frac.displaystyle = true; frac.scriptlevel = 0}
|
||||||
else {frac.displaystyle = false; frac.scriptlevel = style - 1}
|
else {frac.displaystyle = false; frac.scriptlevel = style - 1}
|
||||||
|
@ -306,7 +333,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var n, valign, align = "", spacing = [];
|
var n, valign, align = "", spacing = [];
|
||||||
if (!taggable) {valign = this.GetBrackets("\\begin{"+begin.name+"}")}
|
if (!taggable) {valign = this.GetBrackets("\\begin{"+begin.name+"}")}
|
||||||
n = this.GetArgument("\\begin{"+begin.name+"}");
|
n = this.GetArgument("\\begin{"+begin.name+"}");
|
||||||
if (n.match(/[^0-9]/)) {TEX.Error("Argument to \\begin{"+begin.name+"} must me a positive integer")}
|
if (n.match(/[^0-9]/)) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX", "PositiveIntegerArg"],
|
||||||
|
"Argument to %1 must me a positive integer"),
|
||||||
|
"\\begin{"+begin.name+"}")
|
||||||
|
}
|
||||||
while (n > 0) {align += "rl"; spacing.push("0em 0em"); n--}
|
while (n > 0) {align += "rl"; spacing.push("0em 0em"); n--}
|
||||||
spacing = spacing.join(" ");
|
spacing = spacing.join(" ");
|
||||||
if (taggable) {return this.AMSarray(begin,numbered,taggable,align,spacing)}
|
if (taggable) {return this.AMSarray(begin,numbered,taggable,align,spacing)}
|
||||||
|
@ -331,7 +362,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
* Check for bad nesting of equation environments
|
* Check for bad nesting of equation environments
|
||||||
*/
|
*/
|
||||||
checkEqnEnv: function () {
|
checkEqnEnv: function () {
|
||||||
if (this.stack.global.eqnenv) {TEX.Error("Erroneous nesting of equation structures")}
|
if (this.stack.global.eqnenv) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(["TeX", "ErroneousNestingEq"],
|
||||||
|
"Erroneous nesting of equation structures")
|
||||||
|
)
|
||||||
|
}
|
||||||
this.stack.global.eqnenv = true;
|
this.stack.global.eqnenv = true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -376,7 +412,11 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
GetDelimiterArg: function (name) {
|
GetDelimiterArg: function (name) {
|
||||||
var c = this.trimSpaces(this.GetArgument(name));
|
var c = this.trimSpaces(this.GetArgument(name));
|
||||||
if (c == "") {return null}
|
if (c == "") {return null}
|
||||||
if (TEXDEF.delimiter[c] == null) {TEX.Error("Missing or unrecognized delimiter for "+name)}
|
if (TEXDEF.delimiter[c] == null) {
|
||||||
|
TEX.Error(MathJax.Localization._(["TeX",
|
||||||
|
"MissingOrUnrecognizedDelim"],
|
||||||
|
"Missing or unrecognized delimiter for %1", name))
|
||||||
|
}
|
||||||
return this.convertDelimiter(c);
|
return this.convertDelimiter(c);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -438,7 +478,12 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
this.data = [];
|
this.data = [];
|
||||||
},
|
},
|
||||||
EndRow: function () {
|
EndRow: function () {
|
||||||
if (this.row.length != 1) {TEX.Error("multline rows must have exactly one column")}
|
if (this.row.length != 1) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(["TeX", "MultipleRowsOneCol"],
|
||||||
|
"multline rows must have exactly one column")
|
||||||
|
)
|
||||||
|
}
|
||||||
this.table.push(this.row); this.row = [];
|
this.table.push(this.row); this.row = [];
|
||||||
},
|
},
|
||||||
EndTable: function () {
|
EndTable: function () {
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/bbox.js
|
* MathJax/extensions/TeX/bbox.js
|
||||||
|
@ -63,16 +65,38 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
var match = part.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);
|
var match = part.match(/^(\.\d+|\d+(\.\d*)?)(pt|em|ex|mu|px|in|cm|mm)$/);
|
||||||
if (match) {
|
if (match) {
|
||||||
var pad = match[1]+match[3];
|
var pad = match[1]+match[3];
|
||||||
if (def) {TEX.Error("Padding specified twice in "+name)}
|
if (def) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "MultipleBboxProperty"],
|
||||||
|
"%1 specified twice in %2", "Padding", name)
|
||||||
|
)
|
||||||
|
}
|
||||||
def = {height:"+"+pad, depth:"+"+pad, lspace:pad, width:"+"+(2*match[1])+match[3]};
|
def = {height:"+"+pad, depth:"+"+pad, lspace:pad, width:"+"+(2*match[1])+match[3]};
|
||||||
} else if (part.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)) {
|
} else if (part.match(/^([a-z0-9]+|\#[0-9a-f]{6}|\#[0-9a-f]{3})$/i)) {
|
||||||
if (background) {TEX.Error("Background specified twice in "+name)}
|
if (background) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "MultipleBboxProperty"],
|
||||||
|
"%1 specified twice in %2", "Background", name)
|
||||||
|
)
|
||||||
|
}
|
||||||
background = part;
|
background = part;
|
||||||
} else if (part.match(/^[-a-z]+:/i)) {
|
} else if (part.match(/^[-a-z]+:/i)) {
|
||||||
if (style) {TEX.Error("Style specified twice in "+name)}
|
if (style) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "MultipleBboxProperty"],
|
||||||
|
"%1 specified twice in %2", "Style", name)
|
||||||
|
)
|
||||||
|
}
|
||||||
style = part;
|
style = part;
|
||||||
} else if (part !== "") {
|
} else if (part !== "") {
|
||||||
TEX.Error("'"+part+"' doesn't look like a color, a padding dimension, or a style");
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "InvalidBboxProperty"],
|
||||||
|
"'%1' doesn't look like a color, a padding dimension, or a style",
|
||||||
|
part);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (def) {math = MML.mpadded(math).With(def)}
|
if (def) {math = MML.mpadded(math).With(def)}
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/begingroup.js
|
* MathJax/extensions/TeX/begingroup.js
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/color.js
|
* MathJax/extensions/TeX/color.js
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/extpfeil.js
|
* MathJax/extensions/TeX/extpfeil.js
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/mhchem.js
|
* MathJax/extensions/TeX/mhchem.js
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/newcommand.js
|
* MathJax/extensions/TeX/newcommand.js
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
/* -*- Mode: Javascript; indent-tabs-mode:nil; js-indent-level: 2 -*- */
|
||||||
|
/* vim: set ts=2 et sw=2 tw=80: */
|
||||||
/*************************************************************
|
/*************************************************************
|
||||||
*
|
*
|
||||||
* MathJax/extensions/TeX/verb.js
|
* MathJax/extensions/TeX/verb.js
|
||||||
|
@ -41,10 +43,19 @@ MathJax.Hub.Register.StartupHook("TeX Jax Ready",function () {
|
||||||
*/
|
*/
|
||||||
Verb: function (name) {
|
Verb: function (name) {
|
||||||
var c = this.GetNext(); var start = ++this.i;
|
var c = this.GetNext(); var start = ++this.i;
|
||||||
if (c == "" ) {TEX.Error(name+" requires an argument")}
|
if (c == "" ) {
|
||||||
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "MissingArgFor"],
|
||||||
|
"Argument manquant pour la commande %1", name))
|
||||||
|
}
|
||||||
while (this.i < this.string.length && this.string.charAt(this.i) != c) {this.i++}
|
while (this.i < this.string.length && this.string.charAt(this.i) != c) {this.i++}
|
||||||
if (this.i == this.string.length)
|
if (this.i == this.string.length) {
|
||||||
{TEX.Error("Can't find closing delimiter for "+name)}
|
TEX.Error(
|
||||||
|
MathJax.Localization._(
|
||||||
|
["TeX", "NoClosinDelim"],
|
||||||
|
"Can't find closing delimiter for %1", name))
|
||||||
|
}
|
||||||
var text = this.string.slice(start,this.i); this.i++;
|
var text = this.string.slice(start,this.i); this.i++;
|
||||||
this.Push(MML.mtext(text).With({mathvariant:MML.VARIANT.MONOSPACE}));
|
this.Push(MML.mtext(text).With({mathvariant:MML.VARIANT.MONOSPACE}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,13 +28,6 @@
|
||||||
(function (HUB,HTML) {
|
(function (HUB,HTML) {
|
||||||
var VERSION = "2.1";
|
var VERSION = "2.1";
|
||||||
|
|
||||||
var _ = function (id) {
|
|
||||||
return MathJax.Localization._.apply(
|
|
||||||
MathJax.Localization,
|
|
||||||
[ ["ConfigWarning", id] ].concat([].slice.call(arguments,1))
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
var CONFIG = {
|
var CONFIG = {
|
||||||
style: {
|
style: {
|
||||||
position:"fixed", bottom:"4em", left:"3em", width:"40em",
|
position:"fixed", bottom:"4em", left:"3em", width:"40em",
|
||||||
|
@ -69,7 +62,7 @@
|
||||||
// Localization:
|
// Localization:
|
||||||
// - decide HTML snippet format
|
// - decide HTML snippet format
|
||||||
// - how do we ensure it is updated when the language is changed?
|
// - how do we ensure it is updated when the language is changed?
|
||||||
_("MissingConfig",
|
MathJax.Localization._(["ConfigWarning", "MissingConfig"],
|
||||||
"%1 MathJax no longer loads a default configuration file; " +
|
"%1 MathJax no longer loads a default configuration file; " +
|
||||||
"you must specify such files explicitly. " +
|
"you must specify such files explicitly. " +
|
||||||
"This page seems to use the older default %2 file"+
|
"This page seems to use the older default %2 file"+
|
||||||
|
|
|
@ -1407,7 +1407,7 @@
|
||||||
}
|
}
|
||||||
var n = this.GetArgument(name);
|
var n = this.GetArgument(name);
|
||||||
if (!n.match(/-?[0-9]+/)) {
|
if (!n.match(/-?[0-9]+/)) {
|
||||||
TEX.Error(_("MoveRootArg",
|
TEX.Error(_("IntegerArg",
|
||||||
"The argument to %1 must be an integer", name));
|
"The argument to %1 must be an integer", name));
|
||||||
}
|
}
|
||||||
n = (n/15)+"em";
|
n = (n/15)+"em";
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
// dialog: is it really necessary? If so, we need a localization note
|
// dialog: is it really necessary? If so, we need a localization note
|
||||||
// to explain that to localizers. Handling of concatenation might
|
// to explain that to localizers. Handling of concatenation might
|
||||||
// be an additional difficulty for the string extractor.
|
// be an additional difficulty for the string extractor.
|
||||||
alert(_MathJax.Localization._(["MathML", "MathPlayer"],
|
alert(MathJax.Localization._(["MathML", "MathPlayer"],
|
||||||
"MathJax was not able to set up MathPlayer.\n\n"+
|
"MathJax was not able to set up MathPlayer.\n\n"+
|
||||||
"If MathPlayer is not installed, you need to install it first.\n"+
|
"If MathPlayer is not installed, you need to install it first.\n"+
|
||||||
"Otherwise, your security settings may be preventing ActiveX \n"+
|
"Otherwise, your security settings may be preventing ActiveX \n"+
|
||||||
|
|
Loading…
Reference in New Issue
Block a user