Thankyou for your suggestion of using the \usereferences tag to reference
formulas in another document. This is a good solution. However the example
below doesn't give usable results because the references to the external
formula output by test2.tex does not include the chapter number:

\chapter{Chapter 1}
\placeformula[one] \startformula x = y \stopformula
\placeformula[two] \startformula y = z \stopformula
\chapter{Chapter 2}
\placeformula[three] \startformula z = x \stopformula


In the output of test1.tex, the formulas are labeled (1.1), (1.2), and
(2.1). In the output of test2.tex the references are labeled 'formula 1',
'formula 2', and 'formula 1' (i.e. the section number is not included).

Using the \usereferences tag works if I label formulas 'bytext' rather than
by 'bysection' and turn off chapter prefixes in test1.tex using the
following at the start of the document:


I would really prefer to maintain numbering by section, but to do this, I
need test2.tex to show external references in the same way as test1.tex (by
including the section number in front of the equation number). Is there a
way to do this at present? If not, labeling formulas 'bytext' will work for
now even if it isn't ideal.

-Lance Larsen

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
> 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
> 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:






                                           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 

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

Reply via email to