Comments (2)
Tried to fix this myself, yet internal config v2 parser does not parse things JSON style, so I didn’t manage to make skipStartupTypeset: true
and skipStartupTypeset: false
both convert smoothly. Currently tried something like:
identityMap: function(x) {
return x;
},
booleanNegation: function(x) {
return !x;
},
transfer: function (name, mapping=Translate.identityMap) {
return function (prefix, key, value, config) {
Translate.checkValue(prefix, key, value) && Translate.set(name, mapping(value), config);
}
},
…
skipStartupTypeset: Translate.transfer('startup.typeset', Translate.booleanNegation),
from mathjax-demos-web.
I've made a PR that fixe this problem (and one with autoNumber
) based on your suggestion of adding a transformation function to the transfer()
method.
internal config v2 parser does not parse things JSON style
This is because the MathJax v2 config is not JSON (e.g., it can have values that are functions, can have expressions that produce the values, can include comments, and so on). So the parsing ends up being a bit complicated (and a bit fragile as well). It also tries to retain comments that might be in the original when it can.
The value
parameters are actually arrays that are made up of two parts: the value of the key (as a string) and the comment that follows if, if any. So your !x
was being applied to the array. My PR deals with the array properly.
from mathjax-demos-web.
Related Issues (20)
- Problems with color macros HOT 2
- mfenced has background color HOT 1
- Demo of tagFormat HOT 7
- Screen reader accessibility HOT 4
- Encapsulate part of equation into its own DOM element HOT 1
- "npm run make-custom-tex-extension" is not working HOT 5
- error when using the demo tex2svg page HOT 2
- Request: react and vue webpack bundling examples
- "npm run make-custom-tex-extension" is still not working. HOT 4
- Building a custom Tex extension crashes. HOT 8
- XSS vulnerabilities HOT 1
- Code Conflict HOT 1
- tex_mml_2html request fail
- Change size of mathml with mathjax HOT 1
- [Converter] minScaleAdjust should be scaled down just like scale HOT 2
- Can you provide more js example code for mathjax3? Especially mml3. HOT 1
- use font-url for re-usability
- update to 3.0.0-alpha.3
- Example MathJax3 from NPM module HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mathjax-demos-web.