home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD1.iso / Editor / DVD!FX17.LHA / FrexxEd / fpl / LaTeXCompile.FPL.README < prev    next >
Encoding:
Text File  |  1995-05-31  |  6.5 KB  |  167 lines

  1. #############################################################################
  2. File:        LaTeXCompile.FPL
  3. Author:        Jesper Skov
  4. Email:        jskov@iesd.auc.dk
  5. Short:        Provides interface to the PasTeX LaTeX compiler.
  6. Version:    1.5
  7. Date:        30.05.95
  8. Local settings:
  9. Global settings:LaTeX_(compile_dir, port_name, style, auto_save,
  10.                             log_restart)
  11. Keysequence:    "C-c C-c" and "C-c '" (C = ctrl)
  12. Type:        Function, key
  13. Prereq:        FMC.FPL
  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 global 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.  
  91.   Activate the preference window choosing "Customizing->Program->LaTeX"
  92.   in the menu.
  93.   The menu "LaTeX" offers "Compile" and "Next error" (described above)
  94.   and "ShowDVI" which pops ShowDVI to front (and activates it).
  95.  
  96.  
  97.  
  98.   As of version 1.4 this LaTeX interface is a major mode - consult
  99.   FMC.FPL.readme for further information. The default FMC settings are:
  100.  
  101.   latex_mode_ext = "*tex*"
  102.     Recognize *.tex files as LaTeX files and enable LaTeX mode.
  103.  
  104.   latex_mode_exe = "ME("double_mode")"
  105.     Enable double mode when LaTeX mode gets enabled.
  106.  
  107.  
  108.  
  109.   TIPS (some of my PasTeX setup)
  110.  
  111.   This is my StartTeX DOS script (use with an icon and iconx!)
  112.  
  113.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  114.   run showdvi NOLog on
  115.   if not exists ram:primetex
  116.   makedir ram:PrimeTeX
  117.   copy PrimeTeX: ram:PrimeTeX all quiet
  118.   assign PrimeTeX: ram:PrimeTeX
  119.   endif
  120.   resident tex:bin/latex pure
  121.   run rx tex:rexx/tex-server.rexx
  122.   FrexxEd:fred INIT tex:FrexxEd.default
  123.   rx tex:rexx/quit_tex
  124.   endcli
  125.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  126.  
  127.  
  128.   In your "ShowDVI.config" insert the line:
  129.  
  130.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  131.   f1   rexx:FrexxEdToFront.rexx
  132.   --- 8< ---------- 8< ---------- 8< ---------- 8< ---------- 8< ----------
  133.  
  134.   where FrexxEdToFront.rexx is a reference to the file found in the
  135.   FrexxEd/Rexx directory. Copy it to Rexx: or change the key definition
  136.   above.
  137.   Now you can press F1 to get from ShowDVI to FrexxEd.
  138.  
  139.  
  140. HISTORY (REV)
  141.   30.05.95 (5)    Removed two bugs reported by Volker Gûth.
  142.   02.04.95 (4)    Now a major mode.
  143.   21.03.95 (3)    All preference settings are now Global.
  144.   02.03.95 (2)    Moved the settings to Customizing->Program!
  145.   26.02.95 (1)    Added menu.
  146.         Added "ShowDVI to front" command.
  147.   07.11.94 (0)    Initial release.
  148.  
  149. BUGS
  150.   I would like to bind the shortcut keys to the menu, but since these are
  151.   global keybindings it doesn't go too well with my other Emacs like
  152.   programs (e.g. the RCS interface).
  153.  
  154. TODO
  155.   The .log file should be killed if the .tex file is killed.
  156.   
  157.   Volker Gûth:
  158.   If I use the \input or \include command and there is a error in the included
  159.   text, FrexxEd jumps to the correct line, but not in the correct text! I think
  160.   this can not be fixed so simply as the other bugs. TeXedit.rexx has the
  161.   variable "filename" with the name of the file with the error, is it possible
  162.   to use it, or does it cause great problems with the LaTeXNextError, function?    
  163.  
  164. SEE ALSO
  165.   FMC.FPL.readme
  166.   Peter Straub's "Mystery" (ISBN: 0-451-16865-8)
  167.