# Now that I can run TeX on my iPad, what shall I TeX?

I have just learnt that there is a TeX implementation now on the iPad (original source this answer to Is there a (La)TeX distribution running on iPad?). As the author of the blog post I TeX therefore iPad, this clearly warrants an update. I've downloaded the application and can confirm that it really does compile TeX documents without an internet connection (not that I disbelieved them, but some things just need confirmation). But clearly I need to experiment a bit before writing "I TeX therefore iPad: the return of the lion".

Moreover, there is a fairly big caveat: it runs plain TeX. I know almost nothing about plain TeX.

Whence a double question:

1. What would people like to read in a blog post? What are the features that would be of most interest (think also about the editor and environment)? (Try to make your request substantial - give some criteria to check.) What edge cases do you want testing to see if it really is TeX?

(Added in Edit) After seeing the first couple of answers below, I can provide a slightly more focussed version of the my original first question. I'm still interested in answers to the above so I'll leave it as it is, but I've also created a chat room http://chat.stackexchange.com/rooms/4598/tex-on-the-ipad for anything that is more discursive: use the chat room for things that won't stand the test of time.

The environment is an editor from which TeX is run. The format is plain TeX. It can be linked to Dropbox so I can upload files from my computer TL distribution. I can use \input (I haven't tested if it searches any subdirectories). What files would be useful for me to upload?

2. How do I, a LaTeX-user, best convert to plain TeX? What resources are there for me to learn what I can and cannot do? (Apart from reading every single one of morbusg's posts.) In particular, given that it would like like I won't be able to use this for editing existing documents, what kind of document is plain TeX best suited for?

-
I realise this isn't the best fit for this site, so I won't be too upset if it gets closed. Also, where's @lockstep when you need a decent tag? –  Andrew Stacey Aug 23 '12 at 12:31
Great idea! I'm thinking your second question might be even better as a stand-alone question; in line with our other questions about beginner recommendations. Your first question could then go on meta, perhaps. –  doncherry Aug 23 '12 at 12:40
@doncherry I did consider that, but hardly anyone reads meta. So my first question is piggy-backing on the second a bit. –  Andrew Stacey Aug 23 '12 at 12:41
Hm, I dont't think that (1) does really qualify as a tex.se question (it is a bit narrow and probably won't be of much value once the blog post got updated.) So I suggest to make (2) the real question and ask for coments on (1). –  Daniel Aug 23 '12 at 12:45
To start: I would love to have an update on your blog post. I am particularly interested in (a) an update on your experiences with the apps you described and in general (now, as the first excitement about a new gadget turned to day-by-day (?) use). (b) Editors! (c) General workflow. I can imagine basically two use-cases for texing in the iPad: Playing around and last-minute edits on papers and other collaborative documents. For the latter: how to deal with packages, grafics, etc. –  Daniel Aug 23 '12 at 12:53

there is a TeX package miniltx:

\input miniltx

\font\myTT=cmr5 at 20pt

\newcommand\stuff{%
Here comes some text $\ldots$ which should
be typeset $\ldots$}
\newenvironment{morestuff}
{\myTT}
{\par}

\stuff

\morestuff
foo bar baz
\endmorestuff

foobar
\bye

-
and ... it ... works ... ! –  Andrew Stacey Aug 23 '12 at 12:49

Try doing Knuth's original trip test; the manual is here.

-
Looking at the files, it wasn't obvious how to run them from within TeX - I have no access to the "command line" on this thing so it presumably effectively runs tex file.tex on whatever is in the editor. Is there a simplified test that can be run this way? –  Andrew Stacey Aug 23 '12 at 12:40
@AndrewStacey --- I do not know of a simpler version of the trip test. –  Ian Thompson Aug 23 '12 at 12:54

there's still a plain tugboat style, provided in tex live in the subdirectory .../tex/plain/tugboat-plain/. you'll need two of the files there for this exercise: tugboat.sty and tugboat.cmn.

a periodic tex hyphenation exception list appears in tugboat. every time it's published, the cumulative collection is posted to ctan, where it appears in info/digests/tugboat/hyphenex/tb0hyf.tex. this is constructed in plain tex. (that's more a matter of age of the original column and inertia than of unsuitability of latex. it works, so i have no interest in converting it.)

both the file for the hyphenation collection and the tugboat "header" files (.sty and .cmm) contain some interesting macro code, so you might even learn some useful texniques from examining them as well as the contents of the article.

and if you find some bad hyphenations in other places that you think should be added to the exception list, you are invited to send them to me for consideration.

-

I'm mainly trying to answer (2).

What isn't bundled in the format compared to LaTeX is a big list, but perhaps some important ones include: hyperlinks, label/ref, toc, sectioning below first level (\beginsection), lists below two levels (\item & \itemitem), and font selection scheme (there are \bf, \it, etc., but no size change for example). Most of these can be made available if you can do \input eplain.

That said, I think you'd be surprised how much you can do with just plain TeX. Especially math-heavy documents tend to look rather nice in my opinion. Although on that front, what is missing is script and "blackboard bold" (if you can \input amstex [or was it amssym.def?] then you get \Bbb). Some useful display math commands include \displaylines for free-form multi-line displays, \eqalign for math axis centered alignments, and \eqalignno, for display-wide alignments where you can number each line if you want. (Just remember the lines are seperated with a \cr instead of LaTeX \\.)

There is only one general \proclaim macro for proofs, lemmas, corollarys and what have you.

With XeTeX you can have a lot more math stuff available with Unicode and fonts like Cambria Math, Asana Math, Neo Euler, and of course STIX/XITS Math. But I'm not sure if one can install extra fonts for i-devices. I have collected some little helpers for plain XeTeX with the help of tex.sex people here (I'm sorry to say it's a bit of a mess still, I need to get everything organized).

I feel that plain TeX is suitable for any kind of documents, and to help with using it, there is a very nice reference card made by J.H. Silverman here: http://www.math.brown.edu/~jhs/ReferenceCards/TeXRefCard.v1.5.pdf

-
Sadly, \input eplain wipes out the memory. I could have a go at trimming it down to the bare essentials (had to remove the definition of \MF due to missing fonts). But I got the reference card to compile! Just got to modify it to fit the iPad screen page size. –  Andrew Stacey Aug 23 '12 at 15:04
@Andrew: darn, I'm sorry to hear that eplain doesn't work there. –  morbusg Aug 24 '12 at 3:49