ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* No numbers with `\ref` and floats like `\placetable`
@ 2011-10-29 21:47 Paul Menzel
  2011-10-29 21:57 ` Andreas Harder
  2011-10-30  7:30 ` Wolfgang Schuster
  0 siblings, 2 replies; 11+ messages in thread
From: Paul Menzel @ 2011-10-29 21:47 UTC (permalink / raw)
  To: ntg-context


[-- Attachment #1.1.1: Type: text/plain, Size: 1426 bytes --]

Dear ConTeXt folks,


I am sorry for another reference related question. Using

        ConTeXt  ver: 2011.10.14 22:47 MKIV  fmt: 2011.10.15  int: english/english

the following example does not work. Either no number is shown or »??«.

        \starttext
        
        Table \ref[][tab:reference] is a nice table. But referencing does not work \ref[tab:reference].
        
        \placetable[][tab:reference]
                {The table should be set up better.}
                {
                \startluacode
                context.bTABLE()
                  context.bTR()
                    context.bTD() context("n") context.eTD()
                    for j=1,10 do
                      context.bTD() context("$10^{" .. j .. "}$") context.eTD()
                    end
                  context.eTR()
                  t = { 1, 2, 4, 8 }
                  for index, i in ipairs(t) do
                    context.bTR()
                    context.bTD() context("$n^{" .. -i .. "}$") context.eTD()
                    for j=1,10 do
                      context.bTD() context("\%.4f", 10^(-j/i)) context.eTD()
                    end
                    context.eTR()
                  end
                context.eTABLE()
                \stopluacode
                }
        \stoptext

Please find the source file and the resulting PDF file attached.


Thanks,

Paul

[-- Attachment #1.1.2: ref.pdf --]
[-- Type: application/pdf, Size: 23767 bytes --]

[-- Attachment #1.1.3: ref.tex --]
[-- Type: text/x-tex, Size: 865 bytes --]

\starttext

Table \ref[][tab:reference] is a nice table. But referencing does not work \ref[tab:reference].

\placetable[][tab:reference]
        {The table should be set up better.}
        {
        \startluacode
        context.bTABLE()
          context.bTR()
            context.bTD() context("n") context.eTD()
            for j=1,10 do
              context.bTD() context("$10^{" .. j .. "}$") context.eTD()
            end
          context.eTR()
          t = { 1, 2, 4, 8 }
          for index, i in ipairs(t) do
            context.bTR()
            context.bTD() context("$n^{" .. -i .. "}$") context.eTD()
            for j=1,10 do
              context.bTD() context("\%.4f", 10^(-j/i)) context.eTD()
            end
            context.eTR()
          end
        context.eTABLE()
        \stopluacode
        }
\stoptext

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

[-- Attachment #2: 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] 11+ messages in thread

end of thread, other threads:[~2011-11-07 12:08 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-29 21:47 No numbers with `\ref` and floats like `\placetable` Paul Menzel
2011-10-29 21:57 ` Andreas Harder
2011-10-30  8:45   ` Wolfgang Schuster
2011-10-30  9:05     ` Andreas Harder
2011-11-07 10:53     ` Andreas Harder
2011-11-07 11:03       ` Wolfgang Schuster
2011-11-07 11:45         ` Andreas Harder
2011-11-07 12:02           ` Wolfgang Schuster
2011-11-07 12:08             ` Andreas Harder
2011-10-30  7:30 ` Wolfgang Schuster
2011-10-30 11:18   ` [solved] " Paul Menzel

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