LXTeX 2e (emTeX (LaTeX 2e for DOS) for the HP DOS palmtops)
===========================================================

version 1.3
1999-2000 composed by Daniel Hertrich, Berlin, Germany
http://www.daniel-hertrich.de/lxtex

Please read the file 'history.txt' if you want to know the improvements of
version 1.3 compared to version 1.0 .. 1.3 of LXTeX 2e!



Table of contents:
==================

1. Description
2. System Requirements
3. Installation and Configuration
4. Working with LXTeX 2e
5. Source of emTeX / LaTeX 2e
6. Source and 'author' of LXTeX 2e
7. Special Thanks to...



1. Description:
===============

LXTeX 2e is an adaption of emTeX (LaTeX 2e for DOS) especially made for 
the palmtop HP 100/200/700 LX / 1000 CX. It has
full functionality: Editing of input file, compiling with LaTeX to DVI file,
previewing with DVI driver 'DVISCRS.EXE', printing with DVI driver (either
DVIDOT for matrix printers or DVIHPLJ for HP Laser Jets or HP Desk Jets).

Needed Fonts are generated by Metafont.

2. System requirements:
=======================

* one of the HP DOS palmtops (I don't think that it works on a 95 LX, but you
  never know... ;-)

* approx. 6 MB of free disk space on your palmtop (doesn't matter if built-in
  RAM-disk or flash card) 
  
* double speed upgrade (16 MHz) is recommended, but not necessary
  (if fonts have to be generated by Metafont, it can be terribly slow on a
  single speed (8 MHz) machine!)
  
* for printing from palmtop: a printer attached to the serial or IR port of
  the palmtop. 


3. Installation and Configuration:
==================================

3.1. If you got LXTeX2e as ZIP file (not as CD):
   Unzip the LXT2E12.ZIP file with the -d option (if you use PKUNZIP)
   into a temporary directory
   on your desktop machine (you have probably already done this because
   youre reading this file that was included in the ZIP! ;-)
   (you can also use the palmtop for all this installation work, but then
   you need a lot more free disk space!)  

3.2. copy the whole directory tree \EMTEX from the CD or the unzipped archive
   to a drive of your palmtop (needs abt. 5 MB). Here we guess that you copy
   it to A:\EMTEX.
   ATTENTION: _This_ LaTeX 2e does only run on a PALMTOP, because
   it includes some palmtop-specific utilities!
   They are in A:\EMTEX\BIN\UTILITY.
   E.g. if you start a DVI driver (for printing or
   previewing) the light sleep mode of the palmtop will be deactivated,
   because Metafont has some troubles with light sleep mode.

   --------> ATTENTION: So please NEVER let the palmtop running a long time
   while the previewer is running, because this will drain your batteries
   and result in total data loss!!! I also recommend _not_ to switch off
   the palmtop while the previewer is running. I got troubles with this.
   Only preview your document and leave the previewer as soon as possible!
   
3.3. If you got LXTeX 2e on a CD, you have to call

   ATTRIB -R A:\EMTEX\*.* /S

   to remove the read-only flags from all files.

3.4. LXTeX needs some environment variables:

   SET TEMP=c:\_tmp
   SET TMP=c:\_tmp
   SET EMTEXDIR=A:\EMTEX
   SET MFJOBOPT=/1/i
   SET DVIDRVFONTS=A:\EMTEX\FONTS
   PATH=%path%;A:\EMTEX\BIN

   These are set with the file A:\EMTEX\BIN\TEXSET.BAT; you can call this file
   from your autoexec.bat, if you want, or you can copy the contents of
   TEXSET.BAT into your autoexec.bat.

   Note that in TEXSET.BAT is also a CD command to change into your working
   directory. If this is another than A:\_DAT\LXTEX, please adapt TEXSET.BAT!

   If you're using Software Carousel for task switching, you can add the call
   of TEXSET.BAT to the startup batch file of the session you want to run
   LXTeX 2e in.
   
   Please make sure that all the paths are set correct (i.e. if you copied
   the EMTEX directory to another location on your palmtop than I did, you
   have to modify all the A:\EMTEX parts of the variables!) and that the
   temporary directory exists (vars TMP and TEMP).
   
   Make sure that you have enough environment space available for all the
   variables. The best way to allocate enough space is to add the line

   shell=d:\dos\command.com /p /e:1024 

   to your config.sys file. That allocates 1 kB of RAM for environment
   variables (DOS default is 256 byte, I think). If you need more than 1 KB,
   you have to modify the value of the /e: switch.

 
3.5. Now you are able to use LXTeX 2e already
   under the following circumstances (otherwise you have to modify the
   configuration):
    
  3.5.1 You have copied LXTeX 2e to A:\EMTEX on your palmtop (like I did)

  AND
  
  3.5.2 You want to use PE (Paledit by Andreas Garzotto) as editor for TEX
      files; the directory in which PE is installed must be included in the
      PATH variable
  
  AND
  
  3.5.3 You don't want to print directly from the palmtop, i.e. move the
  created DVI file to another machine and print it from there 
      
  OR

  3.5.4 You want to print from your palmtop with a CANON BJ printer that is 
      connected to the (wired) serial port of your palmtop via a 
      serial->parallel-Converter which is set to 115200 baud. (that's my
      configuration)
       

3.6. Otherwise you have to modify some files. Every line that perhaps has to
     be modified in a file is marked with a leading line like the following:

   ------------ ADAPT NEXT LINE: description of what should be done ----------

   , so you can find the lines easier.
   
   3.6.1 File A:\EMTEX\BIN\TEXEDIT.BAT 
   
       Here you must set the correct call of the text editor of your choice.
       If it's not installed in a PATH directory, you have to specify the
       whole path of the editor's EXE or COM file.
       
   3.6.2: A:\EMTEX\BIN\PR.BAT

     this file calls the printer driver for printing a DVI file. two lines
     have to be adapted. 
     
     The first calls SETCOM1. SETCOM1 configures your serial port. How 
     it works is described in PR.BAT. You can tell SETCOM1 to set your COM1 to
     either wired or IR port. If you print to a parallel printer via a
     parallel port PCMCIA card, you can rem out all calls of SETCOM1.
     
     The second is the
     line that calls your printer driver. You can find additional
     information regarding this driver call in the doc file DVIDRV.DOC
     in the unzipped EMTEXDOC archive. Please read part 4.4 of this
     readme file if you want to know how to read DVI files!
     
     Additionally you have to note the following items:
     
     3.6.2.1 Do _not_ use any of the PRT*.BAT files that are located in the
           PRN_CONF directory on the LXTeX2e CD / in the unzipped archive! I
           only included them into this package for your information how to
           call your printer driver. Use the PR.BAT file (because of the calls
           of the palmtop-specific utilities!).
           Copy the contents of the PRT*.BAT file into the PR.BAT file in the
           line that calls the printer DVI-driver!  
           
     3.6.2.2 You can find all
           files you need to configure PR.BAT in \PRN_CONF\BIN  and
           \PRN_CONF\DATA on the CD / in the unzipped archive. You only have
           to find out which files you need (as I wrote, please read
           DVIDRV.DOC!) and copy them to A:\EMTEX\BIN and A:\EMTEX\DATA and
           remember to use PR.BAT instead of the prefabricated PRT*.BAT file!
           
     3.6.2.3 If you're not familiar with DVI driver calls by now, I'll give a
           few more informations here:
           If you print with a matrix printer, you need the DVIDOT driver.
           If you use a HP Laser Jet or HP Desk Jet, you need the DVIHPLJ
           driver.
           In PR.BAT one of the respective printer drivers has to be called
           by a line 
           
           DVIDRV DVIDOT xxx @yyy /po=prn /h=12in %1 %2 %3 %4 %5 //
           or
           DVIDRV DVIHPLJ @yyy /po=prn /h012in %1 %2 %3 %4 %5 //

           The DVIDRV is needed to call Metafont if there are fonts to be
           created. 
           The DVIDOT or DVIHPLJ is the driver itself.
           The xxx specifies a *.DOT file (only needed if you use DVIDOT)
           fitting to your printer. (in A:\EMTEX\DATA).
           In @yyy the yyy specifies a *.CNF file fitting to your printer
           (also in A:\EMTEX\DATA).
           The /po switch sets the port to which the data stream is sent.
           The /h= switch indicates the height of the paper sheets you use to
           print on (maybe not needed - try without if you want).
           The %1..%x are only parameter transferers, %1 takes the DVI file
           name out of the LXTEX.BAT menu batch file, the others aren't
           actually needed.
           The // at the end of the
           line allows you to enter further parameters after the printer
           driver was called.  For further information see DVIDRV.DOC
           in the unzipped EMTEXDOC archive!
           
   3.6.3 After all configurations are finished, reboot your palmtop!


4. Working with LXTeX 2e:
=========================

   4.1 Create a working directory:
   
       First create a directory where you want to
       save your documents. For example, you can create the directory
       C:\_DAT\LXTEX. You can also manage your documents in a directory
       structure such as 
       A:\_DAT\LXTEX\PERSONAL      for personal letters or documents
       A:\_DAT\LXTEX\STUDYING      for documents made for your studying
       A:\_DAT\LXTEX\FUN           for lists of jokes ;-) 
       A:\_DAT\LXTEX\REPORTS       for reports 
       ....etc.
      
       You can find several TEX files in A:\EMTEX\TEMPLATE which you can
       compile and try around with if you want. Some (or all?) of them
       begin with the command "\documentstyle{...}". That means, that they
       are actually made for LaTeX 2.09, not for LaTeX 2e (the newer version).
       LaTeX 2e should call the LaTeX 2.09 compatibility mode automatically
       if you compile one of these TEX files.
 
   4.2 Start LXTeX 2e:
   
       Change into the directory where you want to store your next document
       (e.g. C: [enter] CD \_DAT\LXTEX [enter]),
       Choose a name for the document (e.g. SAMPLE)
       and start the LXTeX 2e menu batch file with the command
       LXTEX SAMPLE. (the filename must be given without any extension!)
       
       LXTEX.BAT first runs a few tests; if the results of these tests are OK,
       then the LXTeX 2e menu is shown. Otherwise you get an error message.
       
       If LXTEX.BAT doesnt start at all, maybe the PATH variable is not set
       correctly. It must contain the path of LXTEX.BAT (in this configuration
       sample it's A:\EMTEX\BIN. It should be set within TEXSET.BAT (see part
       3.4 of this README)).
       
       In the top part of the screen you can see which files
       of your document exist already (if you start a new document, nothing
       except the current directory will be listed). 
       The second part shows the document's name (here 'SAMPLE') and the status
       of the document (after the start of LXTEX.BAT the status is 'Unknown').
       Below you can see the menu.
       
   4.3 The menu
   
     4.3.1 Template:
     
         A template file for a TEX document is copied into the file SAMPLE.TEX.
         The template file is located in A:\EMTEX\TEMPLATE and its name is
         TEXT.NEW. You can change it and adapt it to your needs.
         Some explanations are given within the file itself, for further
         informations about document formatting please read a LaTeX book
         or the L2KURZ.DVI that's included in the EMTEXDOC archive.
         
         If SAMPLE.TEX exists already, a warning will appear and LXTEX.BAT
         will ask you if you really want to overwrite SAMPLE.TEX with the
         template file.
         
         After copying the template file into SAMPLE.BAT, the document status
         will be 'Template'.
         
     4.3.2 Edit:
     
         Calls the editor you have specified in TEXEDIT.BAT with the
         SAMPLE.TEX file. Now you can edit the source code of your document.
         After finishing the editing of the file, leave the editor _saving_
         SAMPLE.TEX.
         
         After editing the document status will be 'Edited'.
         
     4.3.3 LaTeX:
     
         Compiles the SAMPLE.TEX file and creates other SAMPLE.* files. The
         most important of them is SAMPLE.DVI, the so-called DeVice
         Independant file, that contains the document in viewable and
         printable form.
         This menu item calls LaTeX if the document status is 'Edited'. If
         it's other than 'Edited', a message appears and asks you if you
         really want to compile your SAMPLE.TEX file.
         If LaTeX or TeX reports error messages, keep in mind where in the
         input file the error occurred (LaTeX and TeX say something like
         'error in line 113 of SAMPLE.TEX'), press enter and wait for
         finishing or for the next error message and so on.
         If you enter 'q [enter]' after an error message, LaTeX won't
         continue to compile and lets you correct the error.

         After a compilation (with or without errors), the document status is
         set to 'Compiled'. This enables the DVI drivers to let you preview or
         print the document.
         
         But note that if error(s) occurred, you have to eliminate them by
         editing the SAMPLE.TEX file once more and compile it once more before
         you use any DVI driver!
         
         For information how to enter text and formatting commands please
         read a good LaTeX book (there are several!).
         
         Note that you have to compile twice if you embedded a table of
         contents or something like this!
         
     4.3.4 Preview:
     
         If the document status is not 'Compiled', a message will appear
         asking you if you really want to start the previewer.
         
         The previewer EXE file is A:\EMTEX\BIN\DVISCRS.EXE.
         
         If you start the previewer the first time, maybe some fonts have to
         be generated by Metafont. That takes a long time (per font approx. 5
         minutes on a double speed upgraded palmtop). But once a font is
         generated, it doesn't have to be generated once more (until you
         delete them - they are stored in A:\EMTEX\FONTS).
         
         If you don't want that much fonts will be generated, you can install
         a font library file (*.FLI) in the A:\EMTEX\FONTS directory.          
         For the BJ printer driver you need for example the BJ_BASE.FLI file.
         (fonts used for printer driver are also used for previewer).
         Such a library file is approx. 1/2 MB in size, so it saves much time
         to install it, but costs disk space. 
         The generated fonts need approx. 5-10 kB per font.

         If you don't want to install such a FLI file, you can remove the
         line

         +font-libraries=$DVIDRVFONTS:xx_{base,more}

         out of the CNF file for your DVI driver (located in A:\EMTEX\DATA).
         The xx stands for 2 letters.
         


         NOTE that the light sleep mode of the palmtop is DEACTIVATED during
         the whole process of starting previewer and creating fonts. This is
         because Metafont (which generates the fonts) has got problems with
         the light sleep mode. After leaving the previewer the light sleep
         mode will be reactivated. The program A:\EMTEX\BIN\UTILIY\SETIT.EXE
         is used to switch the light sleep mode on and off.
         So don't leave the palmtop alone while it's generating fonts or
         running the previewer! If you forget to leave the previewer again,
         it would then drain your batteries until it results in data loss
         because the palmtop wouldn't switch itself off after 3 minutes!
         I also recommend not to switch off the palmtop manually during the
         previewer is running, because I got disk errors then - but try it,
         maybe you don't get these errors..... ;-)
         
         The 'Preview' menu item doesn't change the document status. 
         
     4.3.5 DIR
     
         Lets you look inside your current working directory. lets you choose
         between listing *.TEX files or all files (*.*).

     4.3.6 TeXCAD:
     
         Calls TeXCAD, a software that lets you draw simple graphics.
         You find a manual for TeXCAD in the file TCMAN.DVI in the unzipped
         EMTEXDOC archive. See part 4.4 of this file how to do that!

         To embed a TeXCAD drawing into your document:
         - save the drawing as SAMPLE.PIC (note that you have to enter the
           correct path in the SAVE dialog, the default will be the
           A:\EMTEX\BIN directory - certainly not your working directory!) ;-) 
         - uncomment (or add) the line \usepackage{emlines2} in the
           header of your document SAMPLE.TEX 
         - add the command \input{sample.pic} to
           your SAMPLE.TEX file where you want the picture to be embedded.  
          
         The picture doesn't have to have the same name as your document,
         especially if you embed more than one picture, it's impossible to
         give them all the same name, but if you only embed one
         drawing, it's practical to name it as your document, because then it's
         listed in the top part of the LXTEX.BAT menu together with all the
         other files of your document.
         It will NOT be deleted if you leave LXTEX.BAT saying 'yes' to the
         delete question.
  
         The menu item 'TeXCAD' doesn't change the document status.
        
     4.3.7 Print:
    
         If the document status is not 'Compiled', a message will appear
         asking you if you really want to start the printer driver.
         
         The printer driver is called via the PR.BAT file in A:\EMTEX\BIN. For
         its configuration see part 3.6.2 of this README file.
         
         You can enter more options for the printer driver, if you want,
         otherwise just press enter.  
         
         NOTE that the light sleep mode is DEACTIVATED during printing. The
         first reason is that the palmtop shouldn't switch itself off during
         it sends data to the printer, the second reason is that maybe fonts
         have to be created for the printer driver, and as described above,
         Metafont doesn't like the light sleep mode! ;-)
         
         The menu item 'Print' doesn't change the document status.  
         
     4.3.8 View LOGs:

         Starts a text scroller with all LOG files created with the last
         LaTeX run. Press ESC to quit the text scroller for the first file
         and to switch to the next one. If you have seen all LOG files (usually
         3 or 4) the text scroller disappears and you are back in the menu.

     4.3.0 Quit:
     
         Quits LXTeX 2e.
         
         If a source file SAMPLE.TEX of your SAMPLE document exists.
         you will be asked if you want to leave all SAMPLE.* files on the disk
         in your current working directory or if you only want to leave the
         SAMPLE.TEX source code on the disk and delete all other (by LaTeX)
         generated files.
         You should choose the last item to save disk space, because all other
         files can easily be recreated by running LaTeX again.
         
         NOTE:
         If you saved any other files in the current directory with the name
         SAMPLE.* (or whatever the name of your current document is), these
         files will also be deleted!
         An excepion is SAMPLE.PIC (if you saved a TeXCAD drawing with the
         name SAMPLE). It will not be deleted.

         If the source code of your document DOESN'T exist (for example if
         you only wanted to view a DVI file that came without a TEX file),
         LXTEX.BAT won't ask if you want to delete all files unless the TEX
         file.

        
         At the end LXTEX.BAT shows you the remaining files of your document
         SAMPLE in the current working directory and then it says 'bye bye!'
         ;-)


  4.4 Viewing DVI files that come without source code

         If you want to read for example the TCMAN.DVI file or other
         manuals stored in EMTECDOC.ZIP, you can go into the directory of
         this file and call LXTEX TCMAN
         (again without every extension!).
         You can't edit a source file, you can only (pre)view or print the
         DVI file with LXTEX as usual.

         If you leave LXTeX after viewing or printing the DVI, you will not
         be asked if you want to delete all files of your docuent except the
         TEX source file (because no TEX file exists).

          

5. Source of LaTeX 2e:
======================

  If you want to install additional packages of LaTeX or a *.FLI file (font
  library) or whatever, you'll find them on
  
  ftp://ftp.dante.de/pub/tex/systems/msdos/emtex  
     

6. Source and 'author' of LXTeX 2e:
===================================

  on my homepage

  http://www.daniel-hertrich.de

  you'll find the latest version of LXTeX 2e.
  
  I've set the 'author' in the headline in quotation marks, because I'm not
  really the 'author' of LXTeX. I used the emTeX package and composed an own
  version using own batch files and an own configuration. So I'm more a
  'composer'.
  


7. SPECIAL THANKS TO:
=====================

Stephan Luettjohann and Hans Hoenen, who made a version of LaTeX 2.09
for the palmtop, and made me wish to have a better LaTeX on this nice little
machine. So the idea of adapting LaTeX 2e for the palmtop came up.
 
Stefan Peichl who wrote SETCOM1.COM after I asked him to write a tool 
which I could use to set the COM port of the palmtop to any possible
configuration with calls in batch files.

Thomas Grund who showed me the differences between LaTeX 2.09 and LaTeX 2e
and who teached me how to minimize the size of a working installation of  
LaTeX 2e. 


Hope you enjoy LXTeX2e

daniel [http://www.daniel-hertrich.de]

END OF FILE (finally... ;-) )

