Skip to content

Commit c6ed59a

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 275ad40 + 6614f60 commit c6ed59a

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ The main goal of these components is to use them for the delivery of MathJax fro
6363

6464
MathJax components can be used in the browser as well as on the server in `node` applications, so browser and server-side applications can use the same code base and configurations. Components can be combined together into larger packages, either with other MathJax components, or with your own code, via `webpack`, for example.
6565

66-
Moreover, the tools for building components are available so that you can create your own custom components that you can serve from your own website if you have special needs not addressed by the CDN. For example, authors writing TeX extensions for MathJa can create their own components that can be loaded into MathJax from a different server even if the core MathJax is loaded from a CDN.
66+
Moreover, the tools for building components are available so that you can create your own custom components that you can serve from your own website if you have special needs not addressed by the CDN. For example, authors writing TeX extensions for MathJax can create their own components that can be loaded into MathJax from a different server even if the core MathJax is loaded from a CDN.
6767

6868
Although components are a convenient way of working with MathJax, those writing `node` scripts that use MathJax need not use the components as we have packaged them at all; they can continue to import MathJax into their projects directly, as in previous beta versions.
6969

convert-configuration/convert-configuration.js

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,14 @@ var Translate = {
112112
return null;
113113
},
114114

115-
transfer: function (name) {
115+
transfer: function (name, transform) {
116116
return function (prefix, key, value, config) {
117-
Translate.checkValue(prefix, key, value) && Translate.set(name, value, config);
117+
if (Translate.checkValue(prefix, key, value)) {
118+
if (transform && value instanceof Array) {
119+
value[0] = transform(value[0]);
120+
}
121+
Translate.set(name, value, config);
122+
}
118123
}
119124
},
120125

@@ -341,7 +346,8 @@ var Convert = {
341346
displayAlign: Translate.outputOption,
342347
displayIndent: Translate.outputOption,
343348
delayStartupUntil: Translate.notAvailable,
344-
skipStartupTypeset: Translate.transfer('startup.typeset'),
349+
skipStartupTypeset: Translate.transfer('startup.typeset',
350+
function (bool) {return (bool === 'true' ? 'false' : 'true')}),
345351
elements: Translate.transfer('options.elements'),
346352
positionToHash: Translate.notAvailable,
347353
showMathMenu: Translate.showMenu,
@@ -408,7 +414,7 @@ var Convert = {
408414
MAXMACROS: Translate.transfer('tex.maxMacros'),
409415
MAXBUFFER: Translate.transfer('tex.maxBuffer'),
410416
equationNumbers: {
411-
autoNumber: Translate.transfer('tex.tags'),
417+
autoNumber: Translate.transfer('tex.tags', function (name) {return name.toLowerCase()}),
412418
useLabelIds: Translate.transfer('tex.useLabelIds'),
413419
formatNumber: Translate.transfer('tex.tagFormat.number'),
414420
formatTag: Translate.transfer('tex.tagFormat.tag'),

0 commit comments

Comments
 (0)