* Re: How to hack the lua files
[not found] <mailman.1201.1370610850.2084.ntg-context@ntg.nl>
@ 2013-06-07 14:01 ` Lance Larsen
2013-06-07 14:10 ` Hans Hagen
2013-06-07 14:22 ` ntg-context Digest, Vol 108, Issue 22 Lance Larsen
1 sibling, 1 reply; 3+ messages in thread
From: Lance Larsen @ 2013-06-07 14:01 UTC (permalink / raw)
To: ntg-context
luigi,
When I started exploring how to map equation references (eq:name) to
equation numbers (4.2), I noticed that the 'tuc' file included the equation
reference (eq:name), but I was not able to identify anywhere where it
indicates the actual equation label specified in the document. Below is an
example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
document:
{
["metadata"]=142,
["numberdata"]=237,
["prefixdata"]=11,
["references"]={
["block"]="bodypart",
["internal"]=122,
["realpage"]=47,
["reference"]="eq:DVOL_RVI_17",
["section"]=79,
},
}
There is nowhere in the tuc file that contains 4 and 28 near each other. I
checked this for other equations as well and concluded that the tuc file
does not contain the actual equation numbers that are used.
If I am missing something or you have any other suggestions that might help
me to extract this info, I would sure appreciate the help.
-Lance
P.S. Thanks for the tip on using 'context --make' to rebuild the files. I
figured this out by guesswork before I got your response, but I have
appreciated how helpful many of you have been on this list.
------
On Fri, Jun 7, 2013 at 3:00 PM, Lance Larsen <lance.c.larsen at
gmail.com>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
___________________________________________________________________________________
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
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to hack the lua files
2013-06-07 14:01 ` How to hack the lua files Lance Larsen
@ 2013-06-07 14:10 ` Hans Hagen
0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2013-06-07 14:10 UTC (permalink / raw)
To: ntg-context
On 6/7/2013 4:01 PM, Lance Larsen wrote:
> luigi,
>
> When I started exploring how to map equation references (eq:name) to
> equation numbers (4.2), I noticed that the 'tuc' file included the equation
> reference (eq:name), but I was not able to identify anywhere where it
> indicates the actual equation label specified in the document. Below is an
> example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
> document:
>
> {
> ["metadata"]=142,
> ["numberdata"]=237,
> ["prefixdata"]=11,
> ["references"]={
> ["block"]="bodypart",
> ["internal"]=122,
> ["realpage"]=47,
> ["reference"]="eq:DVOL_RVI_17",
> ["section"]=79,
> },
> }
>
> There is nowhere in the tuc file that contains 4 and 28 near each other. I
> checked this for other equations as well and concluded that the tuc file
> does not contain the actual equation numbers that are used.
because there are indirect references to for instance 'numberdata' where
this info sits
> If I am missing something or you have any other suggestions that might help
> me to extract this info, I would sure appreciate the help.
see previous mail
btw, if you just want to use references in another tex doc, this will do
the trick:
\usereferences[somedoc]
\starttext
\in{formula}[somedoc::a]
\in{formula}[somedoc::b]
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ntg-context Digest, Vol 108, Issue 22
[not found] <mailman.1201.1370610850.2084.ntg-context@ntg.nl>
2013-06-07 14:01 ` How to hack the lua files Lance Larsen
@ 2013-06-07 14:22 ` Lance Larsen
1 sibling, 0 replies; 3+ messages in thread
From: Lance Larsen @ 2013-06-07 14:22 UTC (permalink / raw)
To: ntg-context
Hans,
Referencing equations from another context document is what I am trying to
do. It think the \usereferences tag that you noted in the ideal solution for
my case. Thanks again for the help.
-Lance
-------------
On 6/7/2013 4:01 PM, Lance Larsen wrote:
> luigi,
>
> When I started exploring how to map equation references (eq:name) to
> equation numbers (4.2), I noticed that the 'tuc' file included the
equation
> reference (eq:name), but I was not able to identify anywhere where it
> indicates the actual equation label specified in the document. Below is an
> example of the tuc output. 'eq:DVOL_RVI_17' is equation (4.28) in the
> document:
>
> {
> ["metadata"]=142,
> ["numberdata"]=237,
> ["prefixdata"]=11,
> ["references"]={
> ["block"]="bodypart",
> ["internal"]=122,
> ["realpage"]=47,
> ["reference"]="eq:DVOL_RVI_17",
> ["section"]=79,
> },
> }
>
> There is nowhere in the tuc file that contains 4 and 28 near each other. I
> checked this for other equations as well and concluded that the tuc file
> does not contain the actual equation numbers that are used.
because there are indirect references to for instance 'numberdata' where
this info sits
> If I am missing something or you have any other suggestions that might
help
> me to extract this info, I would sure appreciate the help.
see previous mail
btw, if you just want to use references in another tex doc, this will do
the trick:
\usereferences[somedoc]
\starttext
\in{formula}[somedoc::a]
\in{formula}[somedoc::b]
\stoptext
-----------------------------------------------------------------
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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 : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-06-07 14:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <mailman.1201.1370610850.2084.ntg-context@ntg.nl>
2013-06-07 14:01 ` How to hack the lua files Lance Larsen
2013-06-07 14:10 ` Hans Hagen
2013-06-07 14:22 ` ntg-context Digest, Vol 108, Issue 22 Lance Larsen
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).