From: Hans Hagen <pragma@wxs.nl>
To: mailing list for ConTeXt users <ntg-context@ntg.nl>
Subject: Re: Load context format at runtime (from luatex)
Date: Mon, 27 Oct 2008 19:55:49 +0100 [thread overview]
Message-ID: <49060EB5.6070108@wxs.nl> (raw)
In-Reply-To: <20081027165428.7177e505@kylae>
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 : ntg-context@ntg.nl / 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
___________________________________________________________________________________
next prev parent reply other threads:[~2008-10-27 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-10-27 15:54 Mildred Ki'Lya
2008-10-27 18:55 ` Hans Hagen [this message]
2008-10-27 23:40 ` Mildred Ki'Lya
2008-10-28 8:27 ` Hans Hagen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49060EB5.6070108@wxs.nl \
--to=pragma@wxs.nl \
--cc=ntg-context@ntg.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).