Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/react-native/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ssl/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
React native Mathjax脱机用于web视图_React Native_Offline_Mathjax - Fatal编程技术网

React native Mathjax脱机用于web视图

React native Mathjax脱机用于web视图,react-native,offline,mathjax,React Native,Offline,Mathjax,通过链接mathjax cdn for react native,使用webview呈现数学内容是很常见的。但如何解决使其离线的问题 有没有办法在本地维护该捆绑包 它更受欢迎吗 包裹的大小是多少?我不希望我的应用程序大小超过10mb 从下载您的mathjax into=>android/app/src/main/assets/ 现在,在您的webview html代码中,将脚本引用设置为 <script src="file:///android_asset/MathJax/MathJax

通过链接mathjax cdn for react native,使用webview呈现数学内容是很常见的。但如何解决使其离线的问题

  • 有没有办法在本地维护该捆绑包

  • 它更受欢迎吗

  • 包裹的大小是多少?我不希望我的应用程序大小超过10mb


  • 从下载您的mathjax

    into=>android/app/src/main/assets/

    现在,在您的webview html代码中,将脚本引用设置为

    <script src="file:///android_asset/MathJax/MathJax.js?config=TeX-MML-AM_CHTML"></script>
    
    
    
    以及html中必要的配置。 还要确保将基本url设置为文件夹名

    <WebView source={{ html, baseUrl: 'file:///android_asset/MathJax/' }} />
    
    
    

    此外,您还可以通过删除不需要的字体和格式来减少Mathjax资产的大小。

    使用Mathjax grunt cleaner后,这对我不起作用。你知道吗?你必须确保你只删除你不需要的文件对不起,我没有JavaScript方面的经验,你能指导我吗?基本上你会在mathjax脚本加载位置mathjax.Hub.config上设置一个配置。在grunt文件中,您可以禁用不需要的其他配置。例如,我使用HTML-CSS作为输出,所以我不需要commonHtmlOutput、svgOutput、previewHtmlOutput、plainSourceOutput。因此,请将这些注释掉,然后运行grunt文件。确保不要移除任何可能会移除的内容need@GaudamThiyagarajan如何在react native中使用ios?因为ios没有android_资产