home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Datafile PD-CD 3
/
PDCD_3.iso
/
tex
/
texsrc2
/
Src
/
README
< prev
Wrap
Text File
|
1993-02-14
|
16KB
|
411 lines
This file describes web2c, a system which converts TeX, Metafont, and
other WEB programs to C. It is not a general-purpose Pascal-to-C
translator.
The file ./INSTALL contains basic installation instructions.
The file ./MACHINES contains a list of known configurations that
have passed the trip and trap test. If your configuration is not on
this list, you should build triptex and trapmf (instructions below), and
then send mail to karl@cs.umb.edu with the vital statistics, and, of
course, any changes you made, preferably in the form of context diffs,
with ChangeLog entries.
The file ./ChangeLog records changes to web2c. The current version
number of web2c can be found at the beginning of that file (and also in
the Makefile).
The file ./PROJECTS describes some improvements to the current setup
that would be nice to have.
The file ./PROBLEMS describes various difficulties people have
encountered. If you have trouble getting the distribution up, look here
first. You should also look in ./MACHINES.
The files ./COPYING* describe copying conditions for some parts of
this distribution.
If you know enough about TeX to be reading this, then you (or perhaps
your institution) should consider joining the TeX Users Group. TUG
produces a quarterly journal (TUGboat), sponsors an annual meeting (the
proceedings of which are published as an issue of TUGboat), and arranges
courses on TeX for all levels of users. Given sufficient funding (which
your joining will help), TUG could sponsor more projects that will
benefit the TeX community (such as a successor to TeX $\pi$). Here is
the address:
TeX Users Group
P.O. Box 869
Santa Barbara, CA 93102
USA
phone: (805) 899-4673
email: tug@math.ams.org
Here is a table of contents for the rest of this file:
Changing constants
Format files and preloading
Directory hierarchies
Online output from Metafont
Porting and portability
Changing constants
%%%%%%%%%%%%%%%%%%
The files tex/small.sed and mf/small.sed contain changes to the TeX and
Metafont change files to produce programs using less memory, pool space,
etc. than the defaults. These patches are applied automatically by
`configure' when you define `SMALLTeX' resp. `SMALLMF' in c-auto.h.in.
The TeX that results (all of this goes for Metafont, too) will have a
larger text segment and run slower, because it has to convert frequently
between 16-bit and 32-bit integers. On the other hand, the binary will
need much less swap space.
Similarly, the file bibtex/small.sed changes some of the constants in
the default BibTeX to smaller values. The default values are necessary
for some databases (see math.utah.edu:pub/tex/bib), but are rather large.
If configure fails to apply the patches, you can do yourself with, e.g.:
% cd tex; sed -f small.sed < tex.ch > ctex.ch
You can obtain the patch program, written by Larry Wall
<lwall@jpl-devvax.jpl.nasa.gov> from a comp.sources.unix archive, or by
ftp from his machine (among many other places). The GNU project has
made some extensions to patch; you can get the GNU version from
prep.ai.mit.edu.
If you want to have more than 256 fonts, you might try this patch. I
haven't installed it in the main change file because it requires
changing max_quarterword.
From: Bernd Raichle <raichle@azu.informatik.uni-stuttgart.de>
Date: Mon, 18 May 92 13:27:13 +0200
I have applied these diffs to web2c 5.851b with a corrected
WORDS_BIGENDIAN configuration file and *no* changes to `texmfmem.h'.
(Changes are only needed for little-endian machines.)
The changed bigTeX is able to load more than 284 fonts before the
font_mem of 100.000 words overflows (it's a good idea to increment
`font_mem_size' when using more than 256 fonts). `xdvi' and `dvips'
can print the resulted dvi file without problem.
The new constant `max_font_max' is necessary, if you want different
values of `font_max' in initex and virtex. (`max_font_max' is the
space reserved in eqtb[] for the font identifiers; in the original
source there is space for 256 font identifier.)
-bernd
*** ctex.ch.ORIG Fri May 15 12:50:08 1992
--- ctex.ch-32fonts Fri May 15 15:20:28 1992
***************
*** 192,195 ****
can be going on simultaneously}
! @!font_max=255; {maximum internal font number; must not exceed |max_quarterword|
! and must be at most |font_base+256|}
@!font_mem_size=100000; {number of words of |font_info| for all fonts}
--- 192,195 ----
can be going on simultaneously}
! @!font_max=450; {maximum internal font number; must not exceed |max_quarterword|
! and must be at most |font_base+max_font_max|}
@!font_mem_size=100000; {number of words of |font_info| for all fonts}
***************
*** 250,251 ****
--- 250,252 ----
@d hyph_size=607 {another prime; the number of \.{\\hyphenation} exceptions}
+ @d max_font_max=512 {maximum number of internal fonts}
@z
***************
*** 721,723 ****
@d min_quarterword=0 {smallest allowable value in a |quarterword|}
! @d max_quarterword=255 {largest allowable value in a |quarterword|}
@d min_halfword==0 {smallest allowable value in a |halfword|}
--- 722,724 ----
@d min_quarterword=0 {smallest allowable value in a |quarterword|}
! @d max_quarterword==65535 {largest allowable value in a |quarterword|}
@d min_halfword==0 {smallest allowable value in a |halfword|}
***************
*** 726,727 ****
--- 727,737 ----
+ % [8.111]
+ @x
+ if font_max>font_base+256 then bad:=16;
+ @y
+ if (max_font_max<min_quarterword)or(max_font_max>max_quarterword) then bad:=15;
+ if font_max>font_base+max_font_max then bad:=16;
+ @z
+
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 870,871 ****
--- 880,888 ----
+ % [x.222]
+ @x
+ @d undefined_control_sequence=frozen_null_font+257 {dummy location}
+ @y
+ @d undefined_control_sequence=frozen_null_font+max_font_max+1 {dummy location}
+ @z
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
***************
*** 1203,1204 ****
--- 1220,1256 ----
bytes at a time.
+ @z
+
+ % [x.602]
+ @x
+ @p procedure dvi_font_def(@!f:internal_font_number);
+ var k:pool_pointer; {index into |str_pool|}
+ begin dvi_out(fnt_def1);
+ dvi_out(f-font_base-1);@/
+ @y
+ @p procedure dvi_font_def(@!f:internal_font_number);
+ var k:pool_pointer; {index into |str_pool|}
+ begin if f<=256+font_base then
+ begin dvi_out(fnt_def1);
+ dvi_out(f-font_base-1);
+ end
+ else begin dvi_out(fnt_def1+1);
+ dvi_out((f-font_base-1) div @'400);
+ dvi_out((f-font_base-1) mod @'400);
+ end;
+ @z
+
+ % [x.622]
+ @x
+ if f<=64+font_base then dvi_out(f-font_base-1+fnt_num_0)
+ else begin dvi_out(fnt1); dvi_out(f-font_base-1);
+ end;
+ @y
+ if f<=64+font_base then dvi_out(f-font_base-1+fnt_num_0)
+ else if f<=256+font_base then
+ begin dvi_out(fnt1); dvi_out(f-font_base-1);
+ end
+ else begin dvi_out(fnt1+1);
+ dvi_out((f-font_base-1) div @'400);
+ dvi_out((f-font_base-1) mod @'400);
+ end;
@z
Format files and preloading
%%%%%%%%%%%%%%%%%%%%%%%%%%%
TeX (and Metafont; I'll talk about TeX, but MF is completely analogous)
can write its memory to a file; such a file is called a ``format file''.
Why is this interesting? Because TeX can read a format file much faster
than the source file that gave rise to it.
To create a format file, you give the command `\dump' to initex after
reading the source file. (This is more or less the raison d'etre for
initex.) For example:
initex
This is TeX, C Version 3.0
**plain \dump
<blurbs>
Starting to dump on file plain.fmt
<more blurbs>
Voila, you have a plain.fmt you can install somewhere with `make
install-formats' (or cp, or whatever).
The `formats' target in ./Makefile and tex/Makefile does the above for the
formats defined by the make variable $(formats).
Unlike all the other files in the TeX world, format files are not
perfectly portable. web2c itself always writes the format files in
BigEndian order; for formats which do not dump any floating-point (e.g.,
|glue_ratio|) information, this suffices to make them portable across
architectures. Most formats (including plain) do not do this. But you
should always check. (If you do compare format files dumped