From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/45204 Path: news.gmane.org!not-for-mail From: "Alan STONE" Newsgroups: gmane.comp.tex.context Subject: Re: ctx files Date: Fri, 31 Oct 2008 12:42:10 +0100 Message-ID: <326847810810310442p37324fb7v90c8996f6b83d091@mail.gmail.com> References: <326847810810290313qae61571j13de9eda053227a8@mail.gmail.com> <49083BB2.10902@wxs.nl> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1831555214==" X-Trace: ger.gmane.org 1225453446 4787 80.91.229.12 (31 Oct 2008 11:44:06 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 31 Oct 2008 11:44:06 +0000 (UTC) To: "mailing list for ConTeXt users" Original-X-From: ntg-context-bounces@ntg.nl Fri Oct 31 12:44:58 2008 connect(): Connection refused Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from ronja.vet.uu.nl ([131.211.172.88] helo=ronja.ntg.nl) by lo.gmane.org with esmtp (Exim 4.50) id 1KvsR0-0006xH-26 for gctc-ntg-context-518@m.gmane.org; Fri, 31 Oct 2008 12:44:58 +0100 Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 86ACC1FC72; Fri, 31 Oct 2008 12:43:48 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 10760-01; Fri, 31 Oct 2008 12:42:48 +0100 (CET) Original-Received: from ronja.vet.uu.nl (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id CE0271FB89; Fri, 31 Oct 2008 12:42:47 +0100 (CET) Original-Received: from localhost (localhost [127.0.0.1]) by ronja.ntg.nl (Postfix) with ESMTP id 48EE71FB64 for ; Fri, 31 Oct 2008 12:42:46 +0100 (CET) Original-Received: from ronja.ntg.nl ([127.0.0.1]) by localhost (smtp.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 09023-01-12 for ; Fri, 31 Oct 2008 12:42:11 +0100 (CET) Original-Received: from ey-out-1920.google.com (ey-out-1920.google.com [74.125.78.145]) by ronja.ntg.nl (Postfix) with ESMTP id 170131FB49 for ; Fri, 31 Oct 2008 12:42:11 +0100 (CET) Original-Received: by ey-out-1920.google.com with SMTP id 21so380305eyc.38 for ; Fri, 31 Oct 2008 04:42:10 -0700 (PDT) Original-Received: by 10.210.117.1 with SMTP id p1mr13242973ebc.91.1225453330890; Fri, 31 Oct 2008 04:42:10 -0700 (PDT) Original-Received: by 10.210.136.3 with HTTP; Fri, 31 Oct 2008 04:42:10 -0700 (PDT) In-Reply-To: <49083BB2.10902@wxs.nl> X-Virus-Scanned: amavisd-new at ntg.nl X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.9 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: ntg-context-bounces@ntg.nl Errors-To: ntg-context-bounces@ntg.nl X-Virus-Scanned: amavisd-new at ntg.nl Xref: news.gmane.org gmane.comp.tex.context:45204 Archived-At: --===============1831555214== Content-Type: multipart/alternative; boundary="----=_Part_32589_19308123.1225453330879" ------=_Part_32589_19308123.1225453330879 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Oct 29, 2008 at 11:32 AM, Hans Hagen wrote: > > How do you call ctx files from within a main ctx file ? > > *** ctx-flags.ctx *** texengine=luatex interface=en result=ctx-modes *** ctx-modes1.ctx *** mode1a *** ctx-modes2.ctx *** mode2a *** end of code *** Best, Alan -- * texexec --lua foo * ConTeXt minimals ver: 2008.10.08 23:34 MKIV fmt: 2008.10.13 int: english/english * Ubuntu 8.04 Hardy Heron ------=_Part_32589_19308123.1225453330879 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Wed, Oct 29, 2008 at 11:32 AM, Hans Hagen <pragma@wxs.nl> wrote:
> How do you call ctx files from within a main ctx file ?

<ctx:include name='whatever.ctx"/>

should work

In my first attempt to cook something up, something seems to be missing and/or wrong because no output is generated. If all is put into one *.ctx file it works.

texmfstart texexec --lua --ctx=ctx-main ctx-test

*** ctx-test.tex ***

\starttext

\doifmode{mode1a}
    {mode1a}
   
\doifmode{mode2a}
    {\blank mode2a}

\stoptext

*** ctx-main.ctx ***

<?xml version='1.0' standalone='yes'?>

<ctx:job>
    <ctx:preprocess>
            <ctx:include name='ctx-flags.ctx'/>
            <ctx:include name='ctx-modes1.ctx'/>
    </ctx:preprocess>
     <ctx:flags/>
     <ctx:process/>
     <ctx:postprocess/>
</ctx:job>

*** ctx-flags.ctx ***

<?xml version='1.0' standalone='yes'?>

<ctx:job>
     <ctx:preprocess/>
    <ctx:flags>
        <ctx:flag>texengine=luatex</ctx:flag>
        <ctx:flag>interface=en</ctx:flag>
        <ctx:flag>result=ctx-modes</ctx:flag>
    </ctx:flags>
     <ctx:process/>
     <ctx:postprocess/>
</ctx:job>

*** ctx-modes1.ctx ***

<?xml version='1.0' standalone='yes'?>

<ctx:job>
     <ctx:preprocess/>
     <ctx:flags/>
    <ctx:process>
        <ctx:resources>
            <ctx:mode>mode1a</ctx:mode>
        </ctx:resources>
    </ctx:process>
     <ctx:postprocess/>     
</ctx:job>

*** ctx-modes2.ctx ***

<?xml version='1.0' standalone='yes'?>

<ctx:job>
     <ctx:preprocess/>
     <ctx:flags/>
    <ctx:process>
        <ctx:resources>
            <ctx:mode>mode2a</ctx:mode>
        </ctx:resources>
    </ctx:process>
    <ctx:postprocess/>
</ctx:job>

*** end of code ***

Best,
Alan

--
* texexec --lua foo
* ConTeXt  minimals ver: 2008.10.08 23:34 MKIV  fmt: 2008.10.13  int: english/english
* Ubuntu 8.04 Hardy Heron
------=_Part_32589_19308123.1225453330879-- --===============1831555214== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ___________________________________________________________________________________ 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 ___________________________________________________________________________________ --===============1831555214==--