Everything HP200LX: Knowledge, Products, Service

9 years, 100's of pages of HP Palmtop Paper, jammed with tips, reviews and how-to's

Most useful, up-to-date Web sites devoted to the HP 200LX

Direct link into 1000's of pieces of Palmtop software

Tips from Our Techs

2008 Catalog
(PDF, 2.6 MB)

Contact Us/About Us

Weekly Palmtop Paper Newsletter
(Palmtop tips, latest happenings, and HP Palmtop Paper Store information)



Privacy Policy

TEX on the HP Palmtop

TEX on the HP Palmtop

You've undoubtedly heard of desktop publishing. This article introduces Palmtop Publishing. TEX can turn your Palmtop into a typesetting engine that will let you create photo-ready documents.

Stephan Luettjohann, Hans Hoenen and Yoichi Motohashi

Palmtop publishing with TeX is somewhat like creating a document for the World Wide Web. When you look at a Web page you see text in different font sizes and colors. Most often the text is organized for eye-appeal and readability.

If you're curious about how the author created the Web page, you can select the "View source" command on your Web browser and you'll see plain text with a lot of embedded HTML code. It certainly doesn't look like the finished product presented by your Web browser.

The HTML code might seem mysterious and intimidating until you realize that the author probably used a program like Microsoft Front Page or Adobe Page Mill. The author merely typed the text and then clicked on tool-bar icons to change the format of the text. In the background, Front Page added the HTML code that changed the format.

On the other hand, some people like to create Web pages by hand. They use a text editor and type both the text and the HTML commands. A Web viewer, such as Netscape Communicator or Hypertext Viewer (HV) interprets the commands and displays a Web page that is truly unique. It doesn't look like another Microsoft FrontPage clone.

This technique of embedding code inside a text document is the basis not only for Web pages but for all word processing and desktop publishing. Most people are not aware of this. They see a Windows Word document and they seldom look at the raw file that is saved on their disk. If they did, it wouldn't do much good. All the embedded code is in machine readable (binary) format.

With modern word processors and desktop publishing programs, the only way to format a document is to let the program embed the code for you. However, in the early days of desktop publishing, that was not the case.

In the "good, old days", you typed both the text and the commands to format the text. There were commands to select different fonts and commands to tell where to place the text on a printed page. Once you typed in the text and the code you passed the document to a compiler that prepared the document. Only then could you view or print your document.

If you wanted to prepare a technical document full of equations and graphs, this was the only way to do it. The alternative was to write your equations on paper and hope that a human typesetter would get them right.

The most efficient compiling program for producing high quality scientific-technical documents was created by Donald E. Knuth more than 20 years ago. He called the program TeX.

LaTeX, Leslie Lamports TeX; and EMTeX, Eberhard Mattes TeX. are versions of the original TeX compiler. They will let you produce "photo-ready" documents after a few days learning how to make use of almost all the TeX formatting commands.

In general, here's how you use TeX.

1. Type your document using an editor of your choice. While typing your text, specify with TeX commands where chapters begin, where quotes and paragraphs are to be placed, where formulas and enumerations begin and end.

2. Compile your document with a TeX compiler.

3. After that you can preview the document on your screen and send it to a printer.

LXTeX on your Palmtop

Taking into consideration the limited disk space on the HP Palmtop, we have tried to keep the size of our version of TeX as small as possible. It still consumes 3.7 Mbytes of disk space.

We chose as our compiler the TEX.EXE program from EMTeX version 3.0 and for our screen previewer we use DVISCRS.EXE version 1.6b taken from another EMTeX version. For printing we have installed DVIHPLJ.EXE version 1.6d which allows you to print on both LaserJets as well as on DeskJets. Most of the fonts that are needed are placed in the file DJ_BASE.FLI. We created some additional fonts using the Metafont program also developed by Donald E. Knuth.

We chose PalEdit as the text editor to use on the Palmtop. Finally to make the process of editing, compiling, previewing and printing a document almost seamless, we created an LXBatch program that lets you use the function keys to access the various parts of the package.

Something that starts out looking like this

winds up looking something like this 

Screen 1: Equations in TeX

Screen 2: TeX Presents Graphs

Screen 3: Main Screen of LXTeX

In Particular

We have made our LXTeX package available to readers of The HP Palmtop Paper. It takes about 2 Mbytes in its compressed form. When you get a copy of the LXTeX package, the easiest way to install it is to uncompress the files on the hard disk of your desktop computer. This part alone requires Windows. Once you have the files decompressed, you'll find the files in a directory tree called EMTEX. Simply transfer all the files in all the subdirectories below EMTEX to the A: drive of your Palmtop. LXTeX is designed to run from the A: drive, however, we have included instructions telling you how to modify the various files so that the program will run from the C: or F: drive. We also show how to install text editors other than PalEdit. If you decide to make any changes to the default configuration, you will also need a copy of LXBatch 3.0 to re-create the MENU.EXE program.

To run the LXTeX program use the More Menu Applications Terminate command to quit all applications. When you're at the DOS A:\ prompt, you can type LXTeX and the main menu will appear.

We have included several sample files that you can use to test the compiler, viewer and printing programs to see how they work and get some idea of how much time it will take to compile a document on the Palmtop. Further instructions for using the main menu and for navigating the viewer program are contained in a README.DOC file in the EMTEX directory on the Palmtop.

You may also want to take a look at one or more of the *.TEX files to see what TeX formatting code looks like. As with HTML coding, it is fairly straightforward for simple documents. But for documents with a lot of graphics, equations and tables, it can become complicated. If you make a mistake in the coding, the compiler will display an error message but it wont stop the compiling process.

A Real World Example

Yoichi Motoashi is a math professor who teaches in Japan but also travels around the world. He has used TeX on his HP Palmtop to write articles and even a book. The following is what Yoichi has to say about the value of TeX on the Palmtop.

The TeX I use on my Palmtop is SBTeX, which is available as SB40TEX.ZIP at various sites on the Internet for free DOS software. I use DVIOUT as the TeX viewer. The version of DVIOUT I use has been modified for the HP Palmtop and needs EMS. In my case the main system is Japanese which automatically enables EMS, otherwise the system would not work. This TeX viewer may be found by searching for T24202HP. LZH. However, these files are not enough; you also need font files. I gathered those CM fonts and corresponding TFMs from various sites which I cannot remember well. I now have a complete set of fonts and metrics covering those designed by Donald Knuth and the American Mathematical Society. I usually prepare my TeX files in the "Plane TeX" format. (I call this "Plane TeX" rather than "plain TeX", to indicate my frequent use of it in a plane over Siberia or Italy, etc.)

I haven't tried LaTeX, since I do not like it very much because of its heavy specifications. For a mathematician Plane TeX is more than enough. Some of my friends claim that JTeX a Japanese version of LaTeX works well on their HP Palmtops, but I suspect the speed hampers its usability, even on a double speed. (My 2 HP Palmtops are both double speed and 6 MB).

I use my HP combined with my MAC Power Book 1400C on which I have a far more advanced TeX system by BlueSky Co. (Textures 1.8). So on trips, and during those boring faculty sessions as well, I carry my little HP and work with my mathematical ideas using SBTeX. I prepare math articles divided into smaller pieces and combine them on my Mac when I am back to my home or office. I have never tried to use DVIOUT as a printer interface device. Printing can be done far better with the Mac and its laser printer.

I use the editor TED.COM made by a Japanese professor of computer science, which works beautifully and very quickly on both Japanese and English texts.

I write a TeX file (say 2-3 pages) with TED, TeX it with SBTeX, view the dvi-file with DVIOUT, think about what I've written, correct the original or add something, TeX it again, and send it to Finland, for instance. On the other side of the world my friend receives the TeX file and immediately prints it out at his office or home and returns his comments which I receive on a street in Tokyo or Oberwolfach in the Black Forest... and continue to improve the original idea. Eventually the result is published as a joint work.

To get a better idea of what can be done with TeX on the HP Palmtop, let me advertise my book which I wrote using TeX on my Palmtop. Most of the writing was done while flying over Siberia, the Pacific and Atlantic oceans, walking along the Danube in Budapest, enjoying Botticelli at Uffizi, watching snow falling in Turku, Finland or wherever.

Please find the book at www.amazon.com by searching for the author, Motohashi. You should find an advertisement for Spectral Theory of the Riemann Zeta-Function, which is published by Cambridge Univ. Press.

Software Mentioned in this Article

iPhone Life magazine

Notice about Palmtop.net
The Palmtop Network with its S.U.P.E.R. (Simply Unbeatable Palmtop Essentials Repository) software is now available under the domain name of hp200lx.net.  

We Buy
We buy used palmtops, working or broken: HP 200LX, HP 100LX and 1000CX.

Copyright 2010 Thaddeus Computing Inc