home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 3 / PDCD_3.iso / tex / texsrc2 / Src / README < prev   
Text File  |  1993-02-14  |  16KB  |  411 lines

  1. This file describes web2c, a system which converts TeX, Metafont, and
  2. other WEB programs to C.  It is not a general-purpose Pascal-to-C
  3. translator.
  4.  
  5. The file ./INSTALL contains basic installation instructions.
  6.  
  7. The file ./MACHINES contains a list of known configurations that
  8. have passed the trip and trap test.  If your configuration is not on
  9. this list, you should build triptex and trapmf (instructions below), and
  10. then send mail to karl@cs.umb.edu with the vital statistics, and, of
  11. course, any changes you made, preferably in the form of context diffs,
  12. with ChangeLog entries.
  13.  
  14. The file ./ChangeLog records changes to web2c.  The current version
  15. number of web2c can be found at the beginning of that file (and also in
  16. the Makefile).
  17.  
  18. The file ./PROJECTS describes some improvements to the current setup
  19. that would be nice to have.
  20.  
  21. The file ./PROBLEMS describes various difficulties people have
  22. encountered.  If you have trouble getting the distribution up, look here
  23. first.  You should also look in ./MACHINES.
  24.  
  25. The files ./COPYING* describe copying conditions for some parts of
  26. this distribution.
  27.  
  28. If you know enough about TeX to be reading this, then you (or perhaps
  29. your institution) should consider joining the TeX Users Group.  TUG
  30. produces a quarterly journal (TUGboat), sponsors an annual meeting (the
  31. proceedings of which are published as an issue of TUGboat), and arranges
  32. courses on TeX for all levels of users.  Given sufficient funding (which
  33. your joining will help), TUG could sponsor more projects that will
  34. benefit the TeX community (such as a successor to TeX $\pi$).  Here is
  35. the address:
  36.  
  37. TeX Users Group
  38. P.O. Box 869
  39. Santa Barbara, CA 93102
  40. USA
  41. phone: (805) 899-4673
  42. email: tug@math.ams.org
  43.  
  44.  
  45. Here is a table of contents for the rest of this file:
  46.    Changing constants
  47.    Format files and preloading
  48.    Directory hierarchies
  49.    Online output from Metafont
  50.    Porting and portability
  51.  
  52. Changing constants
  53. %%%%%%%%%%%%%%%%%%
  54.  
  55. The files tex/small.sed and mf/small.sed contain changes to the TeX and
  56. Metafont change files to produce programs using less memory, pool space,
  57. etc. than the defaults.  These patches are applied automatically by
  58. `configure' when you define `SMALLTeX' resp. `SMALLMF' in c-auto.h.in.
  59. The TeX that results (all of this goes for Metafont, too) will have a
  60. larger text segment and run slower, because it has to convert frequently
  61. between 16-bit and 32-bit integers.  On the other hand, the binary will
  62. need much less swap space.
  63.  
  64. Similarly, the file bibtex/small.sed changes some of the constants in
  65. the default BibTeX to smaller values.  The default values are necessary
  66. for some databases (see math.utah.edu:pub/tex/bib), but are rather large.
  67.  
  68. If configure fails to apply the patches, you can do yourself with, e.g.:
  69. % cd tex; sed -f small.sed < tex.ch > ctex.ch
  70.  
  71. You can obtain the patch program, written by Larry Wall
  72. <lwall@jpl-devvax.jpl.nasa.gov> from a comp.sources.unix archive, or by
  73. ftp from his machine (among many other places).  The GNU project has
  74. made some extensions to patch; you can get the GNU version from
  75. prep.ai.mit.edu.
  76.  
  77. If you want to have more than 256 fonts, you might try this patch.  I
  78. haven't installed it in the main change file because it requires
  79. changing max_quarterword.
  80.  
  81. From: Bernd Raichle <raichle@azu.informatik.uni-stuttgart.de>
  82. Date: Mon, 18 May 92 13:27:13 +0200
  83.  
  84. I have applied these diffs to web2c 5.851b with a corrected
  85. WORDS_BIGENDIAN configuration file and *no* changes to `texmfmem.h'.
  86. (Changes are only needed for little-endian machines.)
  87.  
  88. The changed bigTeX is able to load more than 284 fonts before the
  89. font_mem of 100.000 words overflows (it's a good idea to increment
  90. `font_mem_size' when using more than 256 fonts).  `xdvi' and `dvips'
  91. can print the resulted dvi file without problem.
  92.  
  93. The new constant `max_font_max' is necessary, if you want different
  94. values of `font_max' in initex and virtex. (`max_font_max' is the
  95. space reserved in eqtb[] for the font identifiers; in the original
  96. source there is space for 256 font identifier.)
  97.  
  98. -bernd
  99.  
  100.  
  101. *** ctex.ch.ORIG    Fri May 15 12:50:08 1992
  102. --- ctex.ch-32fonts    Fri May 15 15:20:28 1992
  103. ***************
  104. *** 192,195 ****
  105.     can be going on simultaneously}
  106. ! @!font_max=255; {maximum internal font number; must not exceed |max_quarterword|
  107. !   and must be at most |font_base+256|}
  108.   @!font_mem_size=100000; {number of words of |font_info| for all fonts}
  109. --- 192,195 ----
  110.     can be going on simultaneously}
  111. ! @!font_max=450; {maximum internal font number; must not exceed |max_quarterword|
  112. !   and must be at most |font_base+max_font_max|}
  113.   @!font_mem_size=100000; {number of words of |font_info| for all fonts}
  114. ***************
  115. *** 250,251 ****
  116. --- 250,252 ----
  117.   @d hyph_size=607 {another prime; the number of \.{\\hyphenation} exceptions}
  118. + @d max_font_max=512 {maximum number of internal fonts}
  119.   @z
  120. ***************
  121. *** 721,723 ****
  122.   @d min_quarterword=0 {smallest allowable value in a |quarterword|}
  123. ! @d max_quarterword=255 {largest allowable value in a |quarterword|}
  124.   @d min_halfword==0 {smallest allowable value in a |halfword|}
  125. --- 722,724 ----
  126.   @d min_quarterword=0 {smallest allowable value in a |quarterword|}
  127. ! @d max_quarterword==65535 {largest allowable value in a |quarterword|}
  128.   @d min_halfword==0 {smallest allowable value in a |halfword|}
  129. ***************
  130. *** 726,727 ****
  131. --- 727,737 ----
  132.   
  133. + % [8.111]
  134. + @x
  135. + if font_max>font_base+256 then bad:=16;
  136. + @y
  137. + if (max_font_max<min_quarterword)or(max_font_max>max_quarterword) then bad:=15;
  138. + if font_max>font_base+max_font_max then bad:=16;
  139. + @z
  140.   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  141. ***************
  142. *** 870,871 ****
  143. --- 880,888 ----
  144.   
  145. + % [x.222]
  146. + @x
  147. + @d undefined_control_sequence=frozen_null_font+257 {dummy location}
  148. + @y
  149. + @d undefined_control_sequence=frozen_null_font+max_font_max+1 {dummy location}
  150. + @z
  151.   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  152. ***************
  153. *** 1203,1204 ****
  154. --- 1220,1256 ----
  155.   bytes at a time.
  156. + @z
  157. + % [x.602]
  158. + @x
  159. + @p procedure dvi_font_def(@!f:internal_font_number);
  160. + var k:pool_pointer; {index into |str_pool|}
  161. + begin dvi_out(fnt_def1);
  162. + dvi_out(f-font_base-1);@/
  163. + @y
  164. + @p procedure dvi_font_def(@!f:internal_font_number);
  165. + var k:pool_pointer; {index into |str_pool|}
  166. + begin if f<=256+font_base then
  167. +   begin dvi_out(fnt_def1);
  168. +   dvi_out(f-font_base-1);
  169. +   end
  170. + else begin dvi_out(fnt_def1+1);
  171. +   dvi_out((f-font_base-1) div @'400);
  172. +   dvi_out((f-font_base-1) mod @'400);
  173. +   end;
  174. + @z
  175. + % [x.622]
  176. + @x
  177. + if f<=64+font_base then dvi_out(f-font_base-1+fnt_num_0)
  178. + else  begin dvi_out(fnt1); dvi_out(f-font_base-1);
  179. +   end;
  180. + @y
  181. + if f<=64+font_base then dvi_out(f-font_base-1+fnt_num_0)
  182. + else if f<=256+font_base then
  183. +   begin dvi_out(fnt1); dvi_out(f-font_base-1);
  184. +   end
  185. + else begin dvi_out(fnt1+1);
  186. +   dvi_out((f-font_base-1) div @'400);
  187. +   dvi_out((f-font_base-1) mod @'400);
  188. +   end;
  189.   @z
  190.  
  191.  
  192.  
  193. Format files and preloading
  194. %%%%%%%%%%%%%%%%%%%%%%%%%%%
  195.  
  196. TeX (and Metafont; I'll talk about TeX, but MF is completely analogous)
  197. can write its memory to a file; such a file is called a ``format file''.
  198. Why is this interesting?  Because TeX can read a format file much faster
  199. than the source file that gave rise to it.
  200.  
  201. To create a format file, you give the command `\dump' to initex after
  202. reading the source file.  (This is more or less the raison d'etre for
  203. initex.)  For example:
  204. initex
  205. This is TeX, C Version 3.0
  206. **plain \dump
  207. <blurbs>
  208. Starting to dump on file plain.fmt
  209. <more blurbs>
  210.  
  211. Voila, you have a plain.fmt you can install somewhere with `make
  212. install-formats' (or cp, or whatever).
  213.  
  214. The `formats' target in ./Makefile and tex/Makefile does the above for the
  215. formats defined by the make variable $(formats).
  216.  
  217. Unlike all the other files in the TeX world, format files are not
  218. perfectly portable.  web2c itself always writes the format files in
  219. BigEndian order; for formats which do not dump any floating-point (e.g.,
  220. |glue_ratio|) information, this suffices to make them portable across
  221. architectures.  Most formats (including plain) do not do this.  But you
  222. should always check.  (If you do compare format files dumped