[texhax] TeX or LaTeX "engine" for Windows PC

Uwe Lück uwe.lueck at web.de
Thu Mar 9 23:25:51 CET 2006

At 15:01 07.03.06, Greg Long wrote:
>I'm writing an application using Visual Basic and I would like to use the 
>TeX or LaTeX
>"engine" to generate formatted mathematical equations. My application and 
>interface does more than generate mathematics equations, hence, I'm not 
>interested in using an existing TeX package such as MiKTeX (unless I have 
>to write
>functions that call MiKTeX to generate the formatted mathematics).
>I essentially need instructions, a Tech Note, or book, that would walk me 
>through the
>process of using the TeX or LaTeX "engine" to generate the formatted 
>When I use the word "engine," I essentially mean source code, or other 
>software that
>is compatible with a Windows PC that is the "bare bones" of TeX or LaTeX. 
>The source
>code can be written in Visual Basic, C, C++, or C# (or whatever language 
>the code is freely
>available in).

At 23:01 07.03.06, Karl Berry wrote:

>If you install a minimal subset of miktex (or tex live), you'll pretty
>much have "bare bones" TeX.  A binary by itself is of no use; it needs
>many supporting font and macro files to actually typeset anything.
>That's what the distributions are all about.

Greg's project might work without any macros:
He might need just a few of TeX's primitive commands.
However, font files are needed indeed.
MiKTeX therefore is nice in searching for and/or
generating font info files. Yet other TeX installations
had this ability before, I think. It is perhaps not so
difficult to write such a thing on your own.
Greg: you would need to know about MetaFont;
Karl knows best about these things, I guess :)

However, it might be helpful to use shorthands
for TeX code expressions starting with \mathchar etc.
-- "macros" -- so you don't have to search font tables
etc. You might use a part of the plain.tex macro package.
This gives you access to some basic set of symbols.
For other ones ... another time, if needed ...
(I think of redefining LaTeX's symbol declaration commands
so they do nothing but just generating those shorthand
definitions. Greg: see the LaTeX Companion on declaring
and selecting fonts and symbols, or the guide "LaTeX2e
font selection" by the LaTeX3 Project Team.)

You might also write your own version of what you need
from TeX. You may need just descriptions of TeX's
algorithms for math formulas, TeXbook parts of chapters
17f. and appendix G. You may see that it is a very
complex matter, also what font parameters must be
provided ... and decide to use some TeX package indeed,
or to follow the other hints on this list, this may need less thinking.

I understood the project as follows: use TeX just for math
formulas, something else for all the rest. (So the application
will just produce a file <formula identifier>.tex for each formula,
consisting of some settings, then of $<math commands>$\end
[with primitive TeX].) Well, in short, it may be less difficult
to use TeX for the entire document. TeX and/or LaTeX turn(s)
<math commands> into formulas depending very much on what
is going on around, and this is an important part of what is
so nice about TeX and LaTeX. (E.g., have you ever had to typeset
math formulas in the main text _and_ in the footnotes with
some well-known commercial application?) And what about
"equation arrays", i.e., an alignment of some sequence of
equations, with proper placement of equation numbers?
You may as well discover that TeX can do much more than
you expected, so you might not need much else (to stay brief,
or at least: colour and hypertext abilities).

Greg, concerning `user interface': I wonder if you
think of WYSIWYG, graphical interface, "clicking"?
There have been other approaches an experiences
in this direction.


More information about the texhax mailing list