

How we ported LaTeX to the iPad - steeleduncan
http://texpadapp.com/2012/09/19/latex-ported-to-ipad/

======
khaled
The most clueless TeX related piece I have read since their previous one. For
example, kpathsea is a library that TeX engines call, so no forking is done to
“grab search paths from the Kpathsea system”. And the bright future for C
implementation didn't happen when TeX WEB code was hand converted into much
more readable C code 8 years ago (<http://metatex.org/>), not to mention the
existence of an actively maintained, extended TeX engine written in C
(<http://www.luatex.org/>), wait, this is GPL “encumbered” so it does not
count. Did I mention that XeTeX does not “skip the DVI step” at all, but it
actually _does_ fork an external binary to convert its ‘extended’ DVI into
PDF.

~~~
anonymouz
I also loved the GPL ``encumbered'' bit. But they are trying to sell a (binary
only) app for iOS, so I can see how it's inconvenient to them if other people
don't give them all rights to their code.

TeX, while maybe not pretty, has stood the test of time remarkably well. I
find it somewhat low of the article to bash the technology it uses (WEB, DVI)
just because they are not the newest and hippest.

~~~
rmc
_I also loved the GPL ``encumbered'' bit. But they are trying to sell a
(binary only) app for iOS, so I can see how it's inconvenient to them if other
people don't give them all rights to their code._

As far as I know, Apple won't allow GPL software on iPad/iOS, they ban it on
the App Store. So it isn't this company trying to get around the GPL, it's
Apple.

~~~
geoffpado
Apple doesn't care. GPL backers like the FSF are who enforce GPL'd software
not being in the App Store. They feel that the GPL is incompatible with
Apple's distribution mechanisms, since it's impossible to "distribute" a
modified version of the app to iOS devices without going through the App
Store. But if a group decided to upload their GPL app, Apple isn't going to
check, and won't kick the app out of the store on GPL grounds.

The VLC example mentioned below in fact _supports_ this: Apple was absolutely
fine with it being in the store until Rémi Denis-Courmont filed a copyright
violation with Apple _asking_ them to take down the version that had been
posted there. Apple didn't take initiative to remove it themselves.

~~~
stcredzero
_> GPL backers like the FSF are who enforce GPL'd software not being in the
App Store. They feel that the GPL is incompatible with Apple's distribution
mechanisms, since it's impossible to "distribute" a modified version of the
app to iOS devices without going through the App Store. But if a group decided
to upload their GPL app, Apple isn't going to check, and won't kick the app
out of the store on GPL grounds._

What if someone sold an iOS app that could be downloaded from the iTunes App
Store that "contained" the source code? (Actually, it would detect whichever
app started it and would download the source on demand.) Combine this with a
free app and service that lets people use on-air provisioning to get modified
versions of apps?

~~~
rmc
You don't need to include the source code to be in compliance with the GPL.
You can easily have it downloadable from your website. You only need to
provide it for about 3 years (IIRC). You can just have a note in your 'About'
screen: "This is GPL software, go to <http://www.example.com> to get the
source". That should suffice.

------
timtadh
So where is the source? Also I am fuzzy on whether or not this is a license
violation:

[TeX] This program is copyright (C) 1982 by D. E. Knuth; all rights are
reserved. Copying of this file is authorized only if (1) you are D. E. Knuth,
or if (2) you make absolutely no changes to your copy. (The WEB system
provides for alterations via an auxiliary file; the master file should stay
intact.) See Appendix H of the WEB manual for hints on how to install this
program. And see Appendix A of the TRIP manual for details about how to
validate it. TeX is a trademark of the American Mathematical Society.

I know they are altering the translation not the WEB source but that is still
the Tex program.

~~~
khaled
AFAIK, the only requirement to comply with TeX license is to not name a the
modified program TeX. This wouldn’t be the first proprietary version of TeX.

------
kibwen
Very interesting, but does anyone here feel like this would be useful to them?
For example, in my limited experience with LaTeX I've also needed to generate
graphs (via Graphviz or R). Even if there existed apps for these, I'm under
the impression that the iPad has no user-accessible filesystem, nor allows
iPad apps to talk to each other. Please correct me if this is mistaken.

~~~
jdleesmiller
I can offer one data point: I run a browser-based LaTeX editor
(<http://www.writelatex.com>) and currently 2% of visits come from iPads. 6%
come from a mobile device of any kind. I'm not sure how many of those actually
try to do any serious writing, though.

------
daurnimator
You had me until "we have begun work on refactoring TeX's translated C sources
into C++"

~~~
stephen_g
Why? I know it's popular to not like C++ now but it really is far more
maintanable for a large project than C - best example is how GCC are moving to
C++ for the compiler source.

------
tomrod
I'd like to see a TeX -> MathML program come about. With web publishing, the
standard A4 page approach isn't optimal anymore; further, MathML just seems so
cool (even if it's still really in it's beta or alpha stages). I know TeX has
so many things you can do with it, but this article brings up a great point:
with people moving a large majority of their work to diminutive tablets, a 4GB
TeXLive distribution probably won't work.

~~~
anonymouz
The simple answer to that seems to be to _not_ move to working on tablets. For
LaTeX editing, I can't see any advantage that a tablet would offer over a
notebook, and there are a lot of disadvantages.

~~~
tomrod
An article that appeared at the same time on HN's front page points out some
of the benefits:

[http://yieldthought.com/post/31857050698/ipad-
linode-1-year-...](http://yieldthought.com/post/31857050698/ipad-
linode-1-year-later)

~~~
anonymouz
He does not compare the tablet with a notebook for the use case of interest
here, writing TeX documents (or something similar), and the disadvantes for
notebooks that he gives would seem to prevent you from working with a tablet
too (e.g., using a remote server for compilation will also help with the
battery life of a netbook, and you may even be able to swap the battery).

The major problem in writing TeX on a tablet seems to be the keyboard: It
takes away screen space (which is already hard to come by, since ideally you
would have the source and the compiled output displayed side-by-side), is much
less convenient to use than a physical keyboard, and (usually) makes it more
difficult to get to special characters which are really important for TeX: \,
{, }, [, ], and so on.

I can see how it could be usable for copy-editing, but for longer writing a
notebook beats a tablet any day.

------
jogloran
Previously: <http://vallettaventures.com/2012/08/27/tex-notebook/>

~~~
chj
Developer of TeX Notebook here, now TeX Writer(first native LaTeX compiler on
iPad).

That post is no longer true. I wrote the full story here:

<http://litchie.com/blog/?p=419>

------
Narretz
It's great they did it, knowing how frustrated they were in the last blog
post. That I don't really understand what's going on only makes the
achievement larger in my eyes. Would be awesome if this led to a faster tex
version that can be used by Desktop applications too, like Texmaker etc.

------
sitharus
I was almost going to buy that app, but it looks like their modified tex
engine isn't open source.

I'm not quite sure why this irks me so much. I'm not likely to mess with tex
source, but it'd be nice to share what was shared with you.

------
jedberg
I wanted to try the demo, but I'm not sure what to do with it. I loaded up my
resume, but since typesetting is disabled, what exactly am I "demoing" other
than an input field?

------
languagehacker
I really hope that this Bataan death march of porting LaTeX to the iPad is the
final word on whether or not literate programming is a worthwhile endeavor.

~~~
mturmon
It doesn't have to do with literate programming per se.

It has to do with a very widespread and powerful legacy system (with extreme
requirements for backwards-compatability and portability) that happened to be
written decades ago in, basically, Pascal.

Furthermore, the people doing this port don't seem to have total command of
the tex infrastructure. This has held them back.

For instance, they didn't know what kpathsea was until well after they started
their port ("As best we could tell kpathsea is a library to find fonts and
scripts in the sprawling TeX distribution...", from
[http://texpadapp.com/2011/12/10/price-of-amessy-latex-not-
fo...](http://texpadapp.com/2011/12/10/price-of-amessy-latex-not-for-ipad/)).

kpathsea is a basic library that anyone who has tweaked TeX configurations
would know about. It has a certain syntax for subdirectory searching that you
have to learn, as well as a utility command (kpsewhich) that you run quite a
lot to debug "file-not-found" problems.

