orsharir / github-mathjax Goto Github PK
View Code? Open in Web Editor NEWThis project forked from bgromov/wiki-mathjax
Chrome extension for rendering LaTeX equations in GitHub with MathJax
License: Other
This project forked from bgromov/wiki-mathjax
Chrome extension for rendering LaTeX equations in GitHub with MathJax
License: Other
I write it in markdown like
However, it does not show the curly bracket. Is there any trick?
Thanks in advance.
Should be displayed vertically。
应该竖着显示,而不是横着。
Hello,
This plugin is super useful. Do you know if there is an equivalent plugin for Safari? Or any pointers on where to start?
\mathcal{L}_D\left(\theta_D \mid W\right)
does work well but \mathcal{L}{D}\left(\theta{D} \mid W\right)
, the only different part is _D
or _{D}
the console reported this error:
Refused to load the font 'data:font/woff;base64,d09GRgABAAAAAGVUABEAAAAAxuQAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABgAAAAC4AAAA0ArgC7UdQT1MAAAGwAAAQ6AAALgxKsqRTR1NVQgAAEpgAAAH3AAAELqI5y+RPUy8yAAAUkAAAAE8AAABgaGyBu2NtYXAAABTgAAABlAAAAkQkRATXY3Z0IAAAFnQAAABeAAAAugDsQf1mcGdtAAAW1AAABZcAAAvNb3/BHGdhc3AAABxsAAAACAAAAAgAAAAQZ2x5ZgAAHHQAAEApAAB3CtbiupxoZWFkAABcoAAAADYAAAA2BkubWWhoZWEAAFzYAAAAIAAAACQHFARfaG10eAAAXPgAAAI6AAAEEk4TN4Nsb2NhAABfNAAAAhIAAAISiLhpam1heHAAAGFIAAAAIAAAACACigzgbmFtZQAAYWgAAACUAAABHhQGLdJwb3N0AABh/AAAAq4AAASRk5y6n3ByZ...QxUajCCFt4p9HP4fzdSWs2XhWl5HvJazrIrFUyB0l5dpqcW10lV2wukjMLuAvyMHNiYpgPsrCVXZDKrkpll6UWkh7kABVAFVCDe7UFmxagDegA+hLHRPbqtMo7ZHCpKdT6tPGXybzo0+RXBLoPZt1tELcXxCmAAyZwYTJvdDFZKnDER44X2451rDqCyunIsRWvLSx6wnWqwPj/uX5/KuEy6DL0z6A/Fn79VihxMFJsrlAFy4DpZOcvNlMeNp+BRDLj0r+XFdRxdSNSNxiI/AL3ojKdAAB4AWPw3sFwIihiIyNjX+QGxp0cDBwMyQUbGdictkUwWDAwsDJogTgOPN4c9iz6bMos4iysHFChUDZXJnMWTSZZJrAQt9M+YQYBBh4GTgY2kEZOoJiA0z4GBxiEiDEzuGxUYewIjNjg0BGxkTnFZaMaiLeLo4GBkcWhIzkkAqQkEggceHw5HFkM2VRZJFlYebR2MP5v3cDSu5GJwWUDW9xG1hQXAFAmKZU=' because it violates the following Content Security Policy directive: "font-src github.githubassets.com".
Chrome: 75.0.3770.80
github-mathjax: 0.2.4
In my team, we stared using Zenhub, a project management tool that has browser extensions for Chrome and Firefox. These extensions allow us to use Zenhub inside GitHub.
The problem is that the equations are not rendered when opening issues from the Zenhub extension inside GitHub, nor when opening issues from app.zenhub.com
Could it be possible to provide this support?
While I love seeing the math typeset in issues/etc, it causes havoc to the built-in github viewer for some files. In particular, .yml files for travis. e.g.
https://github.com/tornadoweb/tornado/blob/master/.travis.yml
Turn it on, and you will see what I mean. If you added a setting to just list post-fix extensions to ignore for the webpages, that would be enough for me. Better false positives than false negatives.
Thanks for the awesome extension. It make me quite convenient to write math in issues and other places on Github. However, I tested that equation reference is not correctly rendered. As an example:
In equation \eqref{eq:sample}, we find the value of an
interesting integral:\begin{equation}
\int_0^\infty \frac{x^3}{e^x-1},dx = \frac{\pi^4}{15}
\label{eq:sample}
\end{equation}
I don't know if it's a bug or not supported feature.
Hi.
I love this extension but I need extension support for MathJax for example ams libraries. Is there a way to configure chrome extension to use these libraries when processing the math formulas.
Hi there,
Previously, I added the chrome extension "MathJax PlugIn for GitHub" and the math equations showed correctly. But for now, the equation can not be shown in the correct view after the first one. For example, I wrote “$\beta$ and
Thank you very much for your help.
Xuewei
I have added github with mathjax to chrome.
The instruction says: Right-Click on equation to show MathJax's context menu with additional options, e.g. "Scale All Math..." to instantly scale all equations on a page, "TeX commands" to see the source TeX equation etc.
But nothing show up when I right click the equation.
And there is no change at all at the preview
Does it need any extra installation?
After submitting a new comment, or updating a present one, the extension does not render the new / updated content.
As always, use refresh as a temporary workaround.
For example
$$\mathbb{E}[\Delta \theta^2 ]t$$ $$\mathbb{E}[\Delta \theta^2]{t - 1}$$
when a condition expression such as $P(x|y)$
is contained in the table cell, the character |
in $P(x|y)$
will be recognized as the markdown table element, and must add escape \
before it as $P(x\|y)$
.
When the mathjax expression is $\{...\}$
format, then the plugin will not render out {}
. It requests a double escape format $\\{...\\}$
in order to render out the html content {}
.
This latex is correct
$$
\underbrace{E[Y_i|D_i=1]- E[Y_i|D_i=0]}_\text{Observed difference in average health} =
\underbrace{E[Y_{1i}|D_i=1]- E[Y_{0i}|D_i=1]}_\text{Average treatment effect on the treated} +
\underbrace{E[Y_{0i}|D_i=1]- E[Y_{0i}|D_i=0]}_\text{Selection Bias}
$$
Yet to make it work here in github, I must escape _\
to \_\
$$
\underbrace{E[Y_i|D_i=1]- E[Y_i|D_i=0]}\_\text{Observed difference in average health} =
\underbrace{E[Y_{1i}|D_i=1]- E[Y_{0i}|D_i=1]}\_\text{Average treatment effect on the treated} +
\underbrace{E[Y_{0i}|D_i=1]- E[Y_{0i}|D_i=0]}\_\text{Selection Bias}
$$
After escaping the underscores it does work
$$
\underbrace{E[Y_i|D_i=1]- E[Y_i|D_i=0]}_\text{Observed difference in average health} = \underbrace{E[Y_{1i}|D_i=1]- E[Y_{0i}|D_i=1]}_\text{Average treatment effect on the treated} + \underbrace{E[Y_{0i}|_i=1]- E[_{0i}|_i=0]}_\text{Selection Bias}
$$
Any idea if this can be resolved as it appears to be similar in root cause to the issue when trying to render this
$$
\begin{aligned}
Y_i &= \left \{
\begin{array}{ll}
Y_{1i} & \text{if } D_i = 1 \\
Y_{0i} & \text{if } D_i = 0 \\
\end{array}
\right. \\
&= Y_{0i} + (Y_{1i} - Y_{0i})D_{i*}
\end{aligned}
$$
Resulting in this error
$$
\begin{aligned}
Y_i &= \left {
\begin{array}{ll}
Y_{1i} & \text{if } D_i = 1 \
Y_{0i} & \text{if } D_i = 0 \
\end{array}
\right. \
&= Y_{0i} + (Y_{1i} - Y_{0i})D_{i*}
\end{aligned}
$$
Change the latex like this
$$
\begin{align}
Y_i &= \left \\{
\begin{array}{ll}
Y_{1i} & \text{if } D_i = 1 \\\\
Y_{0i} & \text{if } D_i = 0 \\\\
\end{array}
\right. \\\\
&= Y_{0i} + (Y_{1i} - Y_{0i})D_{i*}
\end{align}
$$
Amending the original \{
to \\{
and the \\
to \\\\
resolves the issue
Mathjax correctly renders the latex and I can extract it for use elsewhere.
With thanks
Scala's diffs are a mess with the plugin: when you have an interpolated srting, it is likely to have some $
s in it, and those are treated as \LaTeX which is a bit strange in the context.
Is there a way to suppress MathJax processing for specific file types?
It seems that newline(\\
) is ignored. For example:
$$
x\\
x^2
$$
Actual:
Well, everything is in the title: could you (try to) do a Firefox version of this extension? It seems interesting and well designed, but only for Chrome! 🦊 !
I heard that the safari updated their extension system so it’s much easier now to transfer a chrome extension to safari platform so it won't waste you too much time I think
Hey, is there a plan to include the Physics package support into MathJax?
Hi @orsharir, I have an issue when I add the command \label{}
to the environment equation.
In details when I create an equation as follows, I retrive the error Label 'eq:test' multiply defined
.
\begin{equation}
\label{eq:test}
sin^2(x) + cos^2(x) = 1
\end{equation}
\begin{equation}
\label{eq:test}
sin^2(x) + cos^2(x) = 1
\end{equation}
Unfortunately, I notice that the problem happens when the equation is cited by using the command \eqref{}
e.g. \eqref{eq:test}
Do you know why this is happening? Do you have any suggestions to fix the problem?
It recently happened to me that the plugin would not render some equations involving underscores, probably due to a conflict with GitHub's markdown renderer.
e.g., expressions of the form $\bar{x}_{i'}$
would not be rendered in GitHub issues, while $x_i$
would.
I found out that backslashing the troublesome underscores fixed the problem in this case, as it was suggested for related problems in mathjax/MathJax#329
e.g. $\bar{x}\_{i'}$
I can't seem to work out what might be causing this problem, but I can post a snippet of a .md file from one of my private repositories which fails to render correctly, despite having no issues in "enhanced" markdown editors like Remarkable.
* `Surface` class defining a cubic B-Spline surface on the $[0,1]$ interval.
* $\mathbf{s}(u,v)$, partial derivatives $\mathbf{s}_{u,v,uu,uv,vv}(u,v)$ are self-explanatory, as is the surface normal $\mathbf{N}(u,v)$ and its partial derivatives $\mathbf{N}_{u,v}(u,v)$.
Surface
class defining a cubic B-Spline surface on the This bug also seems to be present in the Chrome extensions "BitBucket with MathJax" and "Math Anywhere" and I've already reported it to their trackers here and here respectively.
I found it very uncomfortable that when you edit a markdown on a github, the equations previews are not processed by the extension, so you have to commit each time to look at the result. Is it possible to add this task to your backlog?
At the moment there's a bug that after adding a new comment to an issue or editing an old comment, the math in the comment is displayed as plain text. Should watch respective events and update math display.
Similarly, should add support for preview mode of the editor.
Sometimes it would be nice to render LaTeX in gists. Currently it doesn't work (at least for me).
Hi, I am compiling a list of all the render errors i am experiencing with the extension gist. Do you know of any alternative to \cancel
that could be rendered?
This formula could not be rendered in the following link, and there are much more formulas could not be rendered like this, although it can be rendered in this issue post.
https://github.com/scruel/ML-AndrewNg-Notes/blob/master/notes/week1.md#22-%E6%8D%9F%E5%A4%B1%E5%87%BD%E6%95%B0cost-function
$ h_\theta(x) \geqslant 0.5 $
shows error "Undefined control sequence \geqslant"
This extension is not compatible with the chrome extension octotree. The octotree provide a easy-to-navigate code tree and when I use octotree to switch between files, the math equations are not rendered.
hello,
pls update MathJax to 2.7.5. some latex unable to render.
For example, the equation on this very repo renders when viewing the root level, but if I actually click on README.md it's then not rendered on that page.
Would it be possible to add a settings page that allows additional domains to be added (like github.company-name.com)?
Some of my equations won't be rendered by MathJax for a very simple reason.
I have the following latex formula:
$$n (D(\alpha^+) - D(\alpha))
\geq s_i \underbrace{ \big [ \phi(-A_i^Tw) + \phi^*(\alpha_i) + w^T A_i \alpha_i \big ] }_{ \textrm{Fenchel gap}} + s_i \bigg ( \frac{\gamma(1-s_i)}{2} - \frac{s_i \|A_i\|^2_{D\rightarrow D'} }{2 \lambda n} \bigg ) \| \beta_i - \alpha_i \|^2_D$$
It first gets rendered by Github Markdown creating the following HTML code
<p>
$$n (D(\alpha^+) - D(\alpha)) \geq s_i \underbrace{ \big [ \phi(-A_i^Tw) + \phi^*(\alpha_i) + w^T A_i \alpha_i \big ] }
<em>
{ \textrm{Fenchel gap}} + s_i \bigg ( \frac{\gamma(1-s_i)}{2} - \frac{s_i |A_i|^2
</em>
{D\rightarrow D'} }{2 \lambda n} \bigg ) | \beta_i - \alpha_i |^2_D$$
</p>
MathJax is then unable to process it because the original code has been broken in two parts by the <em>
block. There are probably many more problems created by this separate processing of the markdown first and the latex code second. Any idea for a workaround?
When i'm using the cases environment, it just shows the raw equation snippet.
PS. This extension was suggested in this thread.
MathJax CDN shutting down on April 30, 2017
Missing or unrecognized delimiter for \left .
For example,
$$
\phi_2(x,y)=\left{
\begin{array}{11}
1 & \textrm{if x contains 'stock' and y is 'sport'}\
0 & \textrm{otherwise}
\end{array}
\right..
$$
The formula is not rendered in my Github, but it renders well locally.
It seems that the formula is not rendered when there are images inserted in the markdown documents.
I am trying to install the package from the Chrome Web Store, and I am getting the following error:
Package is invalid. Details: 'Could not load extension icon 'icon16.png'.'.
System: macOS High Serra 10.13.6
browser: Google Chrome Version 70.0.3538.77
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.