[Dev-luatex] Assignments in Lua

Hans Hagen pragma at wxs.nl
Wed May 21 14:37:47 CEST 2008


Jonathan Sauer wrote:

> 	tex.parshape = { { "0pt", "30pt" }, { "10pt", "20pt" } }
> 
> This would result in
> 
> 	\parshape=2 0pt 30pt 10pt 20pt

or just

	tex.parshape = { "0pt", "30pt", "10pt", "20pt" }

after all it's just a variant on tex; a more extensive parshaper could 
have named keys in subtables

> Maybe there is a way to implement both syntaxes, although I'm currently

we should avoid too much overhead (for several other mechanisms we 
rejected former ideas of multiple interfaces and went for simplicity)

user scan always build a shell around it

> fontdimen could be a two-dimensional array, with the first dimension
> being the font and the second the dimension to set:
> 
> 	fontdimen[1][1] = 0
> 	fontdimen[2] = { 0, 1, 2, 3 }

fontdimens are dealt with in the font array; maybe we don't need that 
kind of access then

> 
> Access to TeX's control sequences might be difficult without functions,
> though. OTOH:
> 
> 	tex.cs.from = { "#1 to #2", "From #1 to #2" }
> 
> being equivalent to
> 
> 	\def\from#1 to #2{From #1 to #2}

brrr, do we really need to do that at the lua level? one can just pipr 
definitions to tex; extending the tex syntax is a real long term 
objective (opening up has more priority)

Hans



-----------------------------------------------------------------
                                           Hans Hagen | PRAGMA ADE
               Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com
                                              | www.pragma-pod.nl
-----------------------------------------------------------------


More information about the dev-luatex mailing list