sTeXme usage

sTeXme consists of two parts:

Extension of TeX currently consists of the only one command "stexme" which interprets a Scheme code from the file. Example:

$ cat test.tex
Testing s\TeX{}me!
\stexme test.scm
$ cat test.scm
(display "Hello, World! -- from sTeXme, the Scheme side")

Running tests

sTeXme distribution contains test files in the folder "texmf/stexme/generic":

Both files define TeX macros and execute Scheme code from the file test.scm. This code

pool-string number

TeX stores strings in the text pool and identifies strings by an index. The function "pool-string" returns a string by index or #f if index is invalid. Example:

(pool-string   777)   ===>  "or"
(pool-string 99999)   ===>  #f

get-cmd name

The Scheme command "get-cmd" returns

Elements of the list:

For example, for macro

\def\abcd{\a\b cd2}

result of the (write (get-cmd "abcd")) is:

(endmatch "a" "b" #\c #\d (#\2 12))

and for macro

\def\cs #1.#2\par{.#1-##-#2.}

result of the (write (get-cmd "cs")) is:

(match (#\. 12) match "par" endmatch (#\. 12) (param 1) (#\- 12)
    (#\# 6) (#\- 12) (param 2) (#\. 12))

index.html | sTeXme at SourceForge Logo