[texhax] Can I Parsing with TeX ?

Reinhard Kotucha reinhard.kotucha at web.de
Thu Aug 16 00:56:49 CEST 2007


Toby Cubitt writes:

 > wa2n wrote:

 >> Hi all
 >> Can TeX doing parsing or regexp ?

 >> or the question is how can I replace something in tex source
 >> (.tex) while I'm compiling the source (make it .dvi) ?

 > The short answer is: not really. The long answer is: perhaps, depending 
 > on what exactly you want to do, but coding it will probably involve a 
 > lot of pain. You're almost certainly better off using an external 
 > utility designed for this task, such as sed, awk, or perl.

... or probably Lua?

LuaTeX is certainly a better solution, especially if portability is
important.  I suppose that LuaTeX is even much faster than forking
external programs.

   http://www.luatex.org/documentation.html

Lua is a relatively simple but very powerful programming language.

   http://www.lua.org/manual/5.1

LuaTeX will be shipped with TeXLive-2008 and as far as I know it is
already part of W32-TeX.  LuaTeX is supposed to be the successor of
pdfTeX in the near future.

I strongly recommend to read the LuaTeX documentation before trying
anything else.

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-4592165
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list