How to install sTeXme

Download

sTeXme can be downloaded from SourceForge.

Installation

The current method of building sTeXme is a manual method. I need help to make building process better.

sTeXme is based on teTeX distribution and Guile.

I used teTeX version 2.0.0-rc1 and Guile version 1.6. I think that exact versions are not importnat (at least, "web2c" folder in teTeX 2.0.2 is exactly the same as in 2.0.0-rc1).

Install original teTeX

First of all, install teTeX as described in its README and INSTALL files. By default:

Check that installation is successful. Some checks are described in the teTeX INSTALL file.

Here is yet another check. Go to the folder "$TEXMF/tex/plain/base" and execute:

$ export PATH=/usr/local/teTeX/bin/i686-pc-linux-gnu:$PATH
$ which tex
/usr/local/teTeX/bin/i686-pc-linux-gnu/tex
$ tex story.tex
This is TeX, Version 3.14159 (Web2C 7.4.5)
(./story.tex [1])
*\bye
Output written on story.dvi (1 page, 668 bytes).
Transcript written on story.log.
$ xdvi story.dvi 

Update web2c converter

Copy files "convert" and "splitup.c" from the folder "$STEXME/texk/web2c/web2c" into the folder "$TETEXSRCDIR/texk/web2c/web2c".

Then recompile the "splitup" program by executing in the folder "$TETEXSRCDIR/texk/web2c/web2c":

$ pwd
/usr/local/src/tetex-src-2.0.2/texk/web2c/web2c
$ make
gcc -DHAVE_CONFIG_H  -I. -I. -I../.. -I../.. -I.. -I./..  -O -g
  -c splitup.c ../../klibtool link gcc -o splitup   splitup.o
  ../lib/lib.a ../../kpathsea/libkpathsea.la -lm
gcc -o splitup splitup.o ../lib/lib.a ../../kpathsea/STATIC/libkpathsea.a -lm

Changes are minimal. See diffs with original files for details.

Create sTeXme binary

Copy files "stexmeextra.c", "stexme.web", "stexme.ch", "stexmelib.c" and "texmfmp.h" from the folder "$STEXME/texk/web2c" into the folder "$TETEXSRCDIR/texk/web2c". Then go to the folder "$TETEXSRCDIR/texk/web2c" and run:

$ ./tangle ./stexme.web stexme.ch
This is TANGLE, Version 4.4 (Web2C 7.4.5)
*1*17*25*38*54*72*99*110*115*133*162*173*199*203*207*211*220*256*268*28\
9*297*300*321*332*366*402*464*487*511*540*584*593*645*681*700*720*769*8\
14*863*892*901*920*943*968*981*1030*1056*1137*1209*1300*1331*1339*1341*\
1380*1385*1387*1397*1400
Writing the output file.....500.....1000.....1500.....2000.....2500....\
.3000.....3500.....4000.....4500.....5000.....5500.....6000.....6500....
Done.
1063 strings written to string pool file.
(No errors were found.)
$ srcdir=. /bin/sh ./web2c/convert stexme
$ gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexmeini.c
stexmeini.c: In function `loadfmtfile':
stexmeini.c:3151: warning: comparison is always false due to
  limited range of data type
$ gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexme0.c
$ gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexme1.c
$ gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexme2.c
$ gcc -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexmeextra.c
$ gcc -Wall -DHAVE_CONFIG_H  -I. -I. -I.. -I./..   -g -O2  -c stexmelib.c
$ ./../klibtool link gcc -o stexme   stexmeini.o stexme0.o \
>   stexme1.o stexme2.o stexmeextra.o stexmelib.o lib/lib.a \
>   ../kpathsea/libkpathsea.la -lm -lguile
gcc -o stexme stexmeini.o stexme0.o stexme1.o stexme2.o stexmeextra.o \
  stexmelib.o lib/lib.a ../kpathsea/STATIC/libkpathsea.a -lm -lguile

Run the sTeXme binary and check that banner is correct:

$ ./stexme 
This is sTeXme, Version 3.14159 (Web2C 7.4.5)
**

Press Ctrl+D to exit from sTeXme.

Copy files, create formats

Copy "stexme" and "stexme.pool" to the "$TETEXDIR/bin" and "$TEXMF/web2c" folders:

$ cp stexme /usr/local/teTeX/bin/i686-pc-linux-gnu/
$ cp stexme.pool /usr/local/teTeX/share/texmf/web2c/
$ ln -s /usr/local/teTeX/bin/i686-pc-linux-gnu/stexme \
>   /usr/local/teTeX/bin/i686-pc-linux-gnu/slatexme

Edit the file "$TEXMF/web2c/fmtutil.cnf" with definitions of formats. Add lines:

stexme          stexme          -               tex.ini
slatexme        stexme          language.dat    latex.ini

Edit the file "$TEXMF/web2c/texmf.cnf" with definitions of search paths. Add lines:

TEXINPUTS.stexme = .;$TEXMF/tex/{plain,generic,}//
TEXINPUTS.slatexme = .;$TEXMF/tex/{latex,generic,}//

Now regenerate TeX index file and generate formats:

$ which texhash
/usr/local/teTeX/bin/i686-pc-linux-gnu/texhash
$ texhash
texhash: Updating /usr/local/teTeX/share/texmf/ls-R... 
texhash: Done.
$ fmtutil --byfmt stexme
running `stexme -ini   -jobname=stexme -progname=stexme tex.ini' ...
This is sTeXme, Version 3.14159 (Web2C 7.4.5) (INITEX)
... a lot of output ...
Transcript written on stexme.log.
fmtutil: /usr/local/teTeX/share/texmf/web2c/stexme.fmt installed.
$ fmtutil --byfmt slatexme
running `stexme -ini   -jobname=slatexme -progname=slatexme latex.ini' ...
This is sTeXme, Version 3.14159 (Web2C 7.4.5) (INITEX)
... a lot of output ...
Transcript written on slatexme.log.
fmtutil: /usr/local/teTeX/share/texmf/web2c/slatexme.fmt installed.

Now we can test that sTeXme works. Go to the folder "$TEXMF/tex/plain/base" and compile "story.tex":

$ stexme story.tex 
This is sTeXme, Version 3.14159 (Web2C 7.4.5)
(./story.tex [1])
*\bye
Output written on story.dvi (1 page, 668 bytes).
Transcript written on story.log.
$ xdvi story.dvi 

index.html | sTeXme at SourceForge

SourceForge.net Logo