Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

libtex.so

7 views
Skip to first unread message

Daniel Richard G.

unread,
Apr 24, 2000, 3:00:00 AM4/24/00
to te...@tug.org
[Forwarding --karl]

Hello,

I am currently investigating the possibility of repackaging the TeX
interpreter into a program library. What I'd like, in the end, is to have a
C header file and a shared library object which would allow programs to
perform the .tex->.dvi conversion without the overhead of executing the tex
interpreter externally. (Think "interactive typesetting" here)

Your Web2C implementation is the logical place to start working, naturally.
I was wondering if someone of your experience could offer any advice to
someone setting out on such a task...

I've been looking through some of the relevant sources, particularly those
that make up lib.a; checking the dependencies of the tex binary, etc. etc.
So far, I foresee the following steps in making "LibTeX" come about:

* Streamlining lib.a (that is, removing the modules not used by TeX--
almost half of them can be eliminated);

* Rerouting TeX's "interactive terminal" functionality, so that error
messages become error codes to the client program;

* Intercepting file I/O calls, some to allow control by the client program,
some to allow I/O into memory buffers, etc.;

* Defining a name-mangling header so that exported symbols internal to the
library don't collide with client program code.


(I haven't really jumped into all this yet; right now I'm mostly trying to
get an idea of what modifications will be necessary, how to go about
implementing them, how the resulting work will be distributed, and so on)

The issue of distribution is one I'm particularly concerned about.
Eventually, I'd hope that LibTeX would be deemed acceptable for inclusion
into the web2c package, so that it may become widely available. But it
seems quite likely that it will need a customized lib.a, as a lot of the
library calls need to be handled differently. Would there be a way of
handling this that would be acceptable to you? (Perhaps a libtex/
directory, containing the stripped-down, heavily-modified contents of
lib/? I don't think anyone would want to add more #ifdef's to that code...)


Any words to the wise appreciated,


--Straker


//,, //,,
//=================// ////// ////// //==================================\\
Straker Skunk / ////// ////// / Skunks are such wonderful
<sk...@mit.edu> / ////// ////// / creatures... soft, and cuddly,
-- -- -- -- -- --\ \\\\\\ \\\\\\ \ and if you annoy them they
Daniel Richard G. \ \\\\\\ \\\\\\ \ make you stink like hell
========--====--==-\ \\\\\\ \\\\\\ \---------------=--==--====--========
//mit.edu/straker / ////// ////// / Furry|Course VI-3|MIT Class of 2001
//skunk.mit.edu / ////// ////// / 80% Beaver 90% Penguin 100% SKUNK!!!
\\===============// ////// ////// //====================================//
''// ''//

0 new messages