Mildred Ki'Lya wrote:
> Hi,
> 
> I would like to run (if possible) the context format at runtime. In
> fact, I'd like to create a custom format for my own document and I want
> my format to inherit ConTeXt (mostly because of utf-8 support).
> 
> At the beginning of my document, I added:
> 
>       \input format
> 
> And at the beginning of format.tex, I added:
> 
>       \input context
> 
> But now, when I execute the document using (pdf)luatex, I get an error
> in some lua chunk:

you cannot use context this way (at least not currently)

> pdfluatex document.tex
> This is LuaTeX, Version snapshot-0.25.4-2008091110 (Web2C 7.5.7)
> (document.tex (format.tex (/usr/share/texmf-dist/tex/context/base/context.tex
> (/usr/share/texmf-dist/tex/context/base/syst-pln.tex)
> (/usr/share/texmf-dist/tex/context/base/syst-prm.tex)
> (/usr/share/texmf-dist/tex/context/base/luat-env.tex
> ! LuaTeX error [string "luas[0]"]:1: attempt to call field 'luafilechunk' (a 
> ni
> l value).
> \ctxluabyteload ...nvironment.luafilechunk("#1") }
>                                                   
> \ ...fproductionrun \else \ctxluabyteload {#1}{#2}
>                                                   \fi \global 
> \everyloadluac...
> l.168 \registerctxluafile{luat-env}{1.001}
>                                           
> ?

when making the format, we also make a lua stub file (with code that 
implements file handling etc)

> Do you know how I can create my format based on ConTeXt? It doesn't

i have no clue what you mean with 'my own format based on context'

what you can do is copy cont-en.tex to cont-my.tex and load additional 
stuff before dumping (as long as you don't preload fonts in mkiv since 
they are not stored in the format)

> seems that easy :/ And I would prefer not to be dependant from ConTeXt
> (that is if I want to use another format for my document instead of
> ConTeXt, I want to be able to do that). And I also would prefer using
> the generic (pdf)luatex instead of context.

then you have to roll out your own code, (i.e why bother about context 
if you want to use your own code)

at some time in the future i will provide a system based on independent 
components, so that one can make a 'small context like thing' but it has 
a real low priority (unless someone pays for the effort)

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
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : [email protected] / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : https://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to