Comments (6)
would it make sense to generate a single file containing all the entities and import that statically?
There already is such a file: mathjax3/input/mathml/AllEntities.js
. If you import that into your script, it will pre-load all the entities.
You are right that the file path is incorrect (there was a restructuring that wasn't reflected here). That should be fixed.
The asynchLoad()
code needs to be revisited. It was needed initially during the period when we still had version 2 code hooked in as we were rewriting the various modules, but it may be eliminated in the end. In any case, I have been thinking about making it be conditionally compiled so that it does not cause web pack warnings.
from mathjax-src.
Thanks, mathjax3/input/mathml/AllEntities.js
looks useful in theory, although I think the imports might need to be changed to be relative (i.e. import './entities/a.js';
instead of import 'entities/a.js';
)?
In any case, I have been thinking about making it be conditionally compiled so that it does not cause webpack warnings.
Anything that gets rid of the warnings sounds good to me :)
from mathjax-src.
I think you are right. I thought the file had been used before, but clearly it was never properly tested. Sigh. Thanks for the catch.
from mathjax-src.
A fix for the entity importing (#92) has been merged into the master and alpha branches, as well as updates to the asyncLoad()
function to make it work from any directory, and to provide a disabled version for use with webpack to avoid the warning messages. For that, you need to add
new webpack.NormalModuleReplacementPlugin(
/AsyncLoad\.js/,
function (resource) {
resource.request = resource.request.replace(/AsyncLoad/,"AsyncLoad-disabled");
}
)
to the plugins
array for your webpack configuration. This will replace the the asynchLoad()
function with one that always returns failure (and doesn't try to load any files).
from mathjax-src.
This is all good now, thanks @dpvc ⭐️
from mathjax-src.
See this comment for a better/safer approach.
from mathjax-src.
Related Issues (20)
- Collapsed font heights HOT 3
- How is a character's height/depth retrieved? HOT 6
- "ReferenceError: window is not defined" when dev page reloaded. HOT 1
- Multiple Typescript Errors HOT 9
- delete arguments.callee HOT 2
- support for \oiint and \oiiint HOT 1
- v4: DefaultFont.js not CJS HOT 2
- how do i customize the the latex defined by myself, and change it to mathml defined by myself HOT 1
- Overlapping output when using serveral expressions on the same page HOT 3
- SVG StyleList unused styles? HOT 3
- Reverse process HOT 1
- Integrate better tooling infra into mathjax
- ES6 class keyword used in "ES5" code due to bundled speech-rule-engine dependency HOT 6
- use mathjax3 in andriod5 show error "getExplicit of null" HOT 1
- Build directions don't work for v4-update branch HOT 3
- MathJax-Fonts repository private HOT 9
- Can I use a custom font in version 3.2?
- ts/util/asyncLoad/node.js needs ESM version HOT 9
- Can we migrated to MathJax.v3.2 version from V2 HOT 1
- installation of v4 not working with yarn HOT 1
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-src.