Home > Archive > Scheme > December 2004 > sTeXme = TeX + Scheme
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
sTeXme = TeX + Scheme
|
|
| Oleg Paraschenko 2004-12-10, 3:59 pm |
| Hello,
The [La]TeX macro language was a great development when it appeared,
but now it is too out-of-date. Programming in TeX is a fun, but more
often it is a pain.
As it seems for me, only very few people can write [La]TeX macros,
but a lot of people would like doing it (like me, for example).
This is the problem.
One of the solutions is to provide another scripting language for TeX.
That's what is the goal of the sTeXme project. It should provide the
Scheme programming language as a TeX scripting language.
At the moment I've done a proof of concept. I've tested that Scheme
code can be executed from TeX and that Scheme code can access TeX
internals (getting a string from the TeX string pool, getting a macro
definition as the Scheme list).
Even in it's early state you can find sTeXme useful. I've written
a Scheme procedure which recursively dumps a macro definition.
For example:
(print-cmd-rec "@ifundefined") ====>
\@ifundefined = (match endmatch "expandafter" "ifx" "csname"
(param 1) "endcsname" "relax" "expandafter" "@firstoftwo" "else"
"expandafter" "@secondoftwo" "fi")
\@firstoftwo = (match match endmatch (param 1))
\@secondoftwo = (match match endmatch (param 2))
I wish I had it before, as some time ago I was digging in the
LaTeX code!
sTeXme home page: http://stexme.sourceforge.net/
Project page: https://sourceforge.net/projects/stexme/
Download: http://sourceforge.net/project/show...group_id=125882
Regards, Oleg
| |
| David Van Horn 2004-12-10, 8:58 pm |
| Oleg Paraschenko wrote:
> One of the solutions is to provide another scripting language for TeX.
> That's what is the goal of the sTeXme project. It should provide the
> Scheme programming language as a TeX scripting language.
Hi Oleg,
Can you contrast this system with Dorai Sitaram's TeX2page package that
includes an \eval command. Details are given here:
Scheme as TeX’s extension language
http://www.ccs.neu.edu/home/dorai/t...html#node_sec_9
An \eval for TeX
http://www.ccs.neu.edu/home/dorai/t...al4tex-doc.html
Thanks,
David
| |
| Oleg Paraschenko 2004-12-12, 3:59 pm |
| Hello David,
thank you a lot for links. TeX2page is an interesting system.
>
> Can you contrast this system with Dorai Sitaram's TeX2page package
that
> includes an \eval command.
>
As far as I understand (correct me if I wrong),
TeX2page's eval works as follows:
* TeX2page parses TeX file, finds eval commands, executes them
and saves results in auxiliary files.
* When TeX processes the files, it expands eval commands into
loading of corresponfing auxiliary files.
So TeX execution and Scheme execution are two separated processes,
and they are can't be intermixed. For example, TeX2page's eval
can't check if some TeX command is defined and to branch depending
on result of the check.
sTeXme is TeX with an additional alternative scripting language.
You will be able to do anything what you can do in the TeX
macro language.
>
> Thanks,
> David
>
Regards, Oleg
|
|
|
|
|