From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.tex.context/82821 Path: news.gmane.org!not-for-mail From: luigi scarso Newsgroups: gmane.comp.tex.context Subject: Re: How to hack the lua files Date: Fri, 7 Jun 2013 15:17:22 +0200 Message-ID: References: <51b1d960.e7e6440a.3048.09fa@mx.google.com> Reply-To: mailing list for ConTeXt users NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0930464846==" X-Trace: ger.gmane.org 1370611059 15332 80.91.229.3 (7 Jun 2013 13:17:39 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Jun 2013 13:17:39 +0000 (UTC) To: mailing list for ConTeXt users Original-X-From: ntg-context-bounces@ntg.nl Fri Jun 07 15:17:41 2013 Return-path: Envelope-to: gctc-ntg-context-518@m.gmane.org Original-Received: from balder.ntg.nl ([195.12.62.10]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UkwXz-00053Q-7n for gctc-ntg-context-518@m.gmane.org; Fri, 07 Jun 2013 15:17:39 +0200 Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id EEFB1101E9; Fri, 7 Jun 2013 15:17:38 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id VyCML6U9CKx9; Fri, 7 Jun 2013 15:17:37 +0200 (CEST) Original-Received: from balder.ntg.nl (localhost [IPv6:::1]) by balder.ntg.nl (Postfix) with ESMTP id 0D5F5101EA; Fri, 7 Jun 2013 15:17:37 +0200 (CEST) Original-Received: from localhost (localhost [127.0.0.1]) by balder.ntg.nl (Postfix) with ESMTP id 653F7101EA for ; Fri, 7 Jun 2013 15:17:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at balder.ntg.nl Original-Received: from balder.ntg.nl ([127.0.0.1]) by localhost (balder.ntg.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id mOjOGde7y8jH for ; Fri, 7 Jun 2013 15:17:34 +0200 (CEST) Original-Received: from filter3-til.mf.surf.net (filter3-til.mf.surf.net [194.171.167.219]) by balder.ntg.nl (Postfix) with ESMTP id 589FA101E9 for ; Fri, 7 Jun 2013 15:17:24 +0200 (CEST) Original-Received: from mail-ea0-x22a.google.com (mail-ea0-x22a.google.com [IPv6:2a00:1450:4013:c01::22a]) by filter3-til.mf.surf.net (8.14.3/8.14.3/Debian-9.4) with ESMTP id r57DHMs5005431 for ; Fri, 7 Jun 2013 15:17:22 +0200 Original-Received: by mail-ea0-f170.google.com with SMTP id h10so3523450eaj.29 for ; Fri, 07 Jun 2013 06:17:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=XjQS4MfOgTUTkPzJpFXk+JpAXOjWwMwOvMRUaNGj+Zc=; b=Uo/ZJWidS0C3k/759svVjrFFjzNLDP4TmTnjtD5jP5Pt7nk4hQJwtZG+rdnitwCWcd wi5m2TXIK0gShIdMsQ35TgjS/Zxxo5VD/lYNBMSmAd+sqHevJcOmigACGWGF3VivR/FT poCX9NaGYmvYhNCCdfaMh/tVP7+adsWElE+Y1XrLa7au+NIjllzaz5pjWvQsvdiSwubA UxMHDMRFXRo8S1UgxfJCWZ9msToqzCbKzb4cBHaNCmWUZSrzNIo4ghRShFb+MYLb5M3z 0D8y/wp/cv1wagVh6CMMETjLuncWzCMYxYyABHEYM4u8zJWyElyxZUbVHd2q0hrbTpaA Pg4A== X-Received: by 10.14.209.5 with SMTP id r5mr38806419eeo.112.1370611042157; Fri, 07 Jun 2013 06:17:22 -0700 (PDT) Original-Received: by 10.15.74.129 with HTTP; Fri, 7 Jun 2013 06:17:22 -0700 (PDT) In-Reply-To: <51b1d960.e7e6440a.3048.09fa@mx.google.com> X-Bayes-Prob: 0.0001 (Score 0, tokens from: @@RPTN) X-CanIt-Geo: ip=2a00:1450:4013:c01::22a; country=IE X-CanItPRO-Stream: uu:ntg-context@ntg.nl (inherits from uu:default, base:default) X-Canit-Stats-ID: 06JJphm6X - 67a5176f5cfc - 20130607 (trained as not-spam) X-Scanned-By: CanIt (www . roaringpenguin . com) X-BeenThere: ntg-context@ntg.nl X-Mailman-Version: 2.1.14 Precedence: list List-Id: mailing list for ConTeXt users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ntg-context-bounces@ntg.nl Original-Sender: ntg-context-bounces@ntg.nl Xref: news.gmane.org gmane.comp.tex.context:82821 Archived-At: --===============0930464846== Content-Type: multipart/alternative; boundary=047d7b60471c4b2b9f04de904087 --047d7b60471c4b2b9f04de904087 Content-Type: text/plain; charset=UTF-8 On Fri, Jun 7, 2013 at 3:00 PM, Lance Larsen wrote: > If I modify a core lua file how do I remake the format file? Is this > something that is done from mtxrun.exe? I would certainly prefer to use a > hook rather than modifying a core file, but how do I identify the hooks > that > are available? Is there a list of hooks that are available, or a standard > way that hooks are called from the context code so that I can look for an > appropriate hook? Where do I place my hook scripts? Is there a guide that > is > available that might get me started? > > What I trying to do is map equation references to the equation number > generated by context. So for example, if I have an equation: > > \placeformula \startformula > \NC F = m a \NC \NR[eq:newtonslaw] > \stopformula > \usemodule[newmath] \setupformulas[way=bytext,prefix=no] \setupsubformulas[conversion=romannumerals] \starttext \placenamedformula[eq:TEST]{Der einfache Test} \startformula c^2 = a^2 + b^2. \stopformula \stoptext and look into the tuc file (it's a lua file) -- luigi --047d7b60471c4b2b9f04de904087 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable



On Fri, Jun 7, 2013 at 3:00 PM, Lance Larsen <= lance.c.larse= n@gmail.com> wrote:
If I modify a core lua fi= le how do I remake the format file? Is this
something that is done from mtxrun.exe? I would certainly prefer to use a hook rather than modifying a core file, but how do I identify the hooks tha= t
are available? Is there a list of hooks that are available, or a standard way that hooks are called from the context code so that I can look for an appropriate hook? Where do I place my hook scripts? Is there a guide that i= s
available that might get me started?

What I trying to do is map equation references to the equation number
generated by context. So for example, if I have an equation:

\placeformula \startformula
\NC F =3D m a \NC =C2=A0\NR[eq:newtonslaw]
\stopformula

\usemodule[newmath]

\setupform= ulas[way=3Dbytext,prefix=3Dno]
\setupsubformulas[conversion=3Dromannumer= als]

\starttext
\placenamedformula[eq:TEST]{Der einfache Test} \startformula
c^2 =3D a^2 + b^2.
\stopformula

\stoptext
and look into the tuc file (it's a lua file)


--
luigi
--047d7b60471c4b2b9f04de904087-- --===============0930464846== 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 : http://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________ --===============0930464846==--