home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / tex / lametex_.z / lametex_ / lametex / doc / lametex_doc.txt < prev    next >
Encoding:
Text File  |  1992-09-19  |  72.1 KB  |  1,534 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.                                     LameTeX 
  9.  
  10.  
  11.                       A text formatter for special effects 
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.             Combining the magic of PostScript with the ease of LaTeX 
  19.  
  20.  
  21.  
  22.                        Version 1.1 by Jonathan Monsarrat 
  23.  
  24.                                September 19, 1992 
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.                        Copyright 1992 Jonathan Monsarrat 
  45.              Permission is granted to freely distribute or edit any 
  46.                             portion of this manual. 
  47.  
  48.  
  49.  
  50.           Chapter 1 
  51.  
  52.           Getting to Know LameTeX 
  53.  
  54.           Hackers, just skip to the section ``Fast Track''. 
  55.  
  56.           1.1 Copyright 
  57.  
  58.           Don't sell LameTeX  or this documentation,  or use parts of 
  59.           it in programs you sell. Don't even think about selling it. 
  60.           This isn't about money. It's about cool hacking. Permission 
  61.           granted for everything else. Thank you. 
  62.  
  63.           1.2 About Text Formatters 
  64.  
  65.           A  text formatter  is a  program that  helps you  make nice 
  66.           looking reports  and documents.  You write  the document by 
  67.           typing the text into  an editor, adding formatting commands 
  68.           as needed. A formatting command is not meant to be printed. 
  69.           Instead it is interpreted by  the text formatter program to 
  70.           accomplish special tricks such as centering a line of text, 
  71.           that you would  otherwise have to  do by laboriously typing 
  72.           the space bar a number of times. 
  73.             LameTeX  is a  text  formatting program  that understands 
  74.           many of  the most important  text formatting  commands of a 
  75.           popular text formatter, LaTeX. Although not as powerful for 
  76.           normal text formatting, LameTeX  has a number of additional 
  77.           features for special effects. 
  78.  
  79.           1.3 LameTeX is for Special Effects 
  80.  
  81.           That said, if you  want to write a  plain report or do some 
  82.           fancy mathematics, you should use LaTeX instead. LaTeX does 
  83.           a better job for normal-looking  documents (this page is an 
  84.           example  of  a  normal-looking  LaTeX  page),  and  LameTeX 
  85.           version 1.0  is not  capable of  handling some  of the more 
  86.           esoteric LaTeX  functionality like  mathematics and command 
  87.           definition. That's why it's called ``Lame'' TeX! 
  88.  
  89.           1.3.1 What LameTeX Can Do 
  90.  
  91.           LameTeX's specialty is complete  versatility of the printed 
  92.           page. The standard model for  text formatters is that every 
  93.           page  is  necessarily  rectangular.  LameTeX  will  let you 
  94.           format text  inside a  triangular page,  or a  circle page. 
  95.           Just like  professional magazine  editors, you  can include 
  96.           pictures of any shape and ask  the text to flow around them 
  97.           or inside them. 
  98.             These flexible arbitrarily-shaped  margins are PostScript 
  99.           paths. If you don't know PostScript, there is a big library 
  100.           of interesting LameTeX page  margins here. With LameTeX you 
  101.           can fit  several ``pages''  onto one  8.5x11 inch  piece of 
  102.           paper,  so you  can easily  make  index cards,  labels, and 
  103.           half-pages of text. 
  104.             Also, if  you know how  to write  programs in PostScript, 
  105.           LameTeX allows you  to very tightly  integrate your LameTeX 
  106.           commands with your PostScript code. In fact, the PostScript 
  107.           that LameTeX outputs  is nicely formatted  and commented so 
  108.           that  you can  modify it  yourself and  see how  it's done. 
  109.           LameTeX is written with PostScript  version 1, so it should 
  110.           run on all PostScript printers. 
  111.             Finally,  everything  about  LameTeX  is  set  up  to  be 
  112.           compatible  with LaTeX.  LameTeX  can't do  everything that 
  113.           LaTeX can, but the  special stealth commands guarantee that 
  114.           your  fancy LameTeX  document  can be  processed  by normal 
  115.           LaTeX. This allows you to  share it with anyone who doesn't 
  116.           happen  to have  LameTeX. (Better  yet:  give them  a copy; 
  117.           LameTeX is free!) 
  118.  
  119.           1.3.2 What you Need to Know to Learn LameTeX 
  120.  
  121.           LameTeX is a tool to make  things simple. You don't have to 
  122.           be  a  LaTeX  expert  to use  LameTeX,  but  you  should be 
  123.           somewhat  familiar with  some  basic LaTeX  commands before 
  124.           reading this document. 
  125.             You don't  need to  know any  PostScript to  use LameTeX, 
  126.           although there is  a lot extra  you can do  with LameTeX if 
  127.           you can do just a little. 
  128.             You definitely don't  need to know  anything about TeX to 
  129.           use LameTeX. 
  130.             LameTeX is written in C++ and PostScript from scratch. It 
  131.           is not based on  TeX macros or anything  like that. It just 
  132.           happens to  know the  same language  as LaTeX,  and also it 
  133.           snarfs fonts from LaTeX. 
  134.  
  135.           1.4 The Fast Track 
  136.  
  137.  
  138.           If  it's 3  a.m. and  you  are a  juggling, tetris-addicted 
  139.           hacker with a taste for reheated Chinese take-out food, you 
  140.           may want  to skip  to the good  parts. Look  for the Little 
  141.           Wizard  icon for  interesting notes  for experts  who won't 
  142.           need to read this whole manual. 
  143.  
  144.           * The LameTeX  code for  this document, lametex_doc.tex, 
  145.             and all the files it  includes, are good examples of what 
  146.             LameTeX code  looks like.  Read through  it and  you will 
  147.             notice it's  not hard to  make a few  special effects. In 
  148.             general,  just try  lots of  LaTeX commands,  and LameTeX 
  149.             will   either  handle  them   or  attempt  to  skip  them 
  150.             gracefully. 
  151.  
  152.           * Look  in  the  appendix  to  see  what  commands  LameTeX 
  153.             supports  if in  doubt. Warning!  LameTeX lets  you write 
  154.             sloppy code. Try writing your document in LaTeX first, to 
  155.             work the bugs  out of the ``normal  look'' and then start 
  156.             using LameTeX. Then you're  guaranteed that your document 
  157.             will work on both text formatters. 
  158.  
  159.           * Also glance at the section on Stealth Commands, which are 
  160.             LameTeX   commands  over  and   above  the  normal  LaTeX 
  161.             commands. The stealth command 
  162.  
  163.             ignore tells LameTeX to  ignore LaTeX commands it doesn't 
  164.             know and can't skip gracefully. 
  165.  
  166.           * LameTeX  is  written  in  C++,  and  the  code  itself is 
  167.             documented separately. 
  168.  
  169.           * The  PostScript routine  for  breaking a  PostScript path 
  170.             into tiles  is breakpath.ps. And  the formatting language 
  171.             is handled  by format.ps.  You might  find these programs 
  172.             useful  outside of  LameTeX. For  example,  I wrote  a 3D 
  173.             drawing environment which used breakpath.ps for tiling. 
  174.  
  175.           * There is an appendix at the back on installing LameTeX. 
  176.  
  177.           * The author is  a nice guy  who will be  happy to help you 
  178.             out. Send  e-mail to  jgm@cs.brown.edu. I  would like to 
  179.             know  what  you think  of  LameTeX  and if  you  found it 
  180.             useful. I am also accumulating  a list of enhancements to 
  181.             make  to the  program and  would gratefully  receive your 
  182.             ideas on this subject. 
  183.  
  184.           1.5 Major LaTeX Commands LameTeX Cannot Handle 
  185.  
  186.  
  187.           The  most obvious  difference between  the two  programs is 
  188.           that LameTeX will  never hyphenate words,  and will tend to 
  189.           not have quite  as nice spacing as  LaTeX does. LameTeX can 
  190.           only produce PostScript code, and  the code it does produce 
  191.           is complicated and therefore a little long. 
  192.             LameTeX  uses the  LaTeX fonts  and handles  the computer 
  193.           modern font robustly, but  it cannot currently handle other 
  194.           font families  or normal  PostScript fonts.  You cannot use 
  195.           fancy non-ascii characters like the heart and the copyright 
  196.           symbol. 
  197.             You  cannot define  new commands  in LameTeX,  make boxes 
  198.           around   words,   or  use   fancy  document   formats  like 
  199.           ``titlepage'', or  ``letter''. You cannot  do fancy tabbing 
  200.           or horizontal spacing. Math mode is right out. 
  201.             A  lot of  new functionality  will be  added in  the next 
  202.           version  of  LameTeX coming  late  this year,  but  for the 
  203.           moment keep  in mind  that LameTeX  is meant  primarily for 
  204.           placing  special  effects on  rather  basic  documents. Use 
  205.           normal LaTeX, or cut and paste between the two, if you need 
  206.           math mode or  want to nest  lots of TeX  code in your LaTeX 
  207.           files. 
  208.  
  209.  
  210.  
  211.           Chapter 2 
  212.  
  213.           Simple LameTeX Formatting 
  214.  
  215.  
  216.  
  217.           This chapter  introduces to  the essentials  of running the 
  218.           LameTeX  program, but  is  primarily an  overview  of LaTeX 
  219.           buzzwords and syntax. Those grossly familiar with LaTeX can 
  220.           just glimpse  at the  little wizards  and skip  to the next 
  221.           section. 
  222.  
  223.           2.6 Running LameTeX 
  224.  
  225.  
  226.  
  227.           2.6.3 Useful Buzzwords To Know 
  228.  
  229.           A  LaTeX file  is a  text file  full of  the words  of your 
  230.           document, plus  some fancy  formatting commands.  The LaTeX 
  231.           text  formatter  knows  how  to  interpret  the  formatting 
  232.           commands from your LaTeX file and produce a printed result. 
  233.           The filename of  a LaTeX file usually  ends with the suffix 
  234.           ``.tex'' but this is not required. 
  235.             A LameTeX  file is  just like  a LaTeX  file, except that 
  236.           LameTeX has some extra  text formatting commands that LaTeX 
  237.           doesn't  know.  Also,  LameTeX  doesn't  know  all  of  the 
  238.           commands  that  LaTeX  knows.  Fortunately,  for  the basic 
  239.           commands, both programs work  fine. For reference, there is 
  240.           a  complete  list  of  all  text  formatting  commands that 
  241.           LameTeX understands at the end of this document. 
  242.             LaTeX will  understand any  well-written LameTeX document 
  243.           because the  fancy LameTeX  commands are  ``hidden'' inside 
  244.           comments. Any  LameTeX command  that LaTeX  doesn't know is 
  245.           called a stealth command. 
  246.             A big part of LameTeX is being able to make your own very 
  247.           fancy page descriptions. A page  description file is a file 
  248.           full of some  PostScript page descriptions,  written in the 
  249.           PostScript programming language. 
  250.  
  251.           2.6.4 Example 1 - A Plain Vanilla Text File 
  252.  
  253.           LameTeX comes with a number  of example LameTeX files. They 
  254.           all begin with  the prefix ``example'',  then a number, and 
  255.           end with the conventional suffix ``.tex''. 
  256.             Try formatting  the LameTeX  file example1.tex  by typing 
  257.           lametex  example1.tex.  LameTeX  will  process  the  file, 
  258.           converting  it to  the  graphics language  PostScript. Your 
  259.           screen should look something like this: 
  260.               vegas % lametex example.tex 
  261.  
  262.             This is LameTeX, C++ Version pre 1.0 
  263.  
  264.             Processing example1.tex... 
  265.  
  266.             Opening example1.PS for temporary output... 
  267.  
  268.             Including PostScript file /home/jgm/PS/Lametex/page/page 
  269.             _latex.ps 
  270.  
  271.             Making dummy file for snarfing LaTeX fonts... 
  272.  
  273.             Snarfing LaTeX fonts... 
  274.  
  275.             This is TeX, C Version 3.0 
  276.  
  277.             (lametex.tex 
  278.  
  279.             LaTeX Version 2.09 (24 May 1989) 
  280.  
  281.             (/cs/lib/tex/inputs/report.sty 
  282.  
  283.             Document Style `report' (13 Nov 89). 
  284.  
  285.             (/cs/lib/tex/inputs/rep10.sty) 
  286.             (/cs/lib/tex/inputs/titlepage.sty)) 
  287.  
  288.             (/cs/lib/tex/inputs/10pt.sty) (lametex.aux) [ 1 ] 
  289.             (lametex.aux) ) 
  290.  
  291.             Output written on lametex.dvi (1 page, 344 bytes). 
  292.  
  293.             Transcript written on lametex.log. 
  294.  
  295.             This is dvips 5.47 Copyright 1986-91 Radical Eye Software 
  296.  
  297.             ' TeX output 1992.08.22:0325' - lametex.ps 
  298.  
  299.             (tex.pro). [ 1 ] 
  300.  
  301.             ** SNARF! ** 
  302.  
  303.             Created PostScript file example1.ps 
  304.  
  305.             vegas % 
  306.  
  307.             LameTeX has produced a new file, example1.ps that you can 
  308.             print on  any PostScript  printer using  the lpr command. 
  309.             Alternatively,   you   can  view  it   on-line  by  using 
  310.             GhostScript  or some  other  PostScript previewer.  It is 
  311.             recommended that  you always  use a  PostScript previewer 
  312.             before printing, just to make  sure that you get what you 
  313.             want. 
  314.               As part  of the  text formatting  process, LameTeX must 
  315.             acquire the correct  ``official'' LaTeX fonts,  and to do 
  316.             this, it makes a small trojan horse file and tricks LaTeX 
  317.             into  interpreting  it.  The  dummy  file  it  creates is 
  318.             lametex.tex   which  is  formatted  by  LaTeX  to  become 
  319.             lametex.ps.   All  temporary  files  are  deleted  after 
  320.             they're used. 
  321.               You are  welcome to omit  the suffix .tex  if you wish, 
  322.             just as  with LaTeX.  For example,  you could  have typed 
  323.             lametex example1. 
  324.  
  325.             2.6.5 Specifying the Default Page Description File 
  326.  
  327.             The default page description  is the PostScript file that 
  328.             is used to decide what the  page should look like, if you 
  329.             don't  specify a  page description.  You  can use  the -p 
  330.             command line  option to  specify a  new page description. 
  331.             Try  typing  lametex  -p  page_skew.ps  example1.ps  to 
  332.             format  the same  example LameTeX  file with  a different 
  333.             page   description.   You  can   use  any   of  the  page 
  334.             descriptions in the LameTeX page description directory. 
  335.               If you don't  specify the default  page description, it 
  336.             automatically defaults to page_latex.ps. 
  337.               You can use the -t  command to produce plain ASCII text 
  338.             output. Just type lametex  -t yourfile.tex and the result 
  339.             will be placed in yourfile.txt. 
  340.  
  341.             2.7 A Brief Review of LaTeX 
  342.  
  343.  
  344.             Following is a brief review of what normal LaTeX commands 
  345.             look like. You should peek at a real LaTeX manual if this 
  346.             section confuses you. 
  347.               If  you  formatted  example1.tex,  you  saw  that  the 
  348.             printed result  was placed  so that  it lined  up on both 
  349.             columns. Each new  paragraph was indented,  and the title 
  350.             was centered on the page. 
  351.               Take a look at example1.tex, and you will see that the 
  352.             plain LameTeX file  is not nearly  so pretty! LameTeX was 
  353.             responsible  for  doing  the  formatting.  LameTeX shares 
  354.             responsibility  for decision-making  with you,  the user. 
  355.             For  example,  there  is a  special  notation  that makes 
  356.             LameTeX  center  the  title  of  the  document.  A normal 
  357.             LameTeX   document   is  full   of  such  decision-making 
  358.             commands, either to ask for something new, or to override 
  359.             a LameTeX decision (like whether to indent a paragraph). 
  360.  
  361.             2.7.6\documentstyle 
  362.  
  363.             The   most  important  command   in  this  example  is  \ 
  364.             documentstyle{report}. 
  365.               LaTeX  wants  to know  what  kind of  document  you are 
  366.             trying to produce. LameTeX,  it turns out, doesn't really 
  367.             care! All document  styles look the  same to LameTeX, but 
  368.             unfortunately you  must have  the\documentstyle command 
  369.             anyway, just because  that is the way  the cruel world is 
  370.             sometimes. Plus, you need it if you are ever going to run 
  371.             your document through normal LaTeX. 
  372.               There are three  alternate versions of  this command, \ 
  373.             documentstyle [ 10pt ]{report}, 
  374.  
  375.             \ documentstyle [ 11pt ]{report}, 
  376.  
  377.             and \  documentstyle [ 12pt  ]{report}, which specify 
  378.             that the default  font size for this  document will be 10 
  379.             point, 11 point, or 12 point respectively. The real LaTeX 
  380.             text formatter  can do a  lot of other  fancy things with 
  381.             the\documentstyle command, but  this version of LameTeX 
  382.             cannot. 
  383.  
  384.             2.7.7\begin and\end Delimit Environments 
  385.  
  386.             An environment  is an  important LaTeX  concept. It tells 
  387.             LaTeX  where to  start and  stop  doing fancy  stuff. For 
  388.             example, in  the example LameTeX  file example1.tex there 
  389.             are two commands, \ begin{center } and\end{center} 
  390.             . The\begin command  says ``start doing  a fancy thing, 
  391.             which  is to  center  every line.''.  Likewise, the\end 
  392.             command is very important because it tells LaTeX where to 
  393.             stop  centering. We  say that  the text  in-between the\ 
  394.             begin and\end command is ``in a\center environment''. 
  395.               A  shorthand  notation  for an  environment  is  to use 
  396.  
  397.             braces. For example, the line of text 
  398.  
  399.               \ begin{center } this text is centered\end{center 
  400.  
  401.             } 
  402.  
  403.               could be re-written as follows: 
  404.  
  405.               {\center this text is centered} 
  406.  
  407.  
  408.             2.7.8 Text Goes in the\document Environment 
  409.  
  410.             Whenever you  use LaTeX,  you must  place any  text to be 
  411.             printed inside  of a\document  environment. Don't place 
  412.             text  outside of  a\document environment,  although you 
  413.             may place text formatting commands there. 
  414.               The two commands  you will always want  to make part of 
  415.             your    LameTeX   documents   are\documentstyle   and\ 
  416.             document. 
  417.  
  418.             2.7.9 Example 2 - Environments Can Be Fancy 
  419.  
  420.             Try running  the second  example file,  by typing lametex 
  421.             example2.tex. This LameTeX file doesn't have any stealth 
  422.             commands   either.  Like  example1.tex,  it  is  just  a 
  423.             demonstration   that  LameTeX   can  handle  some  pretty 
  424.             complicated normal LaTeX text formatting commands. 
  425.               This   file  contains   some  fancy  environments.  For 
  426.             example, the\verse command  modifies the environment in 
  427.             several ways to allow a natural look to poems. 
  428.               The\enumerate   environment  indents   the  text  and 
  429.             numbers   all  paragraphs   that  begin  with  the\item 
  430.             command. 
  431.  
  432.             2.7.10 Environments Can Be Nested 
  433.  
  434.             Also notice  that the\enumerate commands  can be nested 
  435.             inside one another. Also the\bf command for boldface is 
  436.             nested inside  the\Huge command for  Huge text. Putting 
  437.             the  boldface  environment  inside  the  Huge environment 
  438.             yields text that is both bold and Huge. 
  439.               In general, when  you nest environments,  ``it does the 
  440.             right thing.'' In  general you can trust  LaTeX to do the 
  441.             right thing.  Can you trust  LameTeX? Well  ... you know 
  442.             the old saying: ``Trust your mother. But watch her!'' 
  443.  
  444.  
  445.  
  446.     Chapter 3 
  447.  
  448.     Stealth Commands 
  449.  
  450.  
  451.  
  452.     LameTeX doesn't  understand all  the commands  that LaTeX  does, but it 
  453.     does know  a few  extra that  can be  used for  special graphics. These 
  454.     commands  are called  stealth commands,  and are  used like  any other 
  455.     LaTeX command, except that they appear inside comments! 
  456.       Stealth commands are  difficult to explain,  but easy to demonstrate. 
  457.     Try looking for  examples of stealth  commands inside lametex_doc.tex 
  458.     and the files it includes. 
  459.  
  460.     3.8\begin{stealth} 
  461.  
  462.  
  463.     Normally  it would  be nice  if  you could  make real  comments without 
  464.     LameTeX inserting the text into  your document. This is especially true 
  465.     if  you  are  converting a  LaTeX  file  to LameTeX  and  want  to make 
  466.     extensive use of the  comment symbol to take  out commands that LameTeX 
  467.     cannot handle. 
  468.       So, in  order to begin  a use  a stealth command,  you have  to use a 
  469.     stealth environment  by using\begin{stealth},  which is  the only 
  470.     command that is interpreted by LameTeX  inside a comment but outside of 
  471.     a stealth environment. You cannot just say\stealth. If you want that, 
  472.     use\STEALTH, which will  continue the stealth  environment to the end 
  473.     of the line, and the revert  back to normal. If you begin a\postcript 
  474.     environment  then  the\STEALTH  will  wait for  it  to  end  and then 
  475.     terminate on the next newline. 
  476.       You are welcome to do a\begin{stealth  } at the very beginning of 
  477.     your  document  and  end  it with\end{stealth  }  at  the  end, but 
  478.     although  this  will  be  simpler, it  will  also  mean  that  all text 
  479.     (including  plain  text)  in  your  comments  will  be  interpreted and 
  480.     included in your document.  So to avoid confusion  and mistakes, and to 
  481.     allow you to use real comment, it is best if you actually begin a local 
  482.     stealth   environment  only  when  needed,  and  close  it  immediately 
  483.     afterwards. 
  484.       The stealth command is useful when  you have some plain text that you 
  485.     don't want  normally included in  LaTeX. For example,  in this document 
  486.     whenever it says to  ``look for the little  Wizard icons'' found in the 
  487.     LameTeX  version, the  text referring  to  the icons  is imbedded  in a 
  488.     stealth environment  in comments,  so that  normal LaTeX  will skip the 
  489.     text. 
  490.       Warning!  The  stealth  command does  not  really  start  a delimited 
  491.     environment. For example, if you were to have 
  492.  
  493.     \ begin{Huge }\bf FOO\end{Huge } BAR 
  494.  
  495.     then the FOO would be Huge and  boldface, but the BAR would be neither. 
  496.     This  is  because  the  Huge  environment  serves  as  a  delimiter for 
  497.     everything inside of it. 
  498.       The  stealth  command  is  different.  Unlike  every  other begin/end 
  499.     combination, if you were to say 
  500.  
  501.     %\begin{stealth }\bf FOO\end{stealth } BAR 
  502.  
  503.     then FOO would be boldface, and BAR would also be boldface. 
  504.  
  505.     3.9 Including a PostScript file 
  506.  
  507.  
  508.     You can use  the\includeps command to include  a PostScript file. For 
  509.     example, to  include a file  of PostScript definitions  in gummi.ps you 
  510.     would type the stealth command \ includeps{gummi.ps}. 
  511.  
  512.     3.10 Choosing a Page Description 
  513.  
  514.  
  515.     You can use the\pspage command to include a new page description. See 
  516.     the chapter on pages to learn more about this command. 
  517.  
  518.     3.11 For Fancy LaTeX Stuff 
  519.  
  520.  
  521.     You can tell LameTeX  to ``skip over'' some part  of your file in which 
  522.     you might, for example, imbed LaTeX commands that LameTeX cannot handle 
  523.     or  skip gracefully.  You must  say\begin{ignore }  and use\end{ 
  524.     ignore } inside a stealth environment to do this enclosure. 
  525.  
  526.     3.12 Free text PostScript 
  527.  
  528.  
  529.     You can type any  PostScript commands you want  directly by using the\ 
  530.     postscript  command.  For example,  to  change  the gray  scale  of the 
  531.     printed text,  you can type  \ begin{postscript  } .6 setgray\end{ 
  532.     postscript}. 
  533.       You cannot just say\postscript. 
  534.       There are  a lot  of special  things to  learn about  exactly where a 
  535.     postscript command (like a grayscale) that you supply will be applied. 
  536.  
  537.     3.13 Hacks Just Like Mom Used To Make 
  538.  
  539.  
  540.     Here's a fancier  way to get your  PostScript commands executed exactly 
  541.     where you want them to. Use the\pscmd command to specify a PostScript 
  542.     function to run, and the function will be run exactly in the text where 
  543.     you have specified. 
  544.       You would use this command only  inside a line of text. Between lines 
  545.     of text, just using the\postscript environment is appropriate. 
  546.       Everything  you  type  in a  PostScript  environment  gets  dumped to 
  547.     PostScript, except for the first comment character ' you want to make a 
  548.     comment in your PostScript, make sure to use two ' 
  549.       Read  the  chapter  on  pages  to  learn  how  to  use  this ``direct 
  550.     stranglehold'' on PostScript correctly -- unless you enjoy surprises! 
  551.  
  552.  
  553.  
  554.           Chapter 4 
  555.  
  556.           How Pages are Handled in LameTeX 
  557.  
  558.  
  559.  
  560.           If you're going  to use the fancy  pages included with this 
  561.           release of LameTeX, but not try  to design your own or make 
  562.           any PostScript  hacks, then  you don't  need to  read about 
  563.           LameTeX pages.  However, if you  are going to  try your own 
  564.           hand  at designing  pages  and fancy  graphics,  you should 
  565.           learn a little  bit about how LameTeX  works so that things 
  566.           fit together smoothly. 
  567.             I'd love  to hear  what you've  used LameTeX  for. Please 
  568.           send e-mail to jgm@cs.brown.edu. 
  569.  
  570.           4.14 Behind the Scenes of LameTeX 
  571.  
  572.  
  573.  
  574.           4.14.11 The Page Description 
  575.  
  576.           A Page Description is a short program written in PostScript 
  577.           that defines some  standard stuff about  the page that text 
  578.           gets placed on. 
  579.             Take a  look at  page_latex.ps, which  is the standard 
  580.           plain  vanilla LaTeX-looking  page.  Here are  the routines 
  581.           defined in this file: 
  582.  
  583.           PageShape 
  584.             is a required routine that  defines a PostScript path for 
  585.             the page. A path is basically a squiggle on the page that 
  586.             never gets drawn. It is a closed loop of arbitrary shape. 
  587.             It is pretty easy  to make a simple  path out of straight 
  588.             lines using  the PostScript  moveto and  lineto commands, 
  589.             but it  is possible  to define  a very  complex path with 
  590.             curves and  fancy wiggles also.  You can  read more about 
  591.             paths in  the PostScript blue  book, or chapter  4 of the 
  592.             red book. 
  593.             The PageShape routine should leave  a number on the stack 
  594.             called  a setflat  value.  If your  path  contains fancy 
  595.             curves, it  is going  to get  flattened into  a series of 
  596.             lines using the  PostScript flattenpath operator. Usually 
  597.             ``currentflat 8  mul'' works  fine, although  if you want 
  598.             more preciseness  and think  your printer  can handle it, 
  599.             try smaller  values. If  you don't  understand this, just 
  600.             use ``currenflat 8 mul'' and you should be fine. 
  601.  
  602.           StartPage 
  603.             is  a required  routine that  draws  anything or  sets up 
  604.             anything required at  the beginning of  a page. Feel free 
  605.             to put some fancy graphics here. 
  606.  
  607.           EndPage 
  608.             is  a required  routine that  draws  anything or  sets up 
  609.             anything required  at the end  of the  page. For example, 
  610.             the one in page_latex.ps prints 
  611.  
  612.           InitPage 
  613.             is  not  required.  It is  just  a  simple  enclosure for 
  614.             defining some variables that are all required: 
  615.  
  616.             fillout 
  617.                tells LameTeX  whether you  want to  place text inside 
  618.                the defined path, or outside of it. If you set fillout 
  619.                to true  LameTeX will not  place any  text inside your 
  620.                path. 
  621.  
  622.             evenodd 
  623.                is  a  fancy  PostScript way  of  determining  what is 
  624.                inside and what is outside of  a path. If this is true 
  625.                then it  uses the evenodd  rules; false  means use the 
  626.                winding rule. There's  a description of  what the heck 
  627.                this means  in the PostScript  red book  in Chapter 4, 
  628.                section  6. Basically  setting  this variable  to true 
  629.                means   that  every  part  of  the  path  delimits  an 
  630.                outside-inside boundary. 
  631.  
  632.             BM 
  633.                In the event that fillout  is true, this is the bottom 
  634.                of  the bounding  rectangle that  will be  filled with 
  635.                text. If  parts of  the path  extend below  this given 
  636.                number, it will be reset to be below the path. 
  637.  
  638.             TM 
  639.                In the event that fillout is  true, this is the top of 
  640.                the bounding rectangle that  will be filled with text. 
  641.                If parts of  the path extend  above this given number, 
  642.                it will be reset to be above the path. 
  643.  
  644.             LM 
  645.                In the event that fillout is true, this is the left of 
  646.                the bounding rectangle that  will be filled with text. 
  647.                If parts of the path extend  to the left of this given 
  648.                number, it  will be  reset to  be to  the left  of the 
  649.                path. 
  650.  
  651.             RM 
  652.                In the event  that fillout is true,  this is the right 
  653.                of  the bounding  rectangle that  will be  filled with 
  654.                text. If parts of the path extend to the right of this 
  655.                given number, it will  be reset to be  to the right of 
  656.                the path. 
  657.  
  658.           LeftMarginIcon 
  659.             is not required. I  just use it do  define where the left 
  660.             margin is, in case I want to place an Icon there. 
  661.  
  662.           4.14.12 The Page Cycle 
  663.  
  664.           LameTeX has three modes that it can be in: 
  665.  
  666.          1. In-Between Pages 
  667.  
  668.          2. On a Page, In-Between Lines 
  669.  
  670.          3. On a Page, On a Line 
  671.             The cycle generally goes like this: 
  672.  
  673.          1. LameTeX starts off in ``In-Between Pages'' mode. 
  674.  
  675.          2. In-Between   Pages  mode   processes  commands  until  it 
  676.             encounters any plain  text or LameTeX  command that might 
  677.             require that a new page  be started. When this happens it 
  678.             does the following: 
  679.  
  680.          3. Execute the save command 
  681.  
  682.            (a) Start a page by calling the /StartPage routine. 
  683.  
  684.            (b) Do    some  internal   initialization  and   call  the 
  685.                /PageShape routine 
  686.  
  687.            (c) Change to ``On a Page, In-Between Lines'' Mode. 
  688.  
  689.            (d) On a  Page, In-Between  Lines mode  processes commands 
  690.                until it encounters any  plain text or LameTeX command 
  691.                that might  require that a  new line  be started. When 
  692.                this happens it does the following: 
  693.  
  694.               i. Change to ``On a Page, On a Line'' mode. 
  695.  
  696.              ii. Find a new  line. NOTE: If you  have broken the page 
  697.                  up into two or  more horizontal regions (like page_ 
  698.                  dagger.ps does, then know  that a ``newline'' really 
  699.                  means  a  new  ``open  space  to  put  words''. It's 
  700.                  possible to have ``two new lines'' horizontally next 
  701.                  to one  another. One  goes on  the left  side of the 
  702.                  dagger page description. The next new line starts on 
  703.                  the right side  at the same  horizontal position. If 
  704.                  you don't like this functionality, then don't define 
  705.                  regions   that  have  two   sides  like  the  page_ 
  706.                  dagger.ps.  Instead define  ``two pages''  like how 
  707.                  page_check.ps  works.  The  first  page  will  get 
  708.                  filled before the second is begun. 
  709.  
  710.             iii. Initialize a word list that will contain information 
  711.                  about this  line. The very  first item  on this word 
  712.                  list  will  be  a  command  to  change  to  what  is 
  713.                  considered the proper font when this line was begun. 
  714.  
  715.              iv. If appropriate for each new word or command read in, 
  716.                  it will either add the word  to the word list or add 
  717.                  the command itself to the  word list. For example, a 
  718.                  boldface command  in between  the words  FOO and BAR 
  719.                  gets inserted in the word  list between FOO and BAR. 
  720.                  It also get executed immediately. 
  721.  
  722.               v. Also for each new word read  in, it checks to see if 
  723.                  the word list it is  building overflows the width of 
  724.                  the current line (as defined  in a very fancy way by 
  725.                  the   PostScript   Page  Definition   file  and  the 
  726.                  PostScript path given by /PageShape). If there is an 
  727.                  overflow, or a  natural end of line  given by a text 
  728.                  formatting command, then it does the following: 
  729.  
  730.                  A. Go through  the word  list from  the beginning to 
  731.                     the end and for each  element, either print it if 
  732.                     it is a word,  or execute it if  it is a command. 
  733.                     Since  the  word  list  was  initialized  with  a 
  734.                     font-setting command,  the first  thing this loop 
  735.                     will do is  choose the proper  font. Add a little 
  736.                     space  between words  if text  is supposed  to be 
  737.                     fully justified. 
  738.  
  739.                  B. If the cause of printing  this line was a natural 
  740.                     end of line, then go to step 3.3. 
  741.  
  742.                  C. Otherwise,  create  a  new  word  list,  and keep 
  743.                     cycling in ``On a Page, On a Line'' mode. 
  744.  
  745.            (e) Eventually, going to  a new line  means falling off of 
  746.                the  bottom  of the  page,  and  a we  change  back to 
  747.                ``In-Between pages mode'', and do the following: 
  748.  
  749.          4. Execute the restore command 
  750.  
  751.          5. End a Page by calling the /EndPage routine. 
  752.  
  753.          6. Go to step 2. 
  754.             LameTeX horizontally aligns the  words by remembering all 
  755.           the words on the current  line, and then printing the whole 
  756.           line at once when the line gets filled up. Printing all the 
  757.           words at once means that it  can be smart enough to justify 
  758.           the text to exactly match both margins. 
  759.             There is no concept  of vertical alignment. Unlike LaTeX, 
  760.           LameTeX does not remember all  the lines in a paragraph and 
  761.           then print the paragraph all at once in the right place. 
  762.             The save and restore commands are PostScript operators to 
  763.           do memory management.  Basically what happens  is that when 
  764.           the  restore  command is  encountered,  the  entire current 
  765.           memory of  the printer  is replaced  with what  it was like 
  766.           when the save command was executed. 
  767.             This means that  if you set a  variable in your StartPage 
  768.           routine,   you  will  be   able  to  access  that  variable 
  769.           throughout the length of the page, but you will not be able 
  770.           to access it  in the EndPage  routine. If you  want to have 
  771.           some  always-changing always-remembered  variable  like the 
  772.           page number, use the InitPage and EndPage routines instead. 
  773.             Note that the  InitPage and EndPage  routines are outside 
  774.           of the save-restore loop. So anything that happens in these 
  775.           two routines stays around forever. 
  776.             Which Commands Force A New Page Or A New Line? 
  777.  
  778.           Check it out in Operator.C. Yes, that's a C++ source file. 
  779.           Don't be afraid of it - it  won't hurt you. In this file at 
  780.           the top is a huge table  of command names. The first row is 
  781.           the command name, the second is  a boolean (either a 0 or a 
  782.           1) saying  whether this command  is a  stealth command. The 
  783.           third is a boolean (either a  0 or 1) saying whether or not 
  784.           a new page or new line should be started if this command is 
  785.           executed In-Between Pages or Not-On-A-Line. 
  786.             Also,  all  plain  text  words  force  On-A-Line-ness and 
  787.           On-A-Page-ness. 
  788.             Specifying the Page Description Directories 
  789.  
  790.           LameTeX will  look in  the current  directory to  find page 
  791.           description files or any other  postscript files, but if it 
  792.           cannot find them  you must tell  it where to  look. You can 
  793.           use the  -p command, explained  in the  startup chapter, or 
  794.           set your  environment variable  LAMETEX_PS_PATH to some 
  795.           path  which  will  be searched  for  postscript  files. The 
  796.           current directory  and the  LameTeX main  library directory 
  797.           will always be searched. 
  798.             There is a  great deal more about  this in the PostScript 
  799.           chapter. 
  800.  
  801.  
  802.  
  803.  Chapter 5 
  804.  
  805.  How to Get Normal LaTeX Stuff 
  806.  
  807.  
  808.  
  809.  
  810.  5.15 A Note to TeX Professionals 
  811.  
  812.  
  813.  I love LaTeX.  It's great. I  just learned it  as I was  writing LameTeX. I'm 
  814.  sure TeX is cool too, although I have not gotten around to learning it yet. I 
  815.  was a Scribe Math hacker and have  done lots of letterpress printing. TeX has 
  816.  a bad reputation though. I  thought that learning it would  be so hard that I 
  817.  might  as  well  write  my  own formatter!  Others  think  that  TeX  kind of 
  818.  straight-jackets you into professional documents. 
  819.    Normally that's great.  My Mom isn't around  any more to  clean my room and 
  820.  tell me how  to write professionally.  And a letterpress  doesn't care if you 
  821.  place your letters upside down. 
  822.    But occasionally  (or often if  you're strange like  me) I get  the urge to 
  823.  splash  100 point  type  or stick  random  bugs all  over  the page.  Once to 
  824.  advertise an  event I hung  up a  huge 18 foot  poster taped  together out of 
  825.  PostScript pages. You ever get that urge? 
  826.    Anyway, LameTeX is a fun toy. Just don't take it too seriously. 
  827.    And no, it's not written in TeX macros! 
  828.  
  829.  5.16 The LaTeX Length Parameters 
  830.  
  831.  
  832.  If LaTeX is royalty, then LameTeX is  a prostitute. If you want to change the 
  833.  margins in the middle of the page using\textwidth, LaTeX kind of sticks its 
  834.  nose up at you and says to  go implement your own margin library font program 
  835.  hierarchy system out of  TeX macros. LameTeX just  says ``OKAY!'' and hops in 
  836.  the sack with you. No questions. 
  837.    So feel free  to change a lot  of stuff. LameTeX won't  care. I really urge 
  838.  you to  put random stuff  inside of  a stealth environment,  however, so that 
  839.  normal LaTeX won't balk at it and refuse to serve you. 
  840.    It's like  playing an adventure  game. If you  die, who cares,  it's just a 
  841.  program. But if you don't try various things, you won't have any fun. 
  842.    There is no ``textwidth''  in LameTeX. When you  set textwidth it just sets 
  843.  the  right margin  to 8.5  inches minus  the textwidth  given minus  the left 
  844.  margin. 
  845.    Similarly there is no ``textheight''. When  you set textheight it just sets 
  846.  the  bottom margin  to 11  inches minus  the textheight  given minus  the top 
  847.  margin. 
  848.    Please note that  just like LaTeX, LameTeX  defaults to ridiculous margins. 
  849.  There's a good  chance that if your  margins are large at  all, that the text 
  850.  may not fit inside the page description  path! This is especially true of the 
  851.  page_check.ps page description,  which breaks the page  into boxes that are 
  852.  only and inch wide or so. 
  853.  
  854.  5.17 Tiny Differences from LaTeX 
  855.  
  856.  
  857.  You can't use fine-tune  spacing commands. You won't  get a table of contents 
  858.  anywhere, and you can't do table and figures. 
  859.    \vspace  is  meant to  give  the  absolute vertical  distance  between the 
  860.  current line and the last line (or top of  page). If you use two of them in a 
  861.  sequence, you're likely to have the larger one apply only, not both together. 
  862.    There is no concept of ``glue'' in LameTeX. I bent over backwards trying to 
  863.  make it possible  to put a  backslash next to  a command when  I want to type 
  864.  something like\myfancycommand.  Unfortunately, LameTeX  views these  as two 
  865.  tokens from which  the space in-between  has been ``deleted''.  It's happy to 
  866.  break a  line in  the middle. You'll  probably see  that scattered throughout 
  867.  this document. It only happens when  you print the special characters\% ,\ 
  868.  _ , and  the like. This ``ungluing''  will also occur if  you change fonts or 
  869.  change environments in any way in the middle  of a word. So if my sentence is 
  870.  in italic but  the period at  the end of  the sentence is  in roman type, the 
  871.  period might be placed on a newline by itself! 
  872.    In general, LameTeX  will occasionally screw  up the spacing.  Oops. No, it 
  873.  doesn't do kerning! Geez ... 
  874.    To  avoid  this  it's  best to  include  sentence  punctuation  in whatever 
  875.  environment happens to precede it. For  example, use ``Pay me in {\em cash. 
  876.  }'' instead of ``Pay me in {\em cash}.'' 
  877.    You can't make  small caps, typewriter,  or sans serif  font into italic or 
  878.  bold face. I  didn't know it was  possible until recently so  I didn't put it 
  879.  into the program. 
  880.    LameTeX is  quite happy  to give you  widows and  orphans. If  this sort of 
  881.  thing keeps  you awake  at night,  you are  taking LameTeX  too seriously and 
  882.  should go play  Tetris until you go  insane (this doesn't  take long). If you 
  883.  don't know what widows and orphans are, good. I won't tell you. 
  884.  
  885.  5.18 PostScript is a Great Language, Too Bad it Sux 
  886.  
  887.  
  888.  I love PostScript. LameTeX makes  extensive use of the PostScript programming 
  889.  language. I  think PostScript  is great.  However, when  a PostScript program 
  890.  breaks, your printer is more likely to say ``ARGH'' or silently start whining 
  891.  rather than to  print out some  message like ``I  say, old man.  You've got a 
  892.  spot of  trouble on line  36 you see.  It seems (if  I may venture  to take a 
  893.  liberty) that  you made a  misspelling error in  the word 'sux'.''  If it's a 
  894.  LameTeX bug then get in  touch with me and I'll try  to fix it. But if you're 
  895.  hacking PostScript  through LameTeX  it's very easy  to screw  things up. The 
  896.  solution is not to get scared and stop playing with it. Send me some mail and 
  897.  we'll work it out together. Chances  are I forget to document some assumption 
  898.  I'm making somewhere  about how to  use the cool  PostScript routines. Once I 
  899.  tell you about it things will be fine. 
  900.  
  901.  5.19 LameTeX Fonts 
  902.  
  903.  
  904.  To  get  different  fonts in  LameTeX,  you  can just  use  the  normal LaTeX 
  905.  font-changing  operators.  It  is  not  possible  right  now  to  get  normal 
  906.  PostScript fonts using a LameTeX operator. However there is a cool workaround 
  907.  if  you  want to  try  it out.  The  program  originally worked  that  way on 
  908.  PostScript fonts but then I figured  that people would really really want the 
  909.  normal LaTeX fonts, so I put those  in, instead. For sure the next version of 
  910.  LameTeX will allow  the user to choose  ``normal'' scaleable PostScript fonts 
  911.  instead of the somewhat tedious LaTeX  bitmaps. Documents which used only the 
  912.  scaleable fonts would be much smaller and compile faster. 
  913.    It is  possible for  you to  make your  own PostScript  hack to  change the 
  914.  appearance of a word,  and this can certainly  include using a scaleable font 
  915.  if you wish. This is described in the hacks chapter with the command\pscmd. 
  916.    LameTeX is very versatile about  changing margins in mid-document and stuff 
  917.  like that. 
  918.  
  919.  5.20 Getting References 
  920.  
  921.  
  922.  LameTeX allows  you to  use the  LaTeX commands\ref  and\label, but not\ 
  923.  pageref.  If you  have forward  references, you  do not  need to  run LameTeX 
  924.  twice. LameTeX  is smart enough  to do its  own recovery if  you have forward 
  925.  references. Pretty neat, huh? 
  926.  
  927.  
  928.  
  929.  Chapter 6 
  930.  
  931.  Including Your Own PostScript Hacks 
  932.  
  933.  
  934.  
  935.  Let's face it.  This manual is nice,  but let's get into  the nitty gritty of 
  936.  the examples  presented here and  maybe I  can show you  how to  do some cool 
  937.  stuff with LameTeX. If  you have questions, we can  chat in person over mail. 
  938.  Here goes. 
  939.  
  940.  6.21 How to Use Include Files To Do Stuff 
  941.  
  942.  
  943.  This manual can be  formatted by running either LaTeX  or LameTeX on the file 
  944.  lametex_doc.tex. There  are a  lot of  other files,  but lametex_doc.tex 
  945.  includes them using the LaTeX command\include. 
  946.    While  reading this  section on  examples,  you will  probably want  to run 
  947.  LameTeX over just one chapter, not all  of them. If you edit the file lametex 
  948.  _doc.tex you can ``comment out'' everything  you don't want. For example, if 
  949.  you wanted to run LameTeX over the  chapter on pages, you could edit the file 
  950.  so that it looked like: 
  951.    \documentstyle{report } 
  952.  
  953.  \setlength{\textwidth}{6 in } 
  954.  
  955.  \setlength{\textheight}{9 in } 
  956.  
  957.  \setlength{\topmargin}{0 in } 
  958.  
  959.  \setlength{\oddsidemargin}{0.25 in } 
  960.  
  961.  %\begin{stealth }\includeps{icons.ps }\end{stealth } 
  962.  
  963.  \begin{document } 
  964.  
  965.  %\include{titlepage } 
  966.  
  967.  %\include{introduction } 
  968.  
  969.  %\include{starting } 
  970.  
  971.  %\include{stealth } 
  972.  
  973.  \include{pages } 
  974.  
  975.  %\include{normality } 
  976.  
  977.  %\include{hacks } 
  978.  
  979.  %\include{future } 
  980.  
  981.  %\include{errors } 
  982.  
  983.  %\include{commands } 
  984.  
  985.  \end{document } 
  986.  
  987.  Notice  how all  the  chapters, except  for  pages.tex, have  been  placed in 
  988.  comments using the  '%' character. This  means that both  LaTeX and LameTeX 
  989.  will ignore them. 
  990.  
  991.  6.22 White Text Hack 
  992.  
  993.  
  994.  Look in titlepage.tex, just before where  it says ``Copyright 1992''. Here is 
  995.  a demonstration of changing the color of the text so that it is white instead 
  996.  of black. This  is done using the  special LameTeX stealth commands\stealth 
  997.  and\postscript. 
  998.    All the  stealth commands  are located inside  comments so  that the normal 
  999.  LaTeX  won't see  them. So  I have  to start  a stealth  environment, because 
  1000.  without that none  of the other commands  I type inside  the comments will be 
  1001.  interpreted. 
  1002.    Then I start  a postscript environment.  From that point  on, everything in 
  1003.  the file gets dumped directly to the postscript output. So ``1 setgray'' gets 
  1004.  included  directly in  the  PostScript output  file.  This is  the PostScript 
  1005.  command to paint things white, not black. 
  1006.    Naturally after the one line has been painted white, I must put the default 
  1007.  color back to black or else my whole document will be in white! The\stealth 
  1008.  and\postscript  environments  are  special  because  they  don't  as  scope 
  1009.  delimiters for internal changes. 
  1010.    So if you did a  boldface in a Huge environment  you'd expect that when the 
  1011.  Huge environment  ended, that  the boldface would  go away.  The ``scope'' of 
  1012.  boldface  was  limited to  the  Huge  environment.\stealth and\postscript 
  1013.  don't limit scope like that. 
  1014.    Here's a trick to try out.  Try placing the words ``Copyright 1992'' before 
  1015.  the ``1 setgray'' line and  the words ``Jonathan Monsarrat'' afterwards. What 
  1016.  happens? Does ``Copyright 1992'' come out in white or black? 
  1017.    The answer  is that is  comes out in  white, and  if you refer  to the Page 
  1018.  chapter I  can show you  why. LameTeX  is trying to  center this  line on the 
  1019.  page. To  do that  it needs  to know  how long  this line  is. So  instead of 
  1020.  printing out the words one at a time, LameTeX stores the words in a big list, 
  1021.  and then  prints them at  the end once  the line has  been completed. LameTeX 
  1022.  always does this. 
  1023.    So in the  modified version I asked  you to make, first  a procedure to get 
  1024.  the correct font is put on the  word list. Then ``Copyright'' is added to the 
  1025.  word list. Then ``1992'' is added. So far, nothing has been printed. Then the 
  1026.  ``1 setgray'' gets executed. Then ``Jonathan'' and ``Monsarrat'' get added to 
  1027.  the word list. Finally we reach the end  of the line, and when the whole line 
  1028.  prints out, all four words are in white because of the ``1 setgray'' command. 
  1029.    The word list,  as well as having  words and commands on  it, can also have 
  1030.  numbers. A number  on a word list  means to move  over an amount horizontaly. 
  1031.  The\hspace command and others add in horizontal whitespace in this way. 
  1032.  
  1033.  6.23 The Dagger Hack 
  1034.  
  1035.  
  1036.  LameTeX is written  for PostScript version 1  because I wanted  it to work on 
  1037.  all PostScript printers.  I love PostScript  but it was  very awkward to work 
  1038.  with. For one  thing, PostScript 1  doesn't have very  good memory management 
  1039.  tools. If you're not careful, even a simple hack like piping a thousand words 
  1040.  through a  small program  and printing  them will  take up  a lot  of memory, 
  1041.  because each word  is stored in a  string, and that  string is never deleted, 
  1042.  not even when the string is printed and cannot be accessed. 
  1043.    Fortunately, there  is a workaround.  LameTeX uses  the PostScript commands 
  1044.  save and restore to do memory cleanup. If  it didn't, it would use up so much 
  1045.  memory that  your document  could not  print out  if it  were long.  The save 
  1046.  command takes a snapshot of the current state of computer (or printer) memory 
  1047.  and the restore command erases the current state and returns the computer (or 
  1048.  printer)  to exactly  the  state it  was  in whe  the  last save  command was 
  1049.  executed. 
  1050.    This happens  at the beginning  and end of  each page, as  mentioned in the 
  1051.  chapter on Pages. 
  1052.    Now here's an interesting question for  you. I have this immense picture of 
  1053.  a dagger that I  want to include in  my PostScript page. I  want text to flow 
  1054.  around the dagger. What should I do? 
  1055.    Look in stealth.tex and  page_dagger.ps to find the  answer. If I were to 
  1056.  place the huge Dagger routine outside  of a save-restore block, then it would 
  1057.  hang around in memory forever, even if I didn't intend to use that particular 
  1058.  picture any more in my document. This would be unclean. What I really want to 
  1059.  do is to  insert the Dagger  picture, including the  definition - because the 
  1060.  definition takes  up a  lot of  room too  as well  as variables  - inside the 
  1061.  StartPage routine. 
  1062.    The StartPage routine gets called after the save and before the restore. So 
  1063.  whatever  garbage I  throw into  memory  drawing the  dagger will  neatly get 
  1064.  erased at the end of the page. 
  1065.    Also  there is  the matter  of the  path defined  in PageShape.  The dagger 
  1066.  itself is some 200 lines of curveto  commands! This is way too much curviness 
  1067.  and way too detailed for something as  macroscopic as placing text. So I have 
  1068.  drawn an irregular polygon around the  dagger. The polygon works just as well 
  1069.  for the simple  blocky task of placing  text around the dagger.  Plus it is a 
  1070.  lot simpler because it is made entirely of straight lines. 
  1071.    You can view this  path by uncommenting the  line where it says ``Uncomment 
  1072.  me'' in page_dagger.ps. 
  1073.    Actually  the  description  of  the  dagger  itself  gets  thrown  into the 
  1074.  In-Between Page space that  is not cleaned up,  because the StartPage routine 
  1075.  is defined along with the page itself in the In-Between Page space. 
  1076.    One way to get around this I have implemented for page_demon.ps. That is 
  1077.  to have the page description just contain a small bounding box, just like the 
  1078.  description for the dagger.  The actual drawing of  the fancy demon I include 
  1079.  in normality.tex, once  on each of the  three pages. Why  would I include the 
  1080.  file three times? Doesn't that make my PostScript file bigger? 
  1081.    Yes, that is certainly true. But the demon hack is immense, some 25K of raw 
  1082.  PostScript code. I really  don't want to define  a PostScript routine to draw 
  1083.  all of that.  If I use the  include function, the routines  that draw the get 
  1084.  demon are executed  without ever being saved.  So it's OK to  have a very big 
  1085.  PostScript file as long as  the file is a long  stream of commands. You start 
  1086.  getting  into  trouble  when  you  define  procedures  with  long  streams of 
  1087.  commands. 
  1088.    Unfortunately, this  does indeed  mean that  I have  to ``guess''  where to 
  1089.  place the\include demon.ps command, once for each of the three pages. 
  1090.  
  1091.  6.24 The Titlebar Hack 
  1092.  
  1093.  
  1094.  The best thing  about LameTeX is that  if you want to  do some pretty radical 
  1095.  stuff, LameTeX  says ``OK! Let's  go for  it!'', whereas TeX  and LaTeX would 
  1096.  probably say ``B-B-But,  why would you  want to do  that? That wouldn't be... 
  1097.  (trumpet flare) professional!'' 
  1098.    Here's  a  great  example. On  the  title  page there  are  two  big hacks, 
  1099.  /Weird-Stuff and /Title. Both of these  PostScript programs take a string off 
  1100.  of the stack and display it in an unusual way. 
  1101.    Using these two  programs is as  simple as starting  a stealth environment, 
  1102.  starting a postscript environment, and then just inserting the commands! 
  1103.    NOTE: Notice  how the LameTeX  title has  holes in it!  An omen?  A sign of 
  1104.  portent about the program itself? 
  1105.    Also note that  of course I put  all of the major  graphics coding into the 
  1106.  StartPage routine, including the definitions, so that when they are no longer 
  1107.  needed these definitions will be  erased. The definitions persist between the 
  1108.  save and restore,  and since all the  printed text on  the page comes between 
  1109.  the  save and  restore,  I can  still call  these  routines from  the LameTeX 
  1110.  document as long  as I do it  before the restore  command associated with the 
  1111.  EndPage. 
  1112.  
  1113.  6.25 Page Number Hack 
  1114.  
  1115.  
  1116.  This hack is the logical opposite of the dagger hack. With the dagger hack, I 
  1117.  wanted to stuff a lot of PostScript  code into the /StartPage routine, get it 
  1118.  to draw some stuff, and then destroy it. 
  1119.    With the page number, I want the  page number to be preserved across pages. 
  1120.  It would  be a  crime if  I changed  page number  2 to  3, and  then when the 
  1121.  restore command came along it reverted back  to 2! So instead of placing this 
  1122.  code in /StartPage, it goes in /EndPage instead. 
  1123.    The /EndPage routine gets  called after the restore  from the previous page 
  1124.  and  before the  save  from the  next page.  It's  in-between pages,  and any 
  1125.  variables  changed  here,  like  pagenumber,  will  remain  around.  Also the 
  1126.  InitPage routine gets called  before the first save is  done for the page, so 
  1127.  it is in-between pages also. 
  1128.    Here's another quirk to  inbetween-pages. When you're on  a page, a special 
  1129.  dictionary is used called  formatdict. A dictionary is  just a place to store 
  1130.  variables in  PostScript. These variables  are accessed  directly like normal 
  1131.  variables when you're  on a page. But  in-between, you need  a special way to 
  1132.  get  at  the variables.  One  exception:  InitPage does  have  access  to the 
  1133.  variables directly,  which is  how it sets  formatdict variables  like BM and 
  1134.  evenodd without using dictionaries. 
  1135.    For example, if I want the  bottommargin, I can't just say ``bottommargin'' 
  1136.  to  put  the  bottommargin  onto  the  stack.  I  have  to  say  ``formatdict 
  1137.  /bottommargin  get'', which  does the  same  thing. If  you are  a PostScript 
  1138.  expert, you'll know what I  say when I note that I  do this to keep plenty of 
  1139.  room open in the generic user dictionary. 
  1140.  
  1141.  6.26 The Format Dictionary 
  1142.  
  1143.  
  1144.  The most important variables in the format dictionary are: 
  1145.  
  1146.  baselineskip 
  1147.     The number of lines to skip between lines. 
  1148.  
  1149.  bottommargin 
  1150.     The  margin at  the bottom  of the  page. The  LaTeX words  textheight and 
  1151.     textwidth don't mean  anything to LameTeX. They  get translated into left, 
  1152.     right, top, and bottom  margins on the assumption  that the textheight and 
  1153.     textwidth commands apply to a normal-sized 8.5x11 inch paper. 
  1154.  
  1155.  bslot 
  1156.     The X coordinate of the left hand side of the current line. 
  1157.  
  1158.  coords 
  1159.     A very complex representation of the page path. 
  1160.  
  1161.  eslot 
  1162.     The X coordinate of the right hand side of the current line. 
  1163.  
  1164.  justify 
  1165.     An  integer,  can be  102  (or 'f')  for  full  justify, 99  (or  'c') for 
  1166.     centered, 114 (or 'r') for flush right, or 108 (or 'l') for flush left. 
  1167.  
  1168.  leftmargin 
  1169.     The margin  at the  left hand side  of the  page. There  is no distinction 
  1170.     between evensidemargin and oddsidemargin. 
  1171.  
  1172.  newfontcmd 
  1173.     The command of the  ``currently used font'', which  doesn't really have to 
  1174.     be a font command at all. 
  1175.  
  1176.  para 
  1177.     Whether the end of this line will mark a new paragraph. 
  1178.  
  1179.  parindent 
  1180.     The amount of indentation for the first line of each paragraph. 
  1181.  
  1182.  parskip 
  1183.     The amount of vertical space to skip in-between paragraphs. 
  1184.  
  1185.  rightmargin 
  1186.     The margin at the right hand side  of the page. The LaTeX words textheight 
  1187.     and textwidth  don't mean  anything to  LameTeX. They  get translated into 
  1188.     left, right, top, and bottom margins on the assumption that the textheight 
  1189.     and textwidth commands apply to a normal-sized 8.5x11 inch paper. 
  1190.  
  1191.  savetype 
  1192.     The currently saved state, saved by the save command. 
  1193.  
  1194.  topmargin 
  1195.     The margin at the top of the page. 
  1196.  
  1197.  vspace 
  1198.     The amount of vertical space to skip for the next paragraph. 
  1199.  
  1200.  welem 
  1201.     The number of elements in the word list. 
  1202.  
  1203.  wlen 
  1204.     The total  length of all  the words in  the word list,  including a single 
  1205.     space between each word. 
  1206.  
  1207.  wlist 
  1208.     The word list itself.  Feel free to mess around  with it. Please make sure 
  1209.     to set ``welem'',  ``wlen'', and ``woids'' to  appropriate values or it'll 
  1210.     break! The correct way to  add stuff to wlist is  put doing an indexed get 
  1211.     and put into the array. The maximum  length of wlist is 100 elements. It's 
  1212.     defined at the top of format.ps if you want to change it. 
  1213.  
  1214.  woids 
  1215.     The number of elements in the word list that are actually words. 
  1216.  
  1217.  xpos 
  1218.     The current X position. 
  1219.  
  1220.  ypos 
  1221.     The current Y position of this line. 
  1222.  
  1223.  6.27 The Icon Hack 
  1224.  
  1225.  
  1226.  Notice   how   each  page   description  has   a  different   definition  for 
  1227.  LeftMarginIcon. This is because each page is a little different and "where to 
  1228.  put icons in the left margin" varies a little. 
  1229.    So putting the little Wizard in the text is as simple as starting a stealth 
  1230.  environment,    starting   a   postscript   environment,   and   called   the 
  1231.  /LeftMarginIcon routine to display the Wizard. 
  1232.    Notice that the LeftMarginIcon uses one (or two) formatdict variables: ypos 
  1233.  (and maybe  bpos). Because  the LeftMarginIcon  routine is  being called from 
  1234.  inside the page,  there is no  need to do  a fancy dictionary  lookupt to get 
  1235.  their values. 
  1236.  
  1237.  6.28 Doing it Yourself in PostScript 
  1238.  
  1239.  
  1240.  If you  want to  schlep a  word onto  the wordlist,  say ``(elephantine) NW'' 
  1241.  which is the PostScript  command that puts the  word ``elephantine'' onto the 
  1242.  word list. A space will automatically be added for you. Do not put a space in 
  1243.  your words. Instead use two PostScript  calls. For example, do not say ``(ice 
  1244.  cream) NW''. Instead say ``(ice) NW (cream) NW''. 
  1245.    If you  have a really  long sentence, then  you can just  say ``(ice cream) 
  1246.  Parse''. Parse is a PostScript routine that will break a string up by spacing 
  1247.  into ``(ice) NW (cream) NW''. 
  1248.    If you want to schlep some horizontal whitespace onto the wordlist, you can 
  1249.  use the LaTeX\hspace  command. If you  really want to  do it in postscript, 
  1250.  then ``54.0 HSpace'' is the PostScript command to add 54 points of horizontal 
  1251.  space to the word list. There are 72 points in an inch. 
  1252.    Also, naturally  you can  gronk the value  of any  of the  variables in the 
  1253.  fontdict directly. Grok-p? Keep in mind that if you change them in PostScript 
  1254.  instead of in LameTeX,  then LameTeX will ``lose track''  of them and may not 
  1255.  reset them for you. You  will have to put them  back to their original values 
  1256.  yourself. 
  1257.  
  1258.  6.29 Using\pscmd to Do It When You Want It 
  1259.  
  1260.  
  1261.  the  white-painting applied  to the  whole line,  not just  parts of  it. You 
  1262.  couldn't paint just part of a line white. 
  1263.    Well, here's  how. I'm going  to tell you  twice. This section  is the easy 
  1264.  slick way. The  next section tells  you the same  thing, if you  want to get 
  1265.  your hands dirty, which I encourage. 
  1266.    Anyway, for the easy way, take a look at example5.tex. 
  1267.    Here I  define a  command /Smiley that  alternately either  draws a picture 
  1268.  without changing the currentpoint, or calls READJUST. 
  1269.    Sometimes LameTeX will  be building a line  made out of  10 point type when 
  1270.  suddenly the user wants to get 30 point type. Well, since the line started on 
  1271.  this 10 point line, all the 30  point letters are too tall and will overwrite 
  1272.  the previous line just above the  current line! There is a PostScript command 
  1273.  that LameTeX calls automatically when such oopses occur. That's /READJUST. It 
  1274.  takes a  vertical length  to skip  from the  stack, in  points. There  are 72 
  1275.  points in  an inch. I  have some  command ``in'' defined  somewhere that just 
  1276.  multiplies any number by 72 to convert it into points. 
  1277.    You can call  /READJUST yourself no problem.  For example, I  do it here in 
  1278.  example5.tex to make the line tall enough to accept the smiley face. 
  1279.    Don't  forget! At  the  end of  every page,  everything  gets wiped  by the 
  1280.  PostScript restore routine. Here  Smiley is defined On-Page  in the middle of 
  1281.  page 1. On  page 2 it  would be undefined.  If you want  your routine to hang 
  1282.  around for page two,  you either need to define  it In-Between Pages (the bad 
  1283.  wicked way) or define it in /StartPage (the good way of lightness and being). 
  1284.    Notice that the\pscmd command in placed inside braces. This delimits what 
  1285.  is now  the ``Smiley''  environment. For example,  if Smiley  had changed the 
  1286.  font,  the font  change would  have  remained in  effect until  the end-brace 
  1287.  delimiter. The way this is implemented is really for fonts, and being able to 
  1288.  add your own PostScript functions is not something I had envisioned at first. 
  1289.  I will  fix this  later, but for  the time  being realize  that your function 
  1290.  Smiley, if it  not delimited, will be  executed at the  beginning of each new 
  1291.  line. Also, any font  changes like italics or  boldface will kill your Smiley 
  1292.  environment. Try taking  out the braces  around the\pscmd and  you will see 
  1293.  what I mean. 
  1294.    I hope you can see  how you could use this  to include really big pictures, 
  1295.  not just small  smiley faces. You get  to have complete  control over how big 
  1296.  the picture is, by passing its width and height to READJUST. Alternately, you 
  1297.  can modify the wlist  array directly if you  want something special. In later 
  1298.  versions,  the  READJUST  command  will  be  able  to  handle non-rectangular 
  1299.  boundaries just like pages do. 
  1300.    There is no way to do this currently  unless you modify the Page on the fly 
  1301.  by defining the ``current  page'' as something new  (including the box around 
  1302.  the Smiley'' and forcing a re-assessment of the dimensions of the page. 
  1303.    Here are the rules for a routine that you use with\pscmd: 
  1304.  
  1305. 1. When your routine is called, the currentpoint  will be set to where the next 
  1306.   word would normally  be placed. Make  sure that the  currentpoint is defined 
  1307.   when your routine is finished. You  can accomplish this neatly by just doing 
  1308.   a Postscript ``gsave'' at  the beginning of your  routine and a ``grestore'' 
  1309.   afterwards. 
  1310.  
  1311. 2. Don't  forget  that you  have  access to  the  entire word  list  and format 
  1312.   dictionary. 
  1313.  
  1314. 3. When your routine  gets called, either false  or true will  be on the stack. 
  1315.   The  value  will be  ``false''  if LameTeX  is  building the  word  list and 
  1316.   ``true'' if LameTeX is printing the word  list. You gotta either use this or 
  1317.   pop if off the stack by making  the first command in your PostScript routine 
  1318.   be ``pop''. 
  1319.  
  1320. 4. When you  split up  a word,  like by  saying Will  you be  my SWEET  \ pscmd 
  1321.   /drawheart HEART? LameTeX will make an attempt to put Sweet and Heart all in 
  1322.   the same  word. It  won't try  really hard  though. There  is no  concept of 
  1323.   ``glue''  in LameTeX.  I gotta  add this  sometime soon.  So if  a pagebreak 
  1324.   occurs, or a  line break, LameTeX  will gladly put  SWEET at the  end of one 
  1325.   line and HEART at the beginning of another. Oops! 
  1326.  
  1327.  6.30 Behind the Scenes of\pscmd 
  1328.  
  1329.  
  1330.  Remember the  ``Word List''? You  too can  schlep things onto  the word list. 
  1331.  This is exactly what the\pscmd does, but if for some reason it doesn't work 
  1332.  or you want to  try fiddling with the  PostScript code directly, it's simple. 
  1333.  Here's how. 
  1334.    The most interesting part is schlepping  a command onto the word list. Take 
  1335.  a look at example3.tex. 
  1336.    To  schlep a  command onto  the word  list,  I have  to first  register the 
  1337.  command by placing it onto the end of the fontnames array. From now on I just 
  1338.  refer to this command by its number which I store in the variable FUNKYnum. 
  1339.    The actual syntax for schlepping a command onto the world list is to say `` 
  1340.  [ FUNKYnum false  ] NewFont'', where FUNKYnum  is an index  to my function in 
  1341.  the fontnames  array, and the  boolean is  false if I  want LameTeX  to add a 
  1342.  space after this NewFont  command. If the boolean  is false then LameTeX puts 
  1343.  no space between a word before the NewFont command and a word afterwards. 
  1344.    The line  `` [  temp false ]  NewFont'' is  important. Once  I have started 
  1345.  playing God with  the LameTeX PostScript  code, I should  remember to put the 
  1346.  font back to the way it was. 
  1347.    I hope  it's obvious that  the routine  would't have to  be a Font-changing 
  1348.  routine at all. It could be any routine. Here are some things to keep in mind 
  1349.  though. Remember the flow  chart from the chapter  on pages? The routine will 
  1350.  be executed twice, once when the word  list is being compiled, and once when 
  1351.  the word list is being printed. 
  1352.  
  1353.  6.31 The Wigglies Hack: using SHOWIT 
  1354.  
  1355.  
  1356.  I have  written a PostScript  hack called  format.ps that does  all the major 
  1357.  formatting for LameTeX. The command that it  uses to show words is the SHOWIT 
  1358.  routine, which is defined as follows: ``/SHOWIT { show } bind def''. 
  1359.    Feel free to redefine this routine if  you want to change the way the words 
  1360.  look in any way. The routine will  be called with the currentpoint set to the 
  1361.  appropriate place and the string to be printed on the stack. 
  1362.    I wrote a cool hack based on  this. Try it out with example4.tex. And don't 
  1363.  forget: When you  play God with  LameTeX's PostScript output,  be sure to put 
  1364.  things back! When I have finished hacking up SHOWIT with my own definition, I 
  1365.  put it back by saying ``/SHOWIT { show } bind def''. 
  1366.    You  can't do  this  stuff with  TeX macros!  (Although  you could  argue I 
  1367.  suppose that only a loony would try...) 
  1368.  
  1369.  6.32 Forcing Word Positions with NW 
  1370.  
  1371.  
  1372.  NW is defined as follows: ``/NW  NextWord bind def''. NextWord is the routine 
  1373.  that is called repeatedly, once for each word, to place the words in the word 
  1374.  list.  Feel free  to modify  this routine  too  if you  want to  perform some 
  1375.  operation to the strings before they get included in the word list. 
  1376.  
  1377.  6.33 The Skew Page Hack 
  1378.  
  1379.  
  1380.  Look in the files starting.tex and  page_skew.ps for an example of diagonal 
  1381.  text.  LameTeX  is not  really  capable of  placing  text in  any  way except 
  1382.  horizontally (unless you redefine the  SHOWIT and NW routines). So therefore, 
  1383.  in order to get diagonal text, the page must be slanted. So although it looks 
  1384.  to the user like the text is slanted and the page is an upright rectangle, to 
  1385.  LameTeX it  appears as  if the page  is a  very wide page  in the  shape of a 
  1386.  diamond on its end. And the text appears horizontally. 
  1387.  
  1388.  6.34 The Checkerboard Hack 
  1389.  
  1390.  
  1391.  Check out example6.tex. Here is an example of two virtual pages being placed 
  1392.  on a  single physical 8.5x11  inch piece of  paper, using a  variable flip to 
  1393.  determine  which virtual  page comes  ``next''. I  hope you  can see  that it 
  1394.  wouldn't be hard  to define several  virtual pages on  a single physical page 
  1395.  (like for making index cards or mailing labels). 
  1396.  
  1397.  6.35 Bugs? 
  1398.  
  1399.  
  1400.  There are no bugs in LameTeX. 
  1401.  
  1402.  
  1403.  
  1404.           Chapter 7 
  1405.  
  1406.           The Future of LameTeX 
  1407.  
  1408.  
  1409.  
  1410.           Most of my  effort was to make  this understand LaTeX code. 
  1411.           Now I can  concentrate on other  functionality, like making 
  1412.           it work better, understand more LaTeX functions, and - best 
  1413.           of all - providing easier  ways to include PostScript hacks 
  1414.           into the document. 
  1415.             I want to try out  some experiments with on-line document 
  1416.           viewing. There's no reason why a TeX-like language like the 
  1417.           Stealth   Commands  couldn't   drive  PostScript  animation 
  1418.           through a  previewer or let  the user include  audio in the 
  1419.           document. 
  1420.             Although  I love  PostScript  dearly, more  coding really 
  1421.           should go  into C++. I'll  let PostScript do  all the fancy 
  1422.           graphics, but  C++ should do  more of  the decision making, 
  1423.           because it  is very difficult  to write  and maintain large 
  1424.           programs in  Postscript version  1.0. I  would make  use of 
  1425.           some  fancy  PostScript  interpreter  to  do  some  of  the 
  1426.           PostScript processing while processing the input file. 
  1427.             LameTeX  should in  general produce  a smaller  output. I 
  1428.           would   like  to  write  a  compress  mode  to  make  sleek 
  1429.           uncommented PostScript. 
  1430.             There is no  glue in LameTeX  currently, which means that 
  1431.           two  words  that happen  to  be  side by  side  may  have a 
  1432.           pagebreak or a  linebreak in-between them.  There is no way 
  1433.           to prevent this in the current version of LameTeX. 
  1434.             You  can't use  a previewer  program  that looks  for the 
  1435.           fancy   Adobe  PageBreak  PostScript  comment.  Sorry.  The 
  1436.           PostScript program  doesn't ``know'' where  the page breaks 
  1437.           are going to come until run time. 
  1438.             I   would   like  to   write  better   tools  and  better 
  1439.           documentation so that people unfamiliar with PostScript can 
  1440.           still try out a few hacks like grayscale or font changing. 
  1441.             Obviously,  LameTeX  should  handle  spacing  better.  It 
  1442.           should  do  vertical  alignment.  LameTeX  should  be smart 
  1443.           enough to handle the TeX hyphenation dictionary and be able 
  1444.           to  handle the  fonts directly,  which are  currently being 
  1445.           done in a big hack that barely works. 
  1446.             Using normal PostScript scaleable  fonts should be simple 
  1447.           and  let the  user save  a  lot of  room in  the PostScript 
  1448.           output file. 
  1449.             The user should  be able to  define new LameTeX commands. 
  1450.           This  includes  normal  ones attach  to  LaTeX  made with\ 
  1451.           newcommand\newenvironment\newtheorem,     and   special 
  1452.           Stealth ones hooked either to C, C++, or PostScript code. 
  1453.             I'm hoping  to hear a  slew of  requests for enhancements 
  1454.           and (ahem) bug fixes! So I should have plenty to do. 
  1455.             I'm going to  have to do  some investigation to  see if I 
  1456.           can ``trick'' LaTeX  or TeX into giving  me a raw paragraph 
  1457.           with a bounding  box. If so,  then I could  hook up a great 
  1458.           deal of  functionality like math  mode by  fooling TeX into 
  1459.           making the output and then snarfing the result. 
  1460.             The token parsing is done all wrong and should be cleaned 
  1461.           up and made to model LaTeX parsing. 
  1462.             TeX is a trademark of the American Mathematical Society. 
  1463.  
  1464.           PostScript is a trademark of Adobe Systems Incoporated. 
  1465.  
  1466.           LameTeX ain't a trademark! 
  1467.  
  1468.  
  1469.  
  1470.           Chapter 8 
  1471.  
  1472.           Errors 
  1473.  
  1474.  
  1475.  
  1476.           If  you get  an error  like this  ``stackoverflow offending 
  1477.           command:  pathforall Stack:  [ /coords  -mark- .....  ] '', 
  1478.           this means that the path you are using for the page is very 
  1479.           curved  and  not particularly  flat.  PostScript  is having 
  1480.           trouble keeping track of all  the points! You should double 
  1481.           or triple the setflat value. 
  1482.             If you  get an  error undefined  in\end, you  ended a\ 
  1483.           begin{postscript }  command with something  else that was 
  1484.           not\end{postscript}. 
  1485.             A lot of problems come from having your margins too wide! 
  1486.           Make sure  that you margins  are small enough  so that your 
  1487.           text will fit around the pictures. 
  1488.             If you get an error ``false false false false false false 
  1489.           false  stack  overflow''  then  you're  using\pscmd  on a 
  1490.           routine that doesn't handle  the incoming boolean. Just add 
  1491.           a PostScript pop to the beginning of the PostScript routine 
  1492.           you call with\pscmd. 
  1493.  
  1494.  
  1495.  
  1496.           Chapter 9 
  1497.  
  1498.           Commands 
  1499.  
  1500.  
  1501.  
  1502.           This   is  the  complete  list  of  commands  that  LameTeX 
  1503.           understands.    It's   formatted  in   an   easy   to  read 
  1504.           alphabetically sorted list. 
  1505.             The    stealth   commands   are:\stealth\postscript\ 
  1506.           includeps\pspage\ignore\pscmd\STEALTH 
  1507.             The normal LaTeX commands are:\#\%\&\Huge\LARGE 
  1508.           \Large\\\_\addtolength\backslash\begin\bf\ 
  1509.           bigskip\center\chapter\chapter*\clearpage\ 
  1510.           description\document\documentstyle\em\end\ 
  1511.           enumerate\flushleft\flushright\footnotesize\hspace 
  1512.           \hspace*\huge\include\input\it\item\itemize\ 
  1513.           label\large\ldots\medskip\newlength\newline\ 
  1514.           normalsize\par\paragraph\paragraph*\part\part*\ 
  1515.           quotation\quote\raggedleft\raggedright\ref\rm\ 
  1516.           sc\scriptsize\section\section*\setlength\sf\sl 
  1517.           \small\smallskip\subparagraph\subparagraph*\ 
  1518.           subsection\subsection*\subsubsection\subsubsection*\ 
  1519.           tiny\today\tt\verbatim\verbatim*\verse\vspace\ 
  1520.           vspace*\\ 
  1521.  
  1522.  
  1523.  
  1524.           Chapter 10 
  1525.  
  1526.           Plain Text 
  1527.  
  1528.  
  1529.  
  1530.           If  you want  to make  LameTeX  produce plain  text output, 
  1531.           which is to say a plain ASCII output, it can do that. 
  1532.             Just type lametex -t yourfile.tex  and the result will be 
  1533.           placed in the file yourfile.txt. 
  1534.