On Jan 23, 2009, at 12:13 PM, Hans Hagen wrote:
Thomas A. Schmitz wrote:
it uses the syntax lpeg.Ca which my lpeg doesn't recognize and which I can't find in the lpeg manual.
[useful information snipped]
just run such script using
mtxrun --script yourscript.lua
as luatex (texlua) has the latest lpeg built in)
Just one remark: my lpeg is /* ** $Id: lpeg.c,v 1.98 2008/10/11 20:20:43 roberto Exp $ and doesn't have the lpeg.Ca pattern. The lpeg that comes with luatex is /* ** $Id: lpeg.c,v 1.86 2008/03/07 17:20:19 roberto Exp $ so it's older, and it does have the lpeg.Ca pattern accumulator. And can I ask one more question about lpeg? Suppose I have the string "{\em This string is \quotation{heavily} emphasized.}" and want to transform that into something like "\color[red]{This string is \quotation{heavily} emphasized.}" How would I go about this using lpeg? I must use a lpeg.V somewhere, but I can't figure out where and how. Thanks, and all best Thomas