ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \ref not working in current Ctx?
@ 2012-04-12  6:48 Procházka Lukáš Ing. - Pontex s. r. o.
  2012-04-12 11:53 ` Wolfgang Schuster
  0 siblings, 1 reply; 3+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-12  6:48 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 785 bytes --]

Hello,

the wiki example doesn't work on my computer, although the wiki result seems OK:

----
\starttext
   See page \ref[p][myref 1] and \ref[p][myref 2].
   \page
   \reference[myref 1]{MyRef1} This is the first reference.
   \page
   \reference[myref 2]{MyRef2} This is the second one.
\stoptext
----

The result is: "See page and .", i.e. missing numbers of referred pages.

Maybe versions of Ctx on wiki and on my computer differ.

The mine: ConTeXt  ver: 2012.04.07 14:42 MKIV  fmt: 2012.4.9  int: english/english

A patch needed?

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: t-Ref.log --]
[-- Type: application/octet-stream, Size: 12562 bytes --]

(C:/Lukas/Jobs/D5-035.Zat/A-PruvZpr/Test/t-Ref.mkiv

ConTeXt  ver: 2012.04.07 14:42 MKIV  fmt: 2012.4.9  int: english/english

system          > cont-new.mkiv loaded
(c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv
system          > beware: some patches loaded from cont-new.mkiv
)
system          > t-Ref.top loaded

system          > options > start used options

used options    > % runtime options files (command line driven)
used options    > \unprotect
used options    > % feedback and basic job control
used options    > \nonstopmode
used options    > % handy for special styles
used options    > \startluacode
used options    > document = document or { }
used options    > document.arguments={
used options    >  ["FILE"]="t-Ref.mkiv",
used options    >  ["halt-on-error"]=true,
used options    >  ["mode"]="t-Ref",
used options    >  ["nonstopmode"]=true,
used options    > }
used options    > document.files={
used options    >  "C:/Lukas/Jobs/D5-035.Zat/A-PruvZpr/Test/t-Ref.mkiv",
used options    > }
used options    > \stopluacode
used options    > % process info
used options    > \setupsystem[inputfile=C:/Lukas/Jobs/D5-035.Zat/A-PruvZpr/Test/t-Ref.mkiv]
used options    > \setupsystem[\c!n=1,\c!m=1]
used options    > % modes
used options    > \enablemode[t-Ref]
used options    > % options (not that important)
used options    > \startsetups *runtime:options
used options    > \stopsetups
used options    > % styles and modules
used options    > \startsetups *runtime:modules
used options    > \stopsetups
used options    > % done
used options    > \protect \endinput

system          > options > stop used options

(t-Ref.top
)
fonts           > latin modern fonts are not preloaded
languages       > language en is active
{c:/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map}
fonts           > preloading latin modern fonts (second stage)
fonts           > typescripts > unknown: library 'loc'
{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map}{c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map}
fonts           > virtual math > unable to resolve name mapsfromchar
fonts           > fallback modern rm 12pt is loaded
backend         > xmp > using file 'c:/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml'
pages           > flushing realpage 1, userpage 1
pages           > flushing realpage 2, userpage 2
pages           > flushing realpage 3, userpage 3
 )<c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf>

system          > files > start used files

used files      >    1: filename=C:/Lukas/Jobs/D5-035.Zat/A-PruvZpr/Test/t-Ref.mkiv | foundname=C:/Lukas/Jobs/D5-035.Zat/A-PruvZpr/Test/t-Ref.mkiv | usedmethod=direct
used files      >    2: filename=cont-new.mkiv | filetype=tex | foundname=c:/ConTeXt/tex/texmf-context/tex/context/base/cont-new.mkiv | usedmethod=otherwise
used files      >    3: filename=t-Ref.top | foundname=t-Ref.top | usedmethod=direct
used files      >    4: filename=lang-us.lua | filetype=lua | foundname=c:/ConTeXt/tex/texmf-context/tex/context/patterns/lang-us.lua | usedmethod=otherwise
used files      >    5: filename=mkiv-base.map | filetype=map | format=map | foundname=c:/ConTeXt/tex/texmf-context/fonts/map/pdftex/context/mkiv-base.map | usedmethod=otherwise
used files      >    6: filename=lm.lfg | filetype=tex | foundname=c:/ConTeXt/tex/texmf-context/tex/context/fonts/lm.lfg | usedmethod=otherwise
used files      >    7: filename=lm-math.lfg | filetype=tex | foundname=c:/ConTeXt/tex/texmf-context/tex/context/fonts/lm-math.lfg | usedmethod=otherwise
used files      >    8: filename=lm-math.map | filetype=map | format=map | foundname=c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-math.map | usedmethod=otherwise
used files      >    9: filename=lm-rm.map | filetype=map | format=map | foundname=c:/ConTeXt/tex/texmf/fonts/map/dvips/lm/lm-rm.map | usedmethod=otherwise
used files      >   10: filename=lmroman12-regular | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf | usedmethod=otherwise
used files      >   11: filename=lmroman7-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman7-regular.otf | usedmethod=otherwise
used files      >   12: filename=rm-lmr7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/rm-lmr7.tfm | usedmethod=otherwise
used files      >   13: filename=lmmi7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmmi7.tfm | usedmethod=otherwise
used files      >   14: filename=lmsy7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmsy7.tfm | usedmethod=otherwise
used files      >   15: filename=lmex10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmex10.tfm | usedmethod=otherwise
used files      >   16: filename=msam7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/symbols/msam7.tfm | usedmethod=otherwise
used files      >   17: filename=msbm7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/symbols/msbm7.tfm | usedmethod=otherwise
used files      >   18: filename=stmary10.afm | filetype=afm | format=afm | foundname=c:/ConTeXt/tex/texmf/fonts/afm/public/stmaryrd/stmary10.afm | usedmethod=otherwise
used files      >   19: filename=stmary10.pfb | filetype=pfb | format=pfb | foundname=c:/ConTeXt/tex/texmf/fonts/type1/public/stmaryrd/stmary10.pfb | usedmethod=otherwise
used files      >   20: filename=lmroman7-bold.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman7-bold.otf | usedmethod=otherwise
used files      >   21: filename=lmmib7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmmib7.tfm | usedmethod=otherwise
used files      >   22: filename=lmsans8-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmsans8-regular.otf | usedmethod=otherwise
used files      >   23: filename=lmmono8-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmmono8-regular.otf | usedmethod=otherwise
used files      >   24: filename=eufm7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/euler/eufm7.tfm | usedmethod=otherwise
used files      >   25: filename=eufb7.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/euler/eufb7.tfm | usedmethod=otherwise
used files      >   26: filename=lmroman9-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman9-regular.otf | usedmethod=otherwise
used files      >   27: filename=rm-lmr9.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/rm-lmr9.tfm | usedmethod=otherwise
used files      >   28: filename=lmmi9.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmmi9.tfm | usedmethod=otherwise
used files      >   29: filename=lmsy9.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmsy9.tfm | usedmethod=otherwise
used files      >   30: filename=msam10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/symbols/msam10.tfm | usedmethod=otherwise
used files      >   31: filename=msbm10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/symbols/msbm10.tfm | usedmethod=otherwise
used files      >   32: filename=lmroman9-bold.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman9-bold.otf | usedmethod=otherwise
used files      >   33: filename=lmmib10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmmib10.tfm | usedmethod=otherwise
used files      >   34: filename=lmsans9-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmsans9-regular.otf | usedmethod=otherwise
used files      >   35: filename=lmmono9-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmmono9-regular.otf | usedmethod=otherwise
used files      >   36: filename=eufm10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/euler/eufm10.tfm | usedmethod=otherwise
used files      >   37: filename=eufb10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/amsfonts/euler/eufb10.tfm | usedmethod=otherwise
used files      >   38: filename=lmroman12-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman12-regular.otf | usedmethod=otherwise
used files      >   39: filename=rm-lmr12.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/rm-lmr12.tfm | usedmethod=otherwise
used files      >   40: filename=lmmi12.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmmi12.tfm | usedmethod=otherwise
used files      >   41: filename=lmsy10.tfm | filetype=tfm | format=tfm | foundname=c:/ConTeXt/tex/texmf/fonts/tfm/public/lm/lmsy10.tfm | usedmethod=otherwise
used files      >   42: filename=lmroman12-bold.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmroman12-bold.otf | usedmethod=otherwise
used files      >   43: filename=lmsans12-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmsans12-regular.otf | usedmethod=otherwise
used files      >   44: filename=lmmono12-regular.otf | filetype=otf | format=otf | foundname=c:/ConTeXt/tex/texmf/fonts/opentype/public/lm/lmmono12-regular.otf | usedmethod=otherwise
used files      >   45: filename=lpdf-pdx.xml | filetype=tex | foundname=c:/ConTeXt/tex/texmf-context/tex/context/base/lpdf-pdx.xml | usedmethod=otherwise

system          > files > stop used files


system          > structure > start used structure

used structure  > text: t-Ref

system          > structure > stop used structure


mkiv lua stats  > used config file          - selfautoparent:texmf/web2c/texmfcnf.lua
mkiv lua stats  > used cache path           - c:/ConTeXt/tex/texmf-cache/luatex-cache/context/2448223e6631addb83df348d74153606
mkiv lua stats  > resource resolver         - loadtime 0.063 seconds, 2 scans with scantime 0.031 seconds, 0 shared scans, 45 found files, scanned paths: C:/Lukas/ConTeXt/Fonts c:/windows/fonts
mkiv lua stats  > stored bytecode data      - 302 modules, 65 tables, 367 chunks
mkiv lua stats  > cleaned up reserved nodes - 39 nodes, 9 lists of 436
mkiv lua stats  > node memory usage         - 2 glue, 2 penalty, 9 attribute, 45 glue_spec, 3 attribute_list
mkiv lua stats  > node list callback tasks  - 6 unique task lists, 5 instances (re)created, 210 calls
mkiv lua stats  > used backend              - pdf (backend for directly generating pdf output)
mkiv lua stats  > loaded patterns           - en::2
mkiv lua stats  > jobdata time              - 0.000 seconds saving, 0.031 seconds loading
mkiv lua stats  > callbacks                 - 439 direct, 566 indirect, 1005 total
mkiv lua stats  > randomizer                - resumed with value 0.97961363567003
mkiv lua stats  > lxml preparation time     - 0.000 seconds, 0 nodes, 15 lpath calls, 0 cached calls
mkiv lua stats  > interactive elements      - 0 references, 2 destinations
mkiv lua stats  > result saved in file      - t-Ref.pdf
mkiv lua stats  > loaded fonts              - 33 files: stmary10.afm lmmono12-regular.otf lmmono8-regular.otf lmmono9-regular.otf lmroman12-bold.otf lmroman12-regular.otf lmroman7-bold.otf lmroman7-regular.otf lmroman9-bold.otf lmroman9-regular.otf lmsans12-regular.otf lmsans8-regular.otf lmsans9-regular.otf eufb10.tfm eufb7.tfm eufm10.tfm eufm7.tfm msam10.tfm msam7.tfm msbm10.tfm msbm7.tfm lmex10.tfm lmmi12.tfm lmmi7.tfm lmmi9.tfm lmmib10.tfm lmmib7.tfm lmsy10.tfm lmsy7.tfm lmsy9.tfm rm-lmr12.tfm rm-lmr7.tfm rm-lmr9.tfm
mkiv lua stats  > fonts load time           - 0.625 seconds 
mkiv lua stats  > luatex banner             - this is luatex, version beta-0.70.1-2012032923 (tex live 2012)
mkiv lua stats  > control sequences         - 33328 of 65536 + 100000
mkiv lua stats  > current memory usage      - 34 MB (ctx: 35 MB)
mkiv lua stats  > runtime                   - 1.266 seconds, 2 processed pages, 3 shipped pages, 2.370 pages/second


[-- Attachment #3: t-Ref.mkiv --]
[-- Type: application/octet-stream, Size: 207 bytes --]

\starttext
  See page \ref[p][myref 1] and \ref[p][myref 2].
  \page
  \reference[myref 1]{MyRef1} This is the first reference.
  \page
  \reference[myref 2]{MyRef2} This is the second one.
\stoptext

[-- Attachment #4: t-Ref.pdf --]
[-- Type: application/pdf, Size: 7561 bytes --]

[-- Attachment #5: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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: \ref not working in current Ctx?
  2012-04-12  6:48 \ref not working in current Ctx? Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-04-12 11:53 ` Wolfgang Schuster
  2012-04-12 12:24   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 3+ messages in thread
From: Wolfgang Schuster @ 2012-04-12 11:53 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 12.04.2012 um 08:48 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Hello,
> 
> the wiki example doesn't work on my computer, although the wiki result seems OK:
> 
> ----
> \starttext
>  See page \ref[p][myref 1] and \ref[p][myref 2].
>  \page
>  \reference[myref 1]{MyRef1} This is the first reference.
>  \page
>  \reference[myref 2]{MyRef2} This is the second one.
> \stoptext
> ----
> 
> The result is: "See page and .", i.e. missing numbers of referred pages.
> 
> Maybe versions of Ctx on wiki and on my computer differ.
> 
> The mine: ConTeXt  ver: 2012.04.07 14:42 MKIV  fmt: 2012.4.9  int: english/english
> 
> A patch needed?

In MkIV you can use the \getreference command for this, see this mail for the arguments.

http://news.gmane.org/gmane.comp.tex.context

The \ref command is now only a synonym for \getreference and needs the same arguments.

Wolfgang
___________________________________________________________________________________
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: \ref not working in current Ctx?
  2012-04-12 11:53 ` Wolfgang Schuster
@ 2012-04-12 12:24   ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 3+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-04-12 12:24 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... OK, thank you.

I also found your piece of code at http://www.mail-archive.com/ntg-context@ntg.nl/msg62816.html where usage is shown.

But I still have a question:

Is it possible to create a "point" (or anchor) which would know about the current section, so to retrieve this information later?

See the code:

----
\setupinteraction[state=start]

\starttext
   See: \at[MyRef1]
        \about[MyRef1]
        \getreference[page][MyRef1]
        \getreference[title][MyRef1]
        \getreference[text][MyRef1]
        \getreference[number][MyRef1]
   \page
   \section{Sec1}
     \subsection{SSec1}
       \reference[MyRef1]{MyRef1} This is the first reference.
\stoptext
----

Gives:

"
See: 2 “” 2 MyRef1
"

And I'm looking for a way to obtain:

	See: ... SSec1 ... - the current deepest (current) section name,
or
	See: ... "SSec1" ... - quoted current deepest (current) section name, like \about does,
and
	See: ... 1.1 ...  - the current section number.

How to achieve this?

Best regards,

Lukas


On Thu, 12 Apr 2012 13:53:05 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

>
> In MkIV you can use the \getreference command for this, see this mail for the arguments.
>
> The \ref command is now only a synonym for \getreference and needs the same arguments.
>
> Wolfgang


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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:[~2012-04-12 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12  6:48 \ref not working in current Ctx? Procházka Lukáš Ing. - Pontex s. r. o.
2012-04-12 11:53 ` Wolfgang Schuster
2012-04-12 12:24   ` Procházka Lukáš Ing. - Pontex s. r. o.

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