# Extension:VisualEditor/Mathematical equations plugin

## Name and contact information

Name
Jiabao Wu
Email
jiabao.foss@gmail.com
Timezone
Canberra, Australia (UTC/GMT +10 hours)
Typical working hours
1pm-5pm, 8pm-12am
IRC or IM networks/handle(s)
jiabao on freenode

## Synopsis

The discussions at the wikitech-l mailing list

### What it means to accomplish?

Extend the mathematical functonality of VisualEditor.

Step 1 Allow users insert a new equation in the VisualEditor, with a simple interface like Aloha Editor. Users type in latex code in math editing box, and it displays on the VisualEditor sheet.

Step 2 Create a GUI of a list of special symbols and functions. Allow users select functions on the list and generate the latex code in the box.

Step 3 Allow users to create mathematical equations similar to the way they would in Google Docs. Google has already provided a good quality design for editing a document within a web browser. This will also help users who are familiar with Google Docs form equations for wikimedia.Try it in Google Drive Document or read Mathematical Equations - Google Drive Helps

### How it will benefit MediaWiki or Wikimedia projects such as Wikipedia?

Step 1 Allows users create and edit math equation in VisualEditor rather than swapping to "Edit Source".

Step 2 Helps the users with little LaTeX experience to create equations.

Step 3 Allows users with no LaTeX or Wikitext write and edit equations.

This project will unlock editing of existing equations when using VisualEditor. This will make changing equations much more understandable for people who mostly use VisualEditor.

## Deliverables

### Required

The main deliverable will be a plugin for VisualEditor. This plugin is broken down into three steps, two of which will be delivered at the end of the GSoC period.

Step 1 Will create deliver functionality to VisualEditor similar to that of Aloha Editor. It will use a simple interaction between the GUI and the document as shown below:

Step 1 Design Prototype.

Step 2 Will create an extension to the GUI of step one to help the user in creating equations.

### Optional

If time permits or after GSoC is completed.

Step 3 Will completely change the GUI to no longer display the source code to the user and instead visually edit the equations. This will require a more complex interaction modeled below.

The step 3 prototype showing the plugin architecture.

## Schedule

Envisioning Phase (4 Weeks, April 29 - May 26)

• Remain in constant touch with my mentor(s) and the community.
• To familiarize myself with MediaWiki architecture and development environment
• Browse developer docs and class reference
• Fix annoying little bugs in the area of math and visual editor

Community Bonding Period (3 Weeks, May 27 - June 16)

• Further discussion with my mentor(s) and the community about the prototype and its implementation.
• Early Start of Coding
• Investigation on making plugin for VisualEditor
• Create a dummy modules for development phase

Development Phase (9 Weeks, June 17 - August 18)

• Step 1 (6 Weeks, June 17 - July 28)
• Hook into parser
• Make node handler
• Make it very robust
• Code review continuously
• Add functionality to node handler
• Show GUI containing source
• Update document when the text-box is edited
• Step 2 (3 Week, July 29 - August 18)
• Make stylish symbol and function buttons to GUI
• Add the functionality to the buttons

Deploying Phase (4 Weeks August 19 - September 15)

• Pre-deploy Code review:
• Conduct code review by myself, then mentor(s)
• Inact information gained from code reviews
• Deploying:
• Merging with trunk
• Integration
• Testing:
• Further unit and integration testing
• Conduct several round of testing with real-world users who has no wikitext experience
• Documentation:
• Write approach, program and function descriptions.
• Document deployment and testing

Pencil Down

• September 16: Soft pencil down - Leave a week for final polish.
• September 23: Firm 'pencils down' for GSoC
• September 27: Begin submitting required code samples to Google
• October 1: Continue to work on the project part-time.

My name is Jiabao Wu, I am a postgraduate student at the Australian National University. I graduated with Bachelor of Information Technology Studies at the ANU in December 2012, with a double major of Software Development and IT in New Media Arts.

I am currently studying the course Free and Open Source Software Development (FOSSD) offerred by Andrew Tridgell. This course boosted my huge enthusiasm in contributing to the FOSS community and the software I use. I picked MediaWiki for my FOSSD work as well as my GSoC project proposal. MediaWiki has a very friendly and well-organised community, it also provides so much value to the world. This allows me to start the investigation and contribution to MediaWiki immediately as a part of university work. I will try to contribute patches, documentation, and maybe translation. I will focus mostly in the area of VisualEditor and the mathematical markup capabilties of Wikitext and MathJax. I think that this can help to build my understanding of the project earlier, which can help produce a high quality product at the completion of GSoC.

Lastly, I promise to give minimum 40 hours per week for my work. No other obligations interfere with this throughout the GSoC period. Please let me know if any part of my proposal is not clear, or suggestions on how I can improve my project proposal.

## Participation

#### How you plan to communicate progress?

• IRC channel: I plan to IRC open and reply as soon as possible
• Mailing list: I will read the Wikitech-l mailing list everyday
• Email: I will make several check points (within 24 hours) for reading emails and replying as soon as possible.
• Planning: I will maintain both a weekly to-do list and daily to-do list. If a daily to-do list cannot be completed, I will re-plan and estimate to be able commit more personal hours to finish it.
• Reflection: I will maintain a reflective blog throughout the project. I will write an entry each week on how I feel about the project, my progress and things that could of been improved.
• Reporting: I will report the progress I made and the follow-up planning to my mentor as a part of the conversation/email. Depending on the mentor I would like to make these reports at fixed intervals as a check point task for myself.

#### How and where you plan to ask for help?

• Solve by myself: Read documentation, search on-line, etc.
• Seek helps from the community: Ask questions on IRC, mailing list and mentors
• Seek helps from outside the community: Lecturers, skilled friends

## Past open source experience

As mentioned before, I am doing a FOSSD course at uni. I studied several open source projects and did a FOSSD Presentation about Inkscapeincluding its history, governance and culture. I sent two patches to Inkscape fixing its default window size being too small, and preference window size being too small.

## Any other info

Step 2: This step will include the following symbol and operator insertions:

Symbols
Greek Letters ${\displaystyle \alpha \beta \gamma \delta \epsilon \varepsilon \zeta \eta \theta \vartheta \iota \kappa \lambda \mu \nu \xi \pi \varpi \rho \varrho \sigma \varsigma \tau \upsilon \phi \varphi \chi \psi \omega \Gamma \Delta \Theta \Lambda \Xi \Pi \Sigma \Upsilon \Phi \Psi \Omega }$
General Operators ${\displaystyle \times \div \cdot \pm \mp \ast \star \circ \bullet \oplus \ominus \oslash \otimes \odot \dagger \ddagger \vee \wedge \cap \cup \aleph \Re \Im \top \bot \infty \partial \forall \exists \neg \angle \triangle \diamond }$
Comparison and Inclusion ${\displaystyle \leq \geq \prec \succ \preceq \succeq \ll \gg \equiv \sim \simeq \asymp \approx \neq \subset \supset \subseteq \supseteq \in \ni \notin }$
Arrows ${\displaystyle \leftarrow \rightarrow \leftrightarrow \Leftarrow \Rightarrow \Leftrightarrow \uparrow \downarrow \updownarrow \Uparrow \Downarrow \Updownarrow }$
Equations
Operators with Variables ${\displaystyle {\frac {a}{b}}\;\sum \;{\sqrt {x}}\;{\sqrt[{n}]{x}}\;x_{b}^{a}\;x^{a}\;x_{b}\;|x|\;{\overline {x}}\;{\widehat {x}}\;{\tilde {x}}\;\bigcap _{a}^{b}\;\bigcup _{a}^{b}\;\prod _{a}^{b}\;\coprod _{a}^{b}\;\int _{a}^{b}\;\oint _{a}^{b}}$

Example of how it will be used:

• users click "new function"
• users click the function ${\displaystyle {\sqrt[{n}]{x}}}$
• add "\sqrt[n]{x}" to the latex math code editing box
• display ${\displaystyle {\sqrt[{n}]{x}}}$ on the sheet
• users can change the values n and x to the values they want