Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

TeX for Android

1,379 views
Skip to first unread message

Peter Flynn

unread,
Jun 17, 2012, 3:46:24 PM6/17/12
to
Is anyone working on porting TeX (and an editor) to Android ICS?
Or is there a physical restriction in the OS (clearly there is a screen
limitation in some of the hardware).

///Peter

Boris Veytsman

unread,
Jun 17, 2012, 5:26:05 PM6/17/12
to Peter Flynn, maqiyua...@vip.qq.com
PF> From: Peter Flynn <pe...@silmaril.ie>
PF> Date: Sun, 17 Jun 2012 20:46:24 +0100

PF> Is anyone working on porting TeX (and an editor) to Android ICS?
PF> Or is there a physical restriction in the OS (clearly there is a screen
PF> limitation in some of the hardware).

There are two ways to do this, and both are being actively developed.

1. It is possible to create a Linux environment in Android, and use
standard TeXLive in it. I did this, and will present a paper in
TUG'12 about this. Also, TeXlive includes binaries for this (in
the unofficial part in TL11, and the official part starting TL12).

2. Ma QiYuan works on porting TeXLive to Android natively. It mostly
works (the problems are with Unicode libraries, which he currently
works upon). The results look impressive. I hope he publishes a
paper in TUGboat; his address is maqiyua...@vip.qq.com

--
Good luck

-Boris

According to my best recollection, I don't remember.
-- Vincent "Jimmy Blue Eyes" Alo

Boris Veytsman

unread,
Jun 17, 2012, 5:29:45 PM6/17/12
to Peter Flynn, maqiyua...@vip.qq.com, Boris Veytsman
BV> From: Boris Veytsman <bor...@lk.net>
BV> Date: 17 Jun 2012 17:26:05 -0400


BV> 2. Ma QiYuan works on porting TeXLive to Android natively. It mostly
BV> works (the problems are with Unicode libraries, which he currently
BV> works upon). The results look impressive. I hope he publishes a
BV> paper in TUGboat; his address is maqiyua...@vip.qq.com


By the way, here is the web site of this project:
http://code.google.com/p/texlive-for-android/

--
Good luck

-Boris

On the subject of C program indentation:
"In My Egotistical Opinion, most people's C programs should be
indented six feet downward and covered with dirt."
-- Blair P. Houghton

Peter Flynn

unread,
Jun 17, 2012, 5:39:59 PM6/17/12
to
On 17/06/12 22:26, Boris Veytsman wrote:
> PF> From: Peter Flynn <pe...@silmaril.ie>
> PF> Date: Sun, 17 Jun 2012 20:46:24 +0100
>
> PF> Is anyone working on porting TeX (and an editor) to Android ICS?
> PF> Or is there a physical restriction in the OS (clearly there is a
> PF> screen limitation in some of the hardware).
>
> There are two ways to do this, and both are being actively developed.
>
> 1. It is possible to create a Linux environment in Android, and use
> standard TeXLive in it. I did this, and will present a paper in
> TUG'12 about this. Also, TeXlive includes binaries for this (in
> the unofficial part in TL11, and the official part starting TL12).

I did hear about this method, but I wonder if it will be slow on (for
example) a Galaxy Note. I look forward to hearing your paper.

> 2. Ma QiYuan works on porting TeXLive to Android natively. It mostly
> works (the problems are with Unicode libraries, which he currently
> works upon). The results look impressive. I hope he publishes a
> paper in TUGboat; his address is maqiyua...@vip.qq.com
> By the way, here is the web site of this project:
> http://code.google.com/p/texlive-for-android/

This excellent news, thank you very much.

///Peter

Boris Veytsman

unread,
Jun 17, 2012, 7:37:36 PM6/17/12
to Peter Flynn
PF> From: Peter Flynn <pe...@silmaril.ie>
PF> Date: Sun, 17 Jun 2012 22:39:59 +0100

>>
>> 1. It is possible to create a Linux environment in Android, and use
>> standard TeXLive in it. I did this, and will present a paper in
>> TUG'12 about this. Also, TeXlive includes binaries for this (in
>> the unofficial part in TL11, and the official part starting TL12).

PF> I did hear about this method, but I wonder if it will be slow on (for
PF> example) a Galaxy Note. I look forward to hearing your paper.

I did this on a tablet (Transformer TF101,
http://www.asus.com/Eee/Eee_Pad/Eee_Pad_Transformer_TF101/), which is
admittedly faster than a phone. It compiles The TeX book (494 pages;
I got a special dispensation to compile The TeX book for benchmarking)
in 6 to 19 seconds depending on the engine, and the full documented
sources of LaTeXe (492 pages) in 24 to 32 seconds. The compilation of
the paper itself (three runs of LaTeX and a BibTeX run) takes 13.3
seconds. For comparison, on my desktop (4 cores 2.4 MHz processor) it
takes 1.9 seconds, and on my laptop (ASUS Eee PC 900HD, 800 MHz
processor) - 11.9 seconds.

I can e-mail you the draft of my paper, if you wish.

--
Good luck

-Boris

My mother once said to me, "Elwood," (she always called me Elwood)
"Elwood, in this world you must be oh so smart or oh so pleasant."
For years I tried smart. I recommend pleasant.
-- Elwood P. Dowde, "Harvey"

JohnF

unread,
Jun 18, 2012, 2:01:26 AM6/18/12
to
Boris Veytsman <bor...@lk.net> wrote:
> PF> From: Peter Flynn <pe...@silmaril.ie>
>>>
>>> 1. It is possible to create a Linux environment in Android, and use
>>> standard TeXLive in it. I did this, and will present a paper in
>>> TUG'12 about this. Also, TeXlive includes binaries for this (in
>>> the unofficial part in TL11, and the official part starting TL12).
>
> PF> I did hear about this method, but I wonder if it will be slow on (for
> PF> example) a Galaxy Note. I look forward to hearing your paper.
>
> I did this on a tablet, Transformer TF101,
> http://www.asus.com/Eee/Eee_Pad/Eee_Pad_Transformer_TF101/
> which is admittedly faster than a phone.

Seems plenty fast on the tablet, as per your figures below,
and I can't imagine (but maybe I'm wrong) anybody wanting TeX
on a phone-size device. So what's the reason to develop
a native port (and a whole other TeX tree) if the
TeXlive-under-linux-under-android solution works?
And, actually, I'm asking this not so much about TeX itself,
but because I was thinking about porting some other stuff to
android using the linux-under-android approach, and am wondering
what other issues might require consideration.

> It compiles The TeX book (494 pages;
> I got a special dispensation to compile The TeX book for benchmarking)
> in 6 to 19 seconds depending on the engine, and the full documented
> sources of LaTeXe (492 pages) in 24 to 32 seconds. The compilation of
> the paper itself (three runs of LaTeX and a BibTeX run) takes 13.3
> seconds. For comparison, on my desktop (4 cores 2.4 MHz processor) it
> takes 1.9 seconds, and on my laptop (ASUS Eee PC 900HD, 800 MHz
> processor) - 11.9 seconds.
>
> I can e-mail you the draft of my paper, if you wish.

--
John Forkosh ( mailto: j...@f.com where j=john and f=forkosh )

maqiyuan

unread,
Jun 17, 2012, 7:11:57 PM6/17/12
to
My project is now under progress. I have not enough time to do this
work. So the progress is so slow.
All my testing is do in a tablet and small phone.
All programs in this project is based on C, which are faster than
programs based on JAVA.
My plan is here:

1. to rewrite some kpathsea tools ("mktexlsr", "fmtutil" and "updmap")
in Lua.
2. to port perl for Android or to use sl4a's perl.
3. to make a simple IDE based on jota editor
(http://code.google.com/p/jota-text-editor/).
4. to build a ".apk" installer for my project.

Engines now supported (except XeTeX, compiling ICU is so boring):

1. pTeX, eupTeX, upTeX
2. Aleph
3. eTeX, TeX82
4. pdfTeX
5. LuaTeX

Boris Veytsman

unread,
Jun 18, 2012, 2:06:07 PM6/18/12
to
J> From: JohnF <jo...@please.see.sig.for.email.com>
J> Date: Mon, 18 Jun 2012 06:01:26 +0000 (UTC)

J> Seems plenty fast on the tablet, as per your figures below,
J> and I can't imagine (but maybe I'm wrong) anybody wanting TeX
J> on a phone-size device. So what's the reason to develop
J> a native port (and a whole other TeX tree) if the
J> TeXlive-under-linux-under-android solution works?

Well, I cannot speak for Ma Qi Yuan, but I guess it is a fun project.

I used the Linux approach because of my specific requirements. My aim
was to recreate my familiar work environment on a new device bought
for travel. Thus I needed not just TeX, but also Emacs, gnuplot, R,
maxima, octave, perl, make, etc. - all my tools. A Linux environment
was therefore a great thing for me: everything "just works" on a
tablet.

On the other hand, a native TeX on Android may be used as a plugin for
an integrated development environment created specifically for
Android, or a backend for some Android-only applications, etc., etc.
I personally do not need them (at least now), but I can imagine a user
for this.

For example, some physicians use a tablet to quickly enter the data
during a patient examination. I can belive a TeX app that formats the
data and typesets a formal report in pdf format might be of interest
to them - especially if the alternative solution of sending the raw
data to a backoffice server is not viable (e.g. in a hospital). Then
the integration into Android infrastructure might be a big advantage.

--
Good luck

-Boris

A free society is one where it is safe to be unpopular.
-- Adlai Stevenson

Peter Flynn

unread,
Jun 18, 2012, 3:10:31 PM6/18/12
to
On 18/06/12 00:37, Boris Veytsman wrote:
> PF> I did hear about this method, but I wonder if it will be slow on (for
> PF> example) a Galaxy Note. I look forward to hearing your paper.
>
> I did this on a tablet (Transformer TF101,
> http://www.asus.com/Eee/Eee_Pad/Eee_Pad_Transformer_TF101/), which is
> admittedly faster than a phone.

I haven't bought a Note, but it's under consideration because it's
faster than regular phones (being basically a tablet with phone capability).

> It compiles The TeX book (494 pages;
> I got a special dispensation to compile The TeX book for benchmarking)
> in 6 to 19 seconds depending on the engine, and the full documented
> sources of LaTeXe (492 pages) in 24 to 32 seconds. The compilation of
> the paper itself (three runs of LaTeX and a BibTeX run) takes 13.3
> seconds. For comparison, on my desktop (4 cores 2.4 MHz processor) it
> takes 1.9 seconds, and on my laptop (ASUS Eee PC 900HD, 800 MHz
> processor) - 11.9 seconds.

By comparison, LaTeX on my old Nokia N800 compiled 200pp of my thesis in
22 sec (Saxon took 14 sec to create the LaTeX code from XML).

> I can e-mail you the draft of my paper, if you wish.

I can wait until Boston :-)

///Peter

Peter Flynn

unread,
Jun 18, 2012, 3:14:48 PM6/18/12
to
On 18/06/12 07:01, JohnF wrote:
> Boris Veytsman <bor...@lk.net> wrote:
>> PF> From: Peter Flynn <pe...@silmaril.ie>
>>>>
>>>> 1. It is possible to create a Linux environment in Android, and use
>>>> standard TeXLive in it. I did this, and will present a paper in
>>>> TUG'12 about this. Also, TeXlive includes binaries for this (in
>>>> the unofficial part in TL11, and the official part starting TL12).
>>
>> PF> I did hear about this method, but I wonder if it will be slow on (for
>> PF> example) a Galaxy Note. I look forward to hearing your paper.
>>
>> I did this on a tablet, Transformer TF101,
>> http://www.asus.com/Eee/Eee_Pad/Eee_Pad_Transformer_TF101/
>> which is admittedly faster than a phone.
>
> Seems plenty fast on the tablet, as per your figures below,
> and I can't imagine (but maybe I'm wrong) anybody wanting TeX
> on a phone-size device.

The point about the Note is that it's not phone-sized. It's more the
size of a little tablet. Propped up, with a Bluetooth keyboard, it's big
enough to write on, certainly bigger than the Nokia N800.

> So what's the reason to develop
> a native port (and a whole other TeX tree) if the
> TeXlive-under-linux-under-android solution works?

There seem to be a *lot* of people wanting LaTeX on Android (by one
means or another). The native port would be useful for the smaller
devices where adding the Linux layer would just slow things down or
clutter them up.

And from what I saw, the Linux-under-Android "solution" is not fast.

///Peter

Peter Flynn

unread,
Jun 18, 2012, 3:16:46 PM6/18/12
to
Thank you for the update, and thank you for the work!

///Peter

Boris Veytsman

unread,
Jun 18, 2012, 5:26:50 PM6/18/12
to Peter Flynn
PF> From: Peter Flynn <pe...@silmaril.ie>
PF> Date: Mon, 18 Jun 2012 20:14:48 +0100


PF> There seem to be a *lot* of people wanting LaTeX on Android (by one
PF> means or another). The native port would be useful for the smaller
PF> devices where adding the Linux layer would just slow things down or
PF> clutter them up.

No, it would not slow them down (at least in the variant I use). You
see, this is NOT a virtual machine under Android. Rather, some linux
processes run under Android kernel in a chroot directory. This means
that there are no "additional layer" at all. From the point of view
of Android these processes are just normal android processes that
happen to use libraries residing in strange (for Android) locations.

Actually these programs theoretically should run faster than the
"native" Android processes, since they do not use Java layer and many
other things Android programs do.

Neither would this clutter things up: chrooted Linux lives in its own
filesystem, and does note interfere with anything else at all (at
least until I explicitly ask it to read files from the Android
filesystem).

So this solution is cleaner and faster.

--
Good luck

-Boris

Sodd's Second Law:
Sooner or later, the worst possible set of circumstances is
bound to occur.

Peter Flynn

unread,
Jun 18, 2012, 6:45:52 PM6/18/12
to
Excellent (that's a different explanation from one I was given elsewhere :-)

Thanks for the information...now I just need to find out if that's
possible on the Note under whatever modified version of ICS Samsung have
decided to put on it...

///Peter

msinis...@gmail.com

unread,
Oct 10, 2012, 12:16:55 PM10/10/12
to
Dear all,

I was looking for an Android TeX solution myself, and stumbled across this:

http://linuxonandroid.org

I have tried this out myself on my aging Samsung Captivate (AT&T's version of the Galaxy S, from circa 2010). I was able to install a light version of Ubuntu 12.04, then pull in TeXlive and the Evince PDF viewer via the standard apt-get command, and finally edit, typeset (pdflatex) and preview a simple LaTeX document. Of course, doing this using the on-screen keyboard on a 4" screen is not a lot of fun, and my Captivate is no speed demon. Still, the actual compilation process was very fast---granted, the test document was just a few lines really, but compilation was basically instantaneous. A larger document would of course take much longer than on a modern desktop or laptop. I need to run more extensive tests.

There is an XDA thread dedicated to this fine piece of software. People have successfully run various flavors of Linux on different phones and tablet---including the Galaxy Note and Nexus 7. I would imagine that the latter in particular would make for a decent TeX machine, at least for last-minute (OK, night-before) edits before a talk [you know, the ones where you add stupid slides that make the whole talk go down the drain the next day :-)].

Just thought you'd like to know.

Marciano

http://tekonomist.wordpress.com


On Monday, 18 June 2012 17:45:52 UTC-5, peter wrote:
> On 18/06/12 22:26, Boris Veytsman wrote:
>
> > PF> From: Peter Flynn
>

An Hoa Vu

unread,
Oct 10, 2012, 10:43:16 PM10/10/12
to
I got my Nexus 7 a few week ago. I am disappointed that there is no (local) TeX on Android and VerbTeX is an ugly choice. So I chose to create one for myself. The Android-friendly binaries were compiled using Google NDK (with some limitation such as no xdvi as it requires X Windows system which is not available on Android; no xetex). You can check them out at

https://github.com/anhoavu/TeXAndroid/tree/master/build

With a rooted phone or tablet, simply install a terminal emulator such as https://play.google.com/store/apps/details?id=jackpal.androidterm and 'push' the extracted build to an executable location of Android such as /system or /data (need root permission here). 'chmod' the binaries, deploy the TeXMF tree, do mktexlsr, ... and enjoy TeX just like on Linux. (I will write a detail manual for this in a few week time.)

I am in the progress of creating an app that makes use of those underlying binaries without having to root the device. It also offer a convenient way to install the additional packages. The project is at

https://github.com/anhoavu/TeXPortal

Drop me an email if you want some preview binaries (or you can compile them yourself by downloading the project source code).

Joris Pinkse

unread,
Oct 11, 2012, 10:14:23 AM10/11/12
to
Wow! That's fantastic. Thank you very much for doing that.

Peter Flynn

unread,
Oct 11, 2012, 5:56:18 PM10/11/12
to
On 11/10/12 03:43, An Hoa Vu wrote:
> I got my Nexus 7 a few week ago. I am disappointed that there is no
> (local) TeX on Android and VerbTeX is an ugly choice. So I chose to
> create one for myself. The Android-friendly binaries were compiled
> using Google NDK (with some limitation such as no xdvi as it requires
> X Windows system which is not available on Android; no xetex). You
> can check them out at
>
> https://github.com/anhoavu/TeXAndroid/tree/master/build

This is a great move, thank you.

Now we just need a LaTeX-sensitive editor that can be installed without
rooting the device, then we can show everyone that a fully-functional
TeX can be installed.

///Peter

An Hoa Vu

unread,
Oct 14, 2012, 12:50:27 AM10/14/12
to
On Monday, June 18, 2012 3:46:24 AM UTC+8, peter wrote:
Hi guys,

I have finished a couple of improvements. The released app is at

http://www.mediafire.com/?nokq5iehc2nr62o

Please also read the associated manual (1.5 pages) at:

http://www.mediafire.com/view/?rv9w7gygieu3s4p

For your information, the manual itself is an amscls LaTeX document. It is typeset using this app with the help of
Jota+ : a reasonably good LaTeX editor though without much TeX support
Swype : efficient English input method for Android; TouchPal is an alternative
Hacker's Keyboard : useful QWERTY keyboard for command editing because TeX uses many symbols like \ { } $ and others
These apps can be obtained from Google Play store. Enjoy this first release and please give me your suggestions and/or usage feedback.

msinis...@gmail.com

unread,
Nov 30, 2012, 2:54:05 PM11/30/12
to
This is fantastic news! Just one thing: the link to the app does not seem to work (mediafire says it's a private file). The manual does open, and of course the github repo is easily accessible.

Any plans to submit this to the Play Store?

An Hoa Vu

unread,
Dec 9, 2012, 9:42:12 PM12/9/12
to
It is already on the Play Store.

msinis...@gmail.com

unread,
Dec 12, 2012, 11:12:13 AM12/12/12
to
Awesome, I'm installing as I type this :-)
0 new messages