Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not working when the equation is too long or too complicated #28

Open
Sunethan opened this issue Feb 12, 2018 · 5 comments
Open

not working when the equation is too long or too complicated #28

Sunethan opened this issue Feb 12, 2018 · 5 comments

Comments

@Sunethan
Copy link

Sunethan commented Feb 12, 2018

I found that MathJax won't work well when the equation is too many "A_{1}^{2}", "\text{1233}" or something like that. For example,

$$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}=\sum_{i=1}^n$$

This equation won't show LaTeX correctly.

However, if I delete =\sum_{i=1}^n, then everything is fine.

$$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}$$

I really need your help. I love this plugin so much because it enables me to write a physics blog.
Thank you so much.

You can see this two pictures :

https://imgur.com/Myse5vr

https://imgur.com/a/IxXI7

@paulschreiber
Copy link
Collaborator

This is working for me. Post body:

[mathjax]

$$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}$$

$$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}=\sum_{i=1}^n$$

Rendering:
screenshot 2018-02-17 14 35 05

Please provide more details. You state that the longer equation won't "show LaTeX correctly," but don't state in what ways it is shown incorrectly. Do you see no equation? Or the wrong equation? Are there any errors in the console?

@Sunethan
Copy link
Author

Sunethan commented Feb 19, 2018

Thanks for replying. You can see this image to know the way it's shown incorrectly.

2018-02-19 11 29 35

And its MathJax-latex plugin code is this :

2018-02-19 11 29 50

@paulschreiber
Copy link
Collaborator

Are you seeing any errors in the console?

What are your settings on the MathJax-LaTeX settings page? Mine are:

  • inline
  • wp-latex checked
  • CDN checked
  • custom location left empty
  • Configuration: Accessible

@Sunethan
Copy link
Author

Sunethan commented Mar 14, 2018

Sorry for replying late. I'm a little bit busy these days. Thanks for your help ><.

This is my Mathjax setting

2018-03-14 9 06 57

Besides, I add some code before in the header.php

<!--MathJax -->	
<script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?config=TeX-MML-AM_CHTML' type='text/javascript'>
    MathJax.Hub.Config({  
     TeX: { equationNumbers: { autoNumber: "AMS" } },  
     tex2jax: {  
      inlineMath: [ ['$','$'], ["\\(","\\)"] ],  
      displayMath: [ ['$$','$$'], ["\\[","\\]"] ],  
      processEscapes: true },  
     'HTML-CSS': { scale: 130 },  
     displayIndent: '2em'  
    });
</script>
<!--End MathJax -->

2018-03-14 9 08 21

I'm not sure if the CDN link is correct. It's my friend who help me to add this code. That enables me to use $..$ in inline mode. I've tried to delete this code to see whether everything is well. However, after I delete it and use [mathjax], some mathjax code still doesn't work. By the way, if I use too complicated latex code in inline mode, then something wrong also happens, like $E_{\text{mechanical}}$. it won't show correctly.

Thank you so much.

@Sunethan
Copy link
Author

Sunethan commented Mar 14, 2018

The error is :

2018-03-14 11 05 20

LaTeX Code:
$$\large\sum_{i=1}^n\vec{F}_{\text{ext, i}}=\sum_{i=1}^n$$

It renders like the html code:
$$\large\sum_{i=1}^n\vec{F}<em>{\text{ext, i}}=\sum</em>{i=1}^n$$

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants