Support for “math” added

It was a rainy day today but luckily Norbert Jaspers got in touch with me last Friday.

Norbert added support for mathematical and chemical symbols to Wiki2Touch. Wiki2Touch is an offline Wikipedia reader for the Apple iPhone/iPod Touch.

Background: If you’re editing articles in Wikipedia and like some symbols you add TeX commands into a <math>-tag. This is then rendered by the Wikipedia software using TeX. The result is finally displayed as an image. TeX is great in producing nice formulas or other special symbols.

Norbert did the add-on without any changes to the current version. He exchanged every <math>-section inside an article with a link to a picture. He let TeX created the proper image from the original tag contents. This picture is added with a certain id to the image database. This works quite well. But you had to use a modified “articles.bin” database.

Norbert told me that he used some code from Erik Zachte. So Erik should be credited, too.

Wiki2Touch is now modified and the ids of the math sections are now calculated on the fly, the sections are removed and the proper images are inserted (if installed of course). Works like a charm:

Wiki2Touch featuring TeX rendered symbols

Wiki2Touch featuring TeX rendered symbols

Because the background of the images currently isn’t transparent you can easily spot what is a image and what is text.

A couple of things still have to get changed. But math support is now added to Wiki2Touch. While on that subject: I think there’s finally enough stuff together for a new version now. So stay tuned.

Thanks for all the support!

Tom

25 Responses to “Support for “math” added”

  1. Norman Says:

    Hi Mr, Haukap ;)

    I’m no idiot i guess but the whole process isn’t explained very well.

    On your google page you explain how to use the “Installation on Windows / The wiki2touch transfer tool”.

    But the mac executables just don’t do anything. I guess because i don’t have a wikipedia file yet. But i don’t know where to get them without that windows app.

    You see, it’s kinda complicated :D

    could you give a step-by-step instruction for mac os X users AND add a textfile to the mac download that explains what the execuatables do? I just clicked them but they dont explain themselves

  2. Norman Says:

    i was speaking about the process of isntalling a working version of your whole application, not just the image getter..

  3. Tom Says:

    Norman-

    there is no GUI application to build the necessary “articles.bin” files. And if you click on a command line application it looks like that nothing happens.

    As there is no handy GUI application you have to have a bit experience using the command line (the Terminal) of your Mac.

    There is already a “step-by-step” list inside the help file of Wiki2Touch. It’s reachable from the home screen by selecting the “Need help?” link below the globe. Here is the part of the list which deals with Mac OS X.

    Exchange “xx” with “en” for the English oder “de” for the German edition.

    Installation step by step:

    # Download the file “Wiki2TouchUtils_OSX.zip” from [http://www.wiki2touch.com http://www.wiki2touch.com]

    # Unzip it if this is not automatically done. On 10.5 you will find the result in your “Downloads” folder. Older OS X Versions save the file to the desktop.

    # Download the appropriate database from Wikipedia. The link is http://download.wikimedia.org/xxwiki/latest. The file you need is named “xxwiki-latest-pages-articles.xml.bz2″. Both in the folder name and the filename replace the “xx” with the desired language code you want to use.

    # Put the downloaded file into the same folder as the contents of the tool package

    # Start a Terminal session (from Application/Utilities), navigate to the folder with the files and enter
    ./indexer xxwiki-latest-pages-articles.xml.bz2
    If you only enter
    ./indexer
    you see some help about the available options.

    # After the indexer has finished you find a file called “articles.bin” in the folder. Copy this file to “/private/var/mobile/media/Wikipedia/xx” (firmware since 1.1.3) or “/private/var/root/media/Wikipedia/xx” (firmware 1.1.2 and below).

    # Stop and restart the Wiki2Touch server on your device

    -Tom

  4. Thomas Says:

    Hi Tom,

    it’s been quite a while since this posting and I’m wondering if we can hope for a new version soon or if you are preparing for 2.0 and the Appstore?

    Thomas

  5. JoPhone Says:

    Hey Tom,

    thanks again for the wonderful app, as my predecessor I would also like to know if there will be a new release anytime soon? :)

    Thanks,

    Jonas

  6. Tom Says:

    Thomas + Jonas,

    thanks for the kind words. It’s become a little bit calm around the project. Maybe because it’s working and helpfull.

    I awfully busy with my job today, but there is a good chance that I’m able to release a new version in this week. I myself want to have it out at least on the next weekend.

    Norbert already prepared a lot of math packages. With transparent images in the right size. They are looking great.

    The one I’m using is stable and there is no reason not to release it. But I have to compile all the support files, the installer script, the documentation and must check it. That will take a while.

    For 2.0: I have a version for 2.0 running on the emulator. The problem is to get the articles to the file system. The solutions I have will make Apple not very happy and I suppose they will not put it onto their store.

    So let’s see what happens with 2.0 anyway. Maybe a jailbreak, maybe not.

    Regards-

    Tom

  7. JoPhone Says:

    Tom,

    sounds cool, thanks for your answer & the great work!

    Cheers, Jonas

  8. michal Says:

    Hello!

    How i can add a math support for my wiki2touch?
    I have a articles.bin and images.bin.

  9. iain Says:

    Hi Tom
    Really nice job on this app. If you do want to put it on the iTunes App store, I will pay the $100 fee for you so everyone can enjoy it. Still need to figure out how to get the data files onto the iPhone though :)
    Danke
    Iain

  10. Thomas Says:

    Hi Tom,
    I just discovered “File Magnet” in the Appstore. It transfers files via WLAN from the Mac and then displays them on the iPhone. If they can do it, can you too?
    I would be really glad if you could spare some time for Wiki2touch again…

    Thomas

  11. Tomas Says:

    I would really like a version for 2.0 because I miss my Wiki2touch.
    Could you please make that version downloadable. I can always ssh to the phone.
    Thanks for all the great work.

  12. Tom1234 Says:

    why’s everbodys name here thomas or tom - very confusing ;-)
    are there any news for wiki2touch for the app store? wiki2touch has become the most used app on my iphone. i don’t wanna upgrade to 2.0 until there is wiki for the new firmware.
    please let us know about the future plan :-)
    thanx for doing such great job.

    Tom1234

  13. Tom Says:

    Hi Guys!

    Just another Tom, this time it me, the author of Wiki2Touch. I was not able to move to 2.0 in the last two days so I can’t tell if Wiki2Touch works on 2.0 or not.

    Well, the AppStore runs quite well and jailbroken iPhone might become a lot more seldom than these days. So I’m going to convert Wiki2Touch to an AppStore application. It’s not that quick and easy but sure possible.

    When? Hard to say. I already have the development suite from Apple for a long time. Money is also not the problem.

    But for know I’m on vacation for the next couple of days.

    -Tom

  14. iain Says:

    Tom

    Thanks for the update. I stand by my pledge for the app store fee. I believe that file magnet etc use webdav over wifi which would apear to be the easiest way to copy the files from your computer to iphone - it would take forever though and would probably have to be plugged into the mains power :)
    Anyway, enjoy your vacation!

  15. tdc Says:

    I would assume that Wiki2Touch would breach Apple’s rules regards to the sandbox and filesize etc?

    In anycase, the recent Pwnage app has rendered V2.0 well and truly jailbroken, so Wiki2Touch can now be reinstated as one of the best apps for the iPhone.

  16. Achim Says:

    Although everybody seems to rush to 2.0 now, it would be wonderful to have math support for 1.1.4 as well. If the package is already running, could you just make it available, Tom? Thanks.

  17. leonardo Says:

    does wiki2touch work on iphone 2.0?

  18. Khan Says:

    Hi Tom!
    Very useful app. you have, and i’m also one of those wiki addicts, use wiki almost everyday! and ofcourse i also would love to see this app running on FW 2.0. Good luck on that, and have a nice vacation! ;)

  19. Philip Says:

    I really love your work Tom and now that the jailbreak is out and working I know that everyone wants this app on 2.0.

    It would be great to here from you!

    I would do everything to see this app running on my iPod Touch.

    Please awnser and tell us what’s it all about, wether you will continue developping this app or not.

    Take care,

    Philip

  20. Thestral Says:

    Tom, China miss you too.
    :)
    Many Chinese enjoy Wiki2Touch.
    We can’t visit Chineses Wikipedia without proxy, then Wiki2Touch become a wonderful solution to it on iPhone/iPod touch.

    Your Google Code has been so quiet after 0.65, which scared me.
    But finally I find your blog, LOL.
    Please show a more visible link to your blog on Google Code, to calm down scared people like me.

    Having seen the screenshot here[http://haukap.net/2008/04/15/wiki2touch-listed-as-a-community-source-ipod-touch-fans/], I’m glad to see you got “a little bit crazy” about it.
    It looks nice to Chinese too.

    Good luck, Tom.
    Math support and “black menu” and language chooser are great!
    We all are expecting the new version.
    :D

  21. zm8 Says:

    Hi, everyone.

    I manage to build wikisrvd, the backend, on my 2.0 iPod touch.

    Please go to http://wiki2touch.ipodhelp.de/viewtopic.php?pid=668 and check out.

  22. Philip Says:

    I have already seen this but I think it means you’ll have to start the backend manually everytime.

    Anyway I thank you for your hard work zm8! You are great.

    But will you try to port the frontend too?

  23. zm8 Says:

    Hi, Philip,

    You can write a plist into LaunchDaemon directory.

    And then another few lines for BossPrefs.

    Details in the forum thread above.

  24. Achim Says:

    I’m really, really longing for the math support you showed in the screenshot above. So, PLEASE, give us an updated version, Tom….

Leave a Reply