home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / FREDV19A.LHA / FrexxEd / fpl / LaTeXCompile.FPL.README < prev    next >
Encoding:
Text File  |  1995-07-19  |  5.6 KB  |  143 lines

  1. #############################################################################
  2. File:                LaTeXCompile.FPL
  3. Author:                Jesper Skov
  4. Email:                jskov@iesd.auc.dk
  5. Short:                Provides interface to the PasTeX compiler.
  6. Version:            1.2
  7. Date:                02.03.95
  8. Local settings:        LaTeX_(compile_dir, port_name, style, auto_save,
  9.                             log_restart)
  10. Global settings:
  11. Keysequence:        "C-c C-c" and "C-c '" (C = ctrl)
  12. Type:                Function, key
  13. Prereq:
  14. Copyright:            © 1994-1995, Jesper Skov
  15.                     Use/distribute according to the terms of GNU GPL.
  16.                     (See the file 'COPYING.GNU' for more info!)
  17. #############################################################################
  18.  
  19. FUNCTION
  20.   With this file you have a cute little PasTeX interface for FrexxEd (Fred).
  21.   Changes you _have_ to make in your PasTeX system: *NONE*
  22.   Changes I suggest you make in your PasTeX system (by free will! No force :)
  23.     Collect all the files PasTeX usually use when compiling in a directory
  24.     called "PrimeTeX:". (If your Amiga has enough RAM you might want to copy
  25.     this directory to RAM each time you start a TeX'ing session. This will
  26.     give you a nice performance boost ;)
  27.  
  28.   If you want Fred to locate compile errors by itself you need to insert the
  29.   lines below in the file TeXedit.rexx (found in the Rexx: or TeX:Rexx/ dir).
  30.  
  31.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  32.   /* FrexxEd */
  33.   IF SHOW('P', 'FREXXED.1') THEN DO
  34.   ADDRESS "FREXXED.1"
  35.   logname = logfile
  36.   IF 0~=LASTPOS("/",logname) THEN
  37.     logname = RIGHT(logname,LENGTH(logname)-LASTPOS("/",logname))
  38.   IF 0~=LASTPOS(":",logname) THEN
  39.     logname = RIGHT(logname,LENGTH(logname)-LASTPOS(":",logname))
  40.   'LaTeXFail ("'logname'");'
  41.   EXIT 0
  42.   END
  43.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  44.  
  45.   (Insert it below the comment "Here starts each editor specific parts"!)
  46.   
  47.   Um, that's it. Now you just have to press "C-c C-c" in a LaTeX buffer
  48.   (latex_mode checked). If the compilation is successful you should see
  49.   ShowDVI popping to front, giving you a look at the resulting document.
  50.   If the compilation was interrupted (by an error), Fred will pop to front
  51.   and place the cursor at the line which holds the first error. Also, the
  52.   status line will show you a description of the problem. If you press
  53.   "C-c '" the cursor will jump to the next erroneous line.
  54.  
  55.   This mode has a few preference settings (all local and writeable):
  56.  
  57.   LaTeX_compile_dir:
  58.     In what dir should LaTeX be invoked from? If empty, the file's home
  59.     directory will be used for the compilation. I use a directory called
  60.     PrimeTeX: as described above. This, however, means that the .tex/.log
  61.     and .aux files will be mixed with your (*.sty) files, so if you do not
  62.     make a copy of PrimeTeX: to RAM before starting, your PrimeTeX: dir
  63.     will pretty fast get filled with crap files. Also, if you _do_ make
  64.     a copy of PrimeTeX: to RAM you will get another problem. See L_auto_save.
  65.  
  66.   LaTeX_auto_save:
  67.     If you compile from the RAM disk, the .tex file will not automatically
  68.     be updated on disk (or where ever the file's home dir is) unless you set
  69.     this flag. It's tough loosing an hours work because all compilation has
  70.     been made in RAM, but on the other hand, it's nice not always saving the
  71.     file to disk. To compromise these two points, the auto saving is not
  72.     made until the syncronous LaTeX job has been started. In short, play it
  73.     safe! Use auto_save!
  74.  
  75.   LaTeX_port_name:
  76.     The name of the ARexx port for the PasTeX server. Included to make it
  77.     easy to support other TeX compilers with other server names.
  78.  
  79.   LaTeX_style:
  80.     Which style to use in the compilation. I use "&latex", but as I recall it
  81.     the standard PasTeX package use "&lplain". If you are tough you maybe also
  82.     want to use "&plain" (raw TeX).
  83.  
  84.   LaTeX_log_restart:
  85.     When jumping to next error with "C-c '", Fred scans the .log file for the
  86.     next error line. If this flag is set, the .log file will be scanned from
  87.     the top each time (slower, but you may revisit previous errors).
  88.  
  89.  
  90.   Activate the preference window choosing "Customizing->Package Settings->
  91.   LaTeX" in the menu.
  92.   The menu "LaTeX" offers "Compile" and "Next error" (described above)
  93.   and "ShowDVI" which pops ShowDVI to front (and activates it).
  94.  
  95.  
  96.   TIPS (some of my PasTeX setup)
  97.  
  98.   This is my StartTeX DOS script (use with an icon and iconx!)
  99.  
  100.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  101.   run showdvi NOLog on
  102.   if not exists ram:primetex
  103.   makedir ram:PrimeTeX
  104.   copy PrimeTeX: ram:PrimeTeX all quiet
  105.   assign PrimeTeX: ram:PrimeTeX
  106.   endif
  107.   resident tex:bin/latex pure
  108.   run rx tex:rexx/tex-server.rexx
  109.   FrexxEd:fred INIT tex:FrexxEd.default
  110.   rx tex:rexx/quit_tex
  111.   endcli
  112.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  113.  
  114.  
  115.   In your "ShowDVI.config" insert the line:
  116.  
  117.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  118.   f1   rexx:FrexxEdToFront.rexx
  119.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  120.  
  121.   where FrexxEdToFront.rexx is a reference to the file found in the
  122.   FrexxEd/Rexx directory. Copy it to Rexx: or change the key definition
  123.   above.
  124.   Now you can press F1 to get from ShowDVI to FrexxEd.
  125.  
  126.  
  127. HISTORY (REV)
  128.   02.03.95 (2)    Moved the settings to Customizing->Package Settings!
  129.   26.02.95 (1)    Added menu.
  130.                 Added "ShowDVI to front" command.
  131.   07.11.94 (0)    Initial release.
  132.  
  133. BUGS
  134.   I would like to bind the shortcut keys to the menu, but since these are
  135.   global keybindings it doesn't go too well with my other Emacs like
  136.   programs (e.g. the RCS interface).
  137.  
  138. TODO
  139.   The .log file should be killed if the .tex file is killed.
  140.  
  141. SEE ALSO
  142.   Peter Straub's "Mystery" (ISBN: 0-451-16865-8)
  143.