Flatfish and (La)TeX

This is a “How to” for people that are tracking my GSoC project and in this post you will find steps to test the first prototype of my GSoC project. I hope that you like it and I will love to get any type of feedbacks.

Note

This blog post have some screenshots of my Flatfish running

  • OS version: 2.0.0.0-prerelease
  • Firmware revision: flatfish_20140519-1653
  • Hardware revision: flatfish
  • Platform version: 32.0a1
  • Build Identifier: 20140519171236
  • Git commit info: 2014-06-03 14:21:30 0f51c8fa

Requirements

  • Desktop/Laptop (I’m using a GNU/Linux distribution but shouldn’t be hard to use a machine running Windows or OS X).
  • Bash, Make, Git
  • Android SDK Tools (at least adb)
  • Device running Firefox OS (I’m using Flatfish but it should work with any other device) or Firefox OS Simulator

Note

If you will use a device running Firefox OS and you didn’t setup udev rules you will need to do it. For informations read configure the udev rule for your phone at MDN.

Note

If you will use Firefox OS Simulator please take a look at this tutorial that explain how udpate Gaia for Firefox OS Simulator.

Setup

You will need my clone of mozilla-b2g/gaia at GitHub and move to gsoc branch.

$ git clone https://github.com/r-gaia-cs/gaia.git
$ cd gaia
$ git checkout gsoc

Note

If you already have mozilla-b2g/gaia you can add my clone as a remote repository.

$ cd gaia
$ git remote add raniere https://github.com/r-gaia-cs/gaia.git
$ git fetch raniere
$ git checkout raniere/gsoc

Flashing

Connect your device in one of the USB ports of your desktop/laptop and check if adb recognize it.

$ adb devices
List of devices attached
FLATFISH_123456 device

Warning

The next step will remove all the user data from the device. If you have important data in your device you will need to backup it first.

With the device connect and recognize:

$ GAIA_KEYBOARD_LAYOUTS=en,math,trig,greek PRODUCTION=1 NOFTU=1 REMOTE_DEBUGER=1 GAIA_DEVICE_TYPE=tablet make reset-gaia

Note

If you are using a phone device:

$ GAIA_KEYBOARD_LAYOUTS=en,math,trig,greek PRODUCTION=1 NOFTU=1 REMOTE_DEBUGER=1 make reset-gaia

Note

If you are using Firefox OS Simulator:

$ GAIA_KEYBOARD_LAYOUTS=en,math,trig,greek make

Your device will reboot.

Screenshot of homescren.

Enable Keyboards

Now we need to enable the keyboards. Go to “Settings” -> “Keyboards” -> “Selected keyboards” -> “Add more keyboards”.

Screenshot of "Settings".

Screenshot of Settings.

Screenshot of "Keyboards".

Screenshot of “Keyboards”.

Screenshot of "Selected keyboars".

Screenshot of “Selected keyboars”.

Screenshot of "Add more keyboards".

Screenshot of “Add more keyboards”.

Select all the keyboards available.

Screenshot of "Add more keyboards" with all keyboards selected.

Screenshot of “Add more keyboards” with all keyboards selected.

Go back to “Selected keyboards”.

Screenshot of "Selected keyboards" after add some keyboards.

Screenshot of “Selected keyboards” after add some keyboards.

Go to Home Screen.

Testing

You can test the keyboard with any app that use the keyboard. I will be using http://r-gaia-cs.github.io/TeXEditor/ from the web browser.

Open the web browser.

Screenshot of Web Browser app.

Screenshot of Web Browser app.

Go to http://r-gaia-cs.github.io/TeXEditor/.

Screenshot of homescreen of TeX Editor app.

Screenshot of homescreen of TeX Editor app.

Type some text. To access the math keyboards use the IME selector key.

Screenshot of TeX Editor app with some text.

Screenshot of TeX Editor app with some text.

Screenshot of TeX Editor app with Greek keyboard.

Screenshot of TeX Editor app with Greek keyboard.

Screenshot of TeX Editor app after type "A".

Screenshot of TeX Editor app after type “A”.

Screenshot of TeX Editor app with the Math keyboard.

Screenshot of TeX Editor app with the Math keyboard.

Screenshot of TeX Editor app after type the superscript key.

Screenshot of TeX Editor app after type the superscript key.

Screenshot of TeX Editor app after close LaTeX math environment.

Screenshot of TeX Editor app after close LaTeX math environment.

When you end to input your text you can preview it using the option at the top right of the screen.

Screenshot of TeX Editor app with the preview of source code typed.

Screenshot of TeX Editor app with the preview of source code typed.

Still need to be done

The keyboards still need many improvements like

  • Improve switch,
  • Improve layout,
  • Improve style.

I will write more about it in another blog post.