ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* NTG-context] How to hack the lua files
       [not found] <mailman.1335.1371485315.2084.ntg-context@ntg.nl>
@ 2013-06-18 21:25 ` Lance Larsen
  0 siblings, 0 replies; 3+ messages in thread
From: Lance Larsen @ 2013-06-18 21:25 UTC (permalink / raw)
  To: ntg-context

I haven't been using the project structure. From your question, I am
inferring that this might help. At present I have treated the files as two
separate documents. I didn't take too much time looking at how to set up the
project structure because it wasn't clear that I needed it. But I can see
how this might impact cross references between documents.

-Lance


On 6/17/2013 3:25 PM, Lance Larsen wrote:
> Hans,
>
> 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:
Do you use the project structure? components and such?

Hans


-----------------------------------------------------------------
                                           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] How to hack the lua files
  2013-06-17 13:25 ` Lance Larsen
@ 2013-06-17 21:23   ` Hans Hagen
  0 siblings, 0 replies; 3+ messages in thread
From: Hans Hagen @ 2013-06-17 21:23 UTC (permalink / raw)
  To: ntg-context

On 6/17/2013 3:25 PM, Lance Larsen wrote:
> Hans,
>
> 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:
Do you use the project structure? components and such?

Hans


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

* NTG-context] How to hack the lua files
       [not found] <mailman.1203.1370614292.2084.ntg-context@ntg.nl>
@ 2013-06-17 13:25 ` Lance Larsen
  2013-06-17 21:23   ` Hans Hagen
  0 siblings, 1 reply; 3+ messages in thread
From: Lance Larsen @ 2013-06-17 13:25 UTC (permalink / raw)
  To: ntg-context

Hans,

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:

test1.tex:
-------------
\starttext
\chapter{Chapter 1}
\placeformula[one] \startformula x = y \stopformula
\placeformula[two] \startformula y = z \stopformula
\chapter{Chapter 2}
\placeformula[three] \startformula z = x \stopformula
\stoptext


test2.tex:
--------------
\usereferences[test1.tex]
\starttext
\in{formula}[test1.tex::one]
\in{formula}[test1.tex::two]
\in{formula}[test1.tex::three]
\stoptext

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:

\setupformulae[way=bytext,prefixsegments=None]

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
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-18 21:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1335.1371485315.2084.ntg-context@ntg.nl>
2013-06-18 21:25 ` NTG-context] How to hack the lua files Lance Larsen
     [not found] <mailman.1203.1370614292.2084.ntg-context@ntg.nl>
2013-06-17 13:25 ` Lance Larsen
2013-06-17 21:23   ` Hans Hagen

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).