New Dropbox sync for TeX Writer

Once I worked on a project, I spotted a code section like this:

[text replaceOccurrencesOfString:@"&" withString:@"&"
    options:NSLiteralSearch range:NSMakeRange(0, text.length)];
[text replaceOccurrencesOfString:@"<" withString:@"&lt;"
    options:NSLiteralSearch range:NSMakeRange(0, text.length)];
[text replaceOccurrencesOfString:@">" withString:@"&gt;"
    options:NSLiteralSearch range:NSMakeRange(0, text.length)];

Then I thought — without much thinking — that we should get rid of repetitious code, so it became

NSRange fullRange = NSMakeRange(0, text.length);
[text replaceOccurrencesOfString:@"&" withString:@"&amp;"
    options:NSLiteralSearch range:fullRange];
[text replaceOccurrencesOfString:@"<" withString:@"&lt;"
    options:NSLiteralSearch range:fullRange];
[text replaceOccurrencesOfString:@">" withString:@"&gt;"
    options:NSLiteralSearch range:fullRange];

Of course this is a horrible mistake, because the length of text changes over  time. It’s basically like saying because x + x = 2x, so that 1 + 1 = 21. Carelessly refactoring working code is both dangerous and expensive, let alone code rewriting.

I was fully aware of the cost, at the beginning of April, when I decided to rewrite Dropbox sync code in TeX Writer from scratch. It’s a tough decision to make, because you had to throw away all the tests and fixes that went along with the original code. However, two negative reviews in the App Store (they lost changes after sync) helped me make the final decision. We need a solution that will never overwrite people’s work no matter what happens, and the previous solution just isn’t strong enough.

Today, the rewrite is finished and we have done various tests, especially when conflict happens. We hope to release it soon, but at the same time, if you want to help beta test, please let us know!

 

Posted in General | Leave a comment

TeX Writer and TeX Equation Release Notes

Recently we have updated both TeX Writer and TeX Equation. Now they share a same compilation core. This will make our future update much easier.

For TeX Writer, we add a spell checker. You can enable it from TeX Writer settings by selecting a spell dictionary. Instead of putting all dictionaries in the app, we have a list of dictionaries on the cloud so you can pick the ones you need and install in your device. In this way, we can keep the app package as small as possible. The philosophy behind is that the users should not be forced to download anything he/she doesn’t need.

The TeX editor inside TeX Writer also highlights formulas between a pair of $, such as $x_1$. By default it is shown in red, but you can use the following command in twinit.l to redefine:

(set-string-color <red> <green> <blue> 1)

red/green/blue are numbers in range 0 to 1.0.

TeX Equation now offers three ways to get the equation images out:

  1. Copy as PDF. Most recommended way. Keeps high resolution.
  2. Copy as PNG. Retina resolution, transparent background.
  3. Export to album as JPEG. Retina resolution, no transparency. Too bad iOS doesn’t offer a way to save PNG to album.
Posted in General | 7 Comments

Upcoming: TeX Writer as a Web App

It’s time to bring TeX Writer to browser, so that users can edit their documents even without their tablets around.  It will be free for editing only. If you want to compile it online, we’ll provide paid online compilation (monthly/annually subscription).

All files are still saved in your Dropbox folder.We won’t save a copy of your files on our server.  For compilation purpose, the server will download necessary files. These files will be deleted after a short period (no more than a few hours).

If everything goes well, the launch time will be  early January 2014. Please let us know if you are interested. We may be able to offer limited time PRO accounts (with online compiler, online pdf review) for early users.

Update: web app is available now! https://texwriter.net

Posted in General | Leave a comment

TeX Writer for Android

Today, TeX Writer is available for Android Tablets! Editing and compiling, done in one place.

Get it on Google Play

Like the iOS version, we have a special key bar that includes the most frequently used keys and two beloved cursor movement keys.

The user interface is clutter free with minimal buttons.  No settings to worry about. For the editor, we only highlight necessary commands that are worth your attention.  Android’s monospace font works extremely well for text editing.

device-2013-06-08-171225

 

 

Posted in General | 2 Comments

Using an iPad Keyboard for Math LaTeX


From CofC Math Department’s Stephane Lafortune
:

Using keyboard with TeX Writer isn’t something new, but this one looks better than Apple’s!

Posted in General | Leave a comment