LXTeX 2e - LaTeX 2e for the HP Palmtop

Archived 2013-12-08
This page has been archived and some links may not work correctly anymore. No updates of this page will be done anymore.

Contents of this page:

 


 

About LXTeX 2e

The first steps to compose a distribution of LaTeX for the HP palmtops were done by Stephan Lüttjohann and Hans Hönen. They brought up a version of LaTeX 2.09 for the palmtop. Click here to get to Stephans´s site where LxTeX "version 1" can be downloaded.

LXTeX 2e is an adaption of emTeX (LaTeX 2e for DOS) made by me especially for the HP palmtops. You can use it on your palmtop if you have at least 6 MB free disk space. I recommend that you only run it on a double speed upgraded palmtop, otherwise the process of generation of fonts (by Metafont) is terribly slow (but it works on a single speed palmtop, too). On my double-speed palmtop it takes about 5 minutes to generate one font. But fortunately each font only has to be generated only once.

If LXTeX seems to be overkill for your needs (and LaTeX / LXTeX is hard to learn for someone who is used to graphical text processors like MS Word), have a look at LXRTF, which is a tool to generate Rich Text (RTF) files on the palmtop. 

Download LXTeX 2e

Files:
Name Date File size Hits    
HP Palmtop tools archive Version:1 2013-12-08 3.98 MB 2647


Installation:
Unzip the downloaded big archive file and then unzip the contained LXTEX.ZIP. Afterwards:
Unzip the LXT2E13.ZIP file with the -d option (if you use PKUNZIP), so that all subdirectories are created.

Please read the README.TXT file in the main directory of the unzipped archive carefully: There you´ll find installing instructions, configuring instructions and a little guide how to use LXTeX2e. Additionally it contains the directory PRN_CONF, which includes batch and data files for different printers. By default LXTeX is configured to print to a Canon Bubblejet printer.

If you would like to get more information about the LaTeX system and its components, please read the numberous doc files that come with LaTeX (emTeX). They were included in the LXTeX ZIP file until version 1.1, now I have split it up into two files: LXT2E13.ZIP contains LXTeX with all needed files and EMTEXDOC.ZIP contains the relevant DOC files which come with emTeX. The files in the EMTEXDOC package are not needed to run LXTeX, i.e. do not have to be installed on the Palmtop. 

LXTeX 2e additional packages

Here is a list of optional packeges you can install to get additional features.

DINBRIEF

- this is a stripped-down version of the DINBRIEF package made by University of Karlsruhe. It is a document class for German letters according to the DIN 676. With template, nice letter head and documentation. Unzip into an extra directory and read lxt_inst.txt. Click here to see how this document class with the letter-head look like (30 kB PNG graphic). The DINBRIEF package is included in the ZIP file you can download above.

LXTeX 2e Frequently asked questions

LXTeX is too complicated for me! I need a simpler solution to create professionally formatted text on the palmtop!

Take a look at LXRTF!

 

I do not know how to configure LXTeX so that it works...

Please read the README.TXT file, which comes with LXTeX. It describes most situations which can occur.

 

Using other printers than Canon BJ

If you have another printer than a Canon Bubblejet, for which LXTeX is preconfigured, please read section 3.6.2 (A:\EMTEX\BIN\PR.BAT) of the README.TXT. It describes how to change printer configuration. If your printer isn´t covered by the options of the DVI drivers, either look for a newer DVI driver or see if your printer can emulate one of the supported printers. If nothing like that is possible, you may as well use a PC LaTeX installation to print your files generated on the Palmtop. See below.

 

TeX capacity exceeded

If you get this error message, try to shorten some macros or maybe don´t use macros at all, rather include the full LaTeX command string defined by the macro everywhere you used the macro. Clumsy, but might help to avoid the error.

 

Metafont takes incredibly long to generate fonts! How to speed that up?

On a double-speed upgraded palmtop, Metafont takes about 5 minutes generating one font. See section 4.3.4 (Preview) in the README.TXT. You can avoid generation of most fonts if you put a font library file (*.FLI) into the %EMTEXDIR%\FONTS directory. Find the *_BASE.FLI file which suits your printer (if you only preview on the palmtop and don´t print at all, take the BJ_BASE.FLI, LXTeX comes preconfigured for this one). You can find the FLIs on ftp.dante.de.

 

I get the error message A program started an invalid instruction... and the palmtop locks up. What to do now?

This is a serious error which seems to be related to the palmtop´s light sleep mode. I tried to avoid occurence of that error by deactivating light sleep during Metafont runs in the batch files which come with LXTeX, since Metafont seems to be the only program having trouble with this. If you get this error in a reproducable way, please let me know, then we can try to work out a solution. This error usually needs a cold boot (Ctrl-Shift-On), since it locks up the palmtop entirely.

 

BIBTEX

If you install the original BIBTEX4b package, there are some important things you should pay attention to:

      • You can delete %EMTEXDIR%\BIN\BIBTEX32.EXE to save disk space
      • BIBTEX does not like light sleep mode (same problems as with Metafont)! So if you call BIBTEX, no matter if manually or via batch file, make sure to deactivate light sleep before BIBTEX is called (command setit lf) and reactivate it after BIBTEX ran (command setit lo). See how this is done for Metafont, called by the DVIDRV, in %EMTEXDIR%\BIN\PR.BAT or %EMTEXDIR%\BIN\VS.BAT.

I forgot to switch off the palmtop, and it didn't switch off itself, now batteries are empty and I lost valuable data!

The light sleep mode, and thus the power-off time-out of the palmtop are deactivated as soon as you start a DVIDRV (eit viewer or the printer driver). If printing or viewing is finished, light sleep is reactivated. Thus it is not safe to leave the palmtop alone while viewing a DVI file!! Quit the viewer, then go away!

 

Printing does not work!

The DVIDRV prints to the interface PRN, which is mapped to COM1 on the palmtop (BTW, also LPT1 seems to be mapped to COM1 automatically). With a serial printer, there should be no major problem, only make sure the baud rates are properly set, and handshaking is enabled (and, of course, that you use the correct DVI driver and fonts!)

If you have a parallel port printer, you need a serial -> parallel converter. Most cheaper converters are hard-wired to 9600 baud. More expensive ones can be configured via dip switches to different baud rates and different handshaking methods. I have done some tests with such a configurable one, and the results were, that fastest printing is possible with 57600 baud and XON/XOFF handshaking. To make the printer driver use the correct baud rate, set the SETCOM1 line in %EMTEXDIR%\BIN\PR.BAT correctly. Also read section 3.6.2 (PR.BAT) of the README.TXT which comes with LXTeX.

You can also try to add the option /ox+ to the dvidrv line in pr.bat. This option enables XON/XOFF handshaking.

Please see also my RS232 pagewhich talks about connecting devices (also printers) to the palmtop.

 

How can I print if I do not have a serial port printer or a serial to parallel converter?

There are some ways:

  • Use the printer connected to your desktop PC, connect the palmtop via serial cable to the desktop PC and run a program on the desktop PC which hands over data from the serial port directly to the parallel port. Such programs are e.g. OMNIPRN or COM2LPTIf you have a printer with an IrDA interface, try the IrDA DOS printer driver 
  • Another approach might be to use the dvidot fax configuration to create a fax-format output and then use a fax program to "print" the output to a fax machine. All you need to create fax-formatted output is included with LXTeX 2e.

 

I often forget to enter LaTeX-specific codes for special characters, and LaTeX complains!

Simply add a search and replace tool which helps you to avoid such problems! I have, for example, the following lines in texedit.bat:

@echo off
echo calling editor...
pe %1.tex
echo converting Umlauts in %1.tex...
sed -f %EMTEXDIR%\bin\utility\conv_uml.sed %1.tex > %1.tmp
if errorlevel 1 pause
if errorlevel 0 copy %1.TMP %1.TEX
echo done.



i.e. after the editor has been exited, sed, the stream editor, is called using a sed script conv_uml.sed, which contains the sed commands to replace the umlauts. The sed script conv_uml.sed looks like this:

s/ä/"a/g
s/ö/"o/g
s/ü/"u/g
s/Ä/"A/g
s/Ö/"O/g
s/Ü/"U/g
s/ß/"s/g

All German Umlauts are thus replaced by their LaTeX German-package representation after each editing of the tex source file, i.e. if an ä is found, it is replaced by "a, ß is replaced by "s and so on. You need the stream editor sed for that task. It is available on the SUPER site. Simply put sed.exe into any utility directory on your palmtop which is in the PATH, or put it into %EMTEXDIR%\BIN\UTILITY. Actually, if you have the line \usepackage[cp850]{inputenc} (or as the number after "cp" whatever codepage you use on your palmtop) in your TEX source preamble, the Umlauts should be directly accepted in the input file, but the tex file would not be as portable anymore. And if you often switch codepages on your palmtop, you will probably get into trouble either. So the search and replace solution is better, in my opinion. And it is quite fast using sed.

 

I want to make a PDF file from my LXTeX document!

No problem, if you have access to a Linux or Windows computer: Put a \usepackage{times} into the tex file preamble, that is necessary because otherwise the Computer Modern fonts used by TeX had to be embedded as pixel fonts into the PDF file, and that looks ugly and blows up the PDF file in size. When using the times package, the Times fonts are used, which are Adobe standard fonts. Don't try to compile the tex file with \usepackage{times} on the palmtop - the times package is not installed there. Then put the tex source file onto the linux machine, do latex document.tex and then dvipdf document.dvi or dvipdfm docuent.dvi. This should give you an amazingly small good looking PDF file, readable with Acrobat Reader on any platform.