Skip to content

[CommonHTML] equation label not properly aligned in large arrays with many labels #244

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

Closed
pkra opened this issue Jun 10, 2016 · 5 comments
Closed

Comments

@pkra
Copy link
Contributor

pkra commented Jun 10, 2016

This is a continuation from mathjax/MathJax#1500, I'm afraid.

The minimal example I had posted seems to be fixed in both MathJax and mathjax-node (where I had run into this). However, a more complex example (the original one where I encountered this) seems fixed in the browser, but still broken in mathjax-node.

Below is the (pretty messy) example.

\begin{eqnarray}
  && \mathfrak{d}\mathfrak{d}' =\delta _{\mathfrak{d}, \mathfrak{d}'} \mathfrak{d}. \tag{57}\cssId{i}{}{}\\
  && \mathfrak{d}' E_n \mathfrak{d}=0, \quad {\mathit{if}}\ {\mathrm{sgn}}(\mathfrak{d}') =\pm , \tag{58}\cssId{ii}{}{}\\
 && \mathfrak{d}' F_n \mathfrak{d}=0, \quad {\mathit{if}}\ {\mathrm{sgn}}(\mathfrak{d}) = \pm , \\
 && \mathfrak{d}E_h [(\mathfrak{d}- E^{\theta }_{h, h} + E^{\theta }_{h+1,h+1}, {\mathrm{sgn}}(\mathfrak{d}) ) ] = E_h [(\mathfrak{d}- E^{\theta }_{h, h} + E^{\theta }_{h+1,h+1},{\mathrm{sgn}}(\mathfrak{d}))], \\
 && \mathfrak{d}F_h [(\mathfrak{d}+ E^{\theta }_{h, h} - E^{\theta }_{h+1,h+1}, {\mathrm{sgn}}(\mathfrak{d}))]\\
&&\qquad \qquad \qquad = F_h [(\mathfrak{d}+ E^{\theta }_{h, h} - E^{\theta }_{h+1,h+1}, {\mathrm{sgn}}(\mathfrak{d}))],\quad {\mathit{if}} \ h\neq n, \\
  && F_nE_n \mathfrak{d}- \mathfrak{d}' F_n E_n \mathfrak{d}= [\lambda _n]_v \mathfrak{d}, \quad \quad \quad \hspace{58pt}\! {\mathit{if}} \ \lambda =\lambda ', \epsilon = - \epsilon ' \neq 0, \tag{59}\cssId{iii}{}{}\\
 && \mathfrak{d}' F_n E_n \mathfrak{d}=0, \quad \mathfrak{d}F_n E_n \mathfrak{d}' =0, \quad \quad \hspace{56pt} \ {\mathit{if}} \ {\mathrm{sgn}}(\mathfrak{d}) =0, {\mathrm{sgn}}(\mathfrak{d}') =\pm , \\
 \ && (E_iF_j-F_jE_i) \mathfrak{d}=0, \quad \hspace{107pt} \ {\mathit{if}} \ i\neq j,\tag{60}\cssId{iv}{}{}\\
 && (E_iF_i-F_iE_i) \mathfrak{d}= [\lambda _{i+1}- \lambda _i]_v \mathfrak{d}, \quad \hspace{60pt} {\mathit{if}}\ i\neq n, \\
 \ && (E_iE_iE_j- [2]_v E_iE_jE_i+E_jE_iE_i) \mathfrak{d}=0,\quad \hspace{25pt}{\mathit{if}}\ |i-j|=1,\tag{61}\cssId{v}{}{}\\
 && (F_iF_iF_j- [2]_v F_iF_jF_i+F_jF_iF_i) \mathfrak{d}=0,\quad \quad \hspace{23pt}{\mathit{if}}\ |i-j|=1, \\
 \ && (E_iE_j-E_jE_i) \mathfrak{d}= 0, \quad (F_iF_j-F_jF_i)\mathfrak{d}=0, \quad \ \ {\mathit{if}}\ |i-j|&1,\tag{62}\cssId{vi}{}{}\\
 \ &&(E^2_nF_n+F_nE_n^2) \mathfrak{d}= [2]_v (E_nF_nE_n-E_n (v^{\lambda _{n+1} - \lambda _n+1} +v^{- \lambda _{n+1} +\lambda _n-1} )) \mathfrak{d},\tag{63}\cssId{vii}{}{}\\
 && (F_n^2E_n+E_nF_n^2) \mathfrak{d}= [2]_v (F_nE_nF_n- (v^{\lambda _{n+1}-\lambda _n-2} +v^{-\lambda _{n+1} + \lambda _n+2} ) F_n) \mathfrak{d}. 
\end{eqnarray}
@pkra
Copy link
Contributor Author

pkra commented Jun 10, 2016

Oh, I need to add two things.

a) I see the problem only when setting displayAlign and TagSide left.
b) the result then shifts a lot under browser zoom.

@dpvc
Copy link
Member

dpvc commented Jun 10, 2016

Looks like the padding is getting lost in jsdom. Apparently the patch the I made for padding neglected to handle pixels without the px (e.g., node.style.padding = "1em 0"), which is legal, but deprecated.

I have patched my patch in the issue244 branch. I will need to submit a PR for CSSStyleDeclaration as well. Sigh.

@pkra
Copy link
Contributor Author

pkra commented Jun 13, 2016

Thanks, @dpvc!

@pkra pkra added this to the What comes next -- towards v1.0 milestone Jun 13, 2016
pkra added a commit that referenced this issue Jun 21, 2016
Make sure padding and margin can accept 0 to mean 0px. fixes #244
@pkra
Copy link
Contributor Author

pkra commented Jun 24, 2016

Looks like this is now even more fixed upstream. Yay!

@pkra
Copy link
Contributor Author

pkra commented Sep 13, 2016

With MathJax 2.7-beta, the upstream fixes are now official and I think we can close this.

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

No branches or pull requests

2 participants