Parse mbox to extract math
Open, NormalPublic

Description

source:

\begin{equation}
\int_{\gamma} f(z)\,\rd z = 0 \mbox{ where $\gamma$ is the boundary of
  a triangle}
\end{equation}

translate to

<math display="block">\int_{\gamma} f(z)\,\mbox{d} z = 0 \mbox{ where $\gamma$ is the boundary of
a triangle}</math>

Ok, this last example also have the problem of havng a newline inside the curly braces

Here there are a couple of examples: https://en.tuttorotto.org/Course:Complex_Analysis_(Intermediate_Level)/Cauchy%27s_Theorem_and_its_Consequences/The_Fundamental_Theorem_of_Calculus_and_its_converse

Edit: Idea!
We can transform

\begin{equation}
\int_\gamma f = 0 \mbox{ for all closed curves $\gamma$ in $\Omega$ }
\end{equation}

to

\begin{equation}
\int_\gamma f = 0 \mbox{ for all closed curves } \gamma \mbox{ in } \Omega
\end{equation}

(please notice the spaces before and after the text inside the mboxs) during the preparsing phase. I know that this would require a clever parsing of the math environment, but it is a way to tackle this problem.

mapellidario assigned this task to davidev.
mapellidario triaged this task as Normal priority.
mapellidario updated the task description. (Show Details)
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
davidev reopened this task as Open.
davidev renamed this task from math inside text inside math to Parse mathbox to extract math.
davidev moved this task from Backlog to Parser on the WikiToLearn: TeXLa board.
davidev moved this task from Parser to Renderer on the WikiToLearn: TeXLa board.
davidev added a subscriber: davidev.
davidev renamed this task from Parse mathbox to extract math to Parse mbox to extract math.
davidev added a subscriber: ruphy.
davidev removed davidev as the assignee of this task.Feb 24 2017, 11:20 AM