Fix eqnarray rendering
Open, NormalPublic

Description

This equation array

\begin{eqnarray}
|z-z_i| <\delta_i/2,\\
 |w-z_i| &=& |w-z+z-z_i| \nonumber\\
&\leq& |w-z| + |z-z_i| \nonumber \\
& <& \delta + \delta_i/2 \nonumber\\
& \leq& \delta_i/2 + \delta_i/2 \nonumber \\
&<& \delta_i.
\end{eqnarray}

is transformed to

\begin{align}I_n &=& \left|\int_{\partial \Delta_n} f(z)\,\mbox{d} z\right| \\
&= & 
\left|\int_{\partial \Delta_n} \left(f(z) - f(z_0) -
(z-z_0)f'(z_0)\right)\,\mbox{d} z\right| \\
&\leqslant & \len(\partial \Delta_n)\varepsilon\sup_{z \in \partial \Delta_n}|z-z_0|.\end{align}

but this is not the way of writing an align, since this would make the equations to be aligned on the right side of the page. The correct way of writing an align is:

\begin{align}I_n &= \left|\int_{\partial \Delta_n} f(z)\,\mbox{d} z\right| \\
&=  
\left|\int_{\partial \Delta_n} \left(f(z) - f(z_0) -
(z-z_0)f'(z_0)\right)\,\mbox{d} z\right| \\
&\leqslant \operatorname{length}(\partial \Delta_n)\varepsilon\sup_{z \in \partial \Delta_n}|z-z_0|.\end{align}

The solution is not that easy, it is not trivial to chose which & remove for having the correct the alignment.

To complete this task handle the eqnarray block type in MediaWikiRenderer.py separately from the align block.
You have to modify the math content checking that between every \\ there's only one &.

Be CAREFUL: you have to check that is & NOT \&

Please pull request your work.

mapellidario renamed this task from broken conversion frmo eqnarray to align to broken conversion from eqnarray to align.
mapellidario updated the task description. (Show Details)
mapellidario renamed this task from broken conversion from eqnarray to align to broken transformation from eqnarray to align.
ruphy edited projects, added Restricted Project; removed Restricted Project.Jan 10 2017, 2:15 PM
ruphy edited projects, added WikiToLearn: TeXLa; removed Restricted Project.Jan 10 2017, 2:31 PM

@mapellidario what about keeping only one & for each line?

davidev added a comment.EditedJan 17 2017, 11:37 PM

To complete this task handle the eqnarray block type in MediaWikiRenderer.py separately from the align block.
You have to modify the math content checking that between every \\ there's only one &.

Be CAREFUL: you have to check that is & NOT \&

davidev updated the task description. (Show Details)Jan 17 2017, 11:38 PM
davidev updated the task description. (Show Details)
davidev moved this task from Backlog to Texla on the WikiToLearn: Junior Jobs board.
davidev renamed this task from broken transformation from eqnarray to align to Fix eqnarray rendering.
davidev moved this task from Backlog to Renderer on the WikiToLearn: TeXLa board.
davidev removed davidev as the assignee of this task.Jan 17 2017, 11:42 PM
davidev updated the task description. (Show Details)
davidev added a subscriber: davidev.