Vertical bar at end of math entry

  • Context: MHB 
  • Thread starter Thread starter Kiwi1
  • Start date Start date
  • Tags Tags
    Vertical
Click For Summary
SUMMARY

The discussion centers on the appearance of a vertical bar next to mathematical entries when using MathJax in HTML documents. Users reported this issue primarily in Chrome v49 and v50, while it did not occur in Internet Explorer 11. The problem was traced to using an outdated local copy of MathJax, which was resolved by downloading the latest version from the CDN. The correct script tag for the updated MathJax is: <script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>.

PREREQUISITES
  • Understanding of MathJax and its configuration
  • Familiarity with HTML and JavaScript integration
  • Basic knowledge of browser compatibility issues
  • Experience with local versus CDN-hosted libraries
NEXT STEPS
  • Research the latest MathJax documentation for configuration options
  • Learn about browser rendering differences for HTML/CSS
  • Explore how to effectively use CDN resources in web development
  • Investigate common issues with local file paths in JavaScript
USEFUL FOR

Web developers, mathematicians using LaTeX, and anyone implementing MathJax for rendering mathematical content in web applications.

Kiwi1
Messages
106
Reaction score
0
When I enter math like \(x^2\) I often get a vertical bar shown to the right of my math when I print the document or view it on screen. Something like this: \(x^2|\)

I get this both on this site and also when I write HTML using mathjax.

When I preview this post I don't get the vertical bar. It seems a bit random.

Am I doing something wrong? Can I reliably avoid what looks like an edge on the math image?
 
Physics news on Phys.org
What browser are you using?

The reason I ask, is that MathJax makes extensive use of HTML/CSS, both of which are handled client-side, and different browsers handle this in different ways.
 
MarkFL said:
What browser are you using?

The reason I ask, is that MathJax makes extensive use of HTML/CSS, both of which are handled client-side, and different browsers handle this in different ways.

I was using Chrome v49. I just upgraded to Chrome v50. I have tried opening my document with IE11 and that was fine.

In Chrome (either version) if I open my file then all is fine, when I scroll to the bottom of the doc and back to the top the bars appear.
 
I just looked at a page here with a great deal of $\LaTeX$ on it using Chrome 50.x and didn't notice the issue you reported. Can you give me a link to a page here where the issue occurs for you?
 
Thanks, I think I have found it.

I was working on an HTML file on my local hard drive. Sometimes I use Mathjax off the web and sometimes from a copy on my HDD.

It turns out I get the bars when I use the HDD copy. So I downloaded a fresh copy of MathJax and so far it seems to be problem solved.

This worked:
<script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>

This did not until I updated MathJax:
<script type="text/javascript" src="file://c:/mathjax/mathjax-master/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 10 ·
Replies
10
Views
1K