No numbers with `\ref` and floats like `\placetable`

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

Am 07.11.2011 um 11:53 schrieb Andreas Harder:
When you don’t need subformulas change this in strc-mat.mkiv: %\def\storecurrentformulanumber#1#2#3#4#5% ref, todo:str, \sync % todo: title etc (like float) % {\dostructurecountercomponent % {formula}% % \getformulaparameters \formulaparameter \detokenizedformulaparameter % \relax \relax \relax % [\c!name=\v!formula,\s!counter=\v!formula,% % \s!hascaption=\v!yes,\s!hastitle=\v!yes,\s!hasnumber=\v!yes,%\s!haslevel=#6,% % \s!hasnumber=\v!no,% % \c!reference=#1,\c!title=\namedformulaentry,\c!bookmark=]% % [#2]% % \glet\namedformulaentry\relax % \globallet#3\laststructurecounternumber % \globallet#4\laststructurecountersynchronize % \globallet#5\laststructurecounterattribute} \def\storecurrentformulanumber#1#2#3#4#5% ref, todo:str, \sync % todo: title etc (like float) {\dostructurecountercomponent {formula}% \getformulaparameters \formulaparameter \detokenizedformulaparameter \relax \relax \relax [\c!name=\v!formula,\s!counter=\v!formula,% \s!hascaption=\v!yes,\s!hastitle=\v!yes,\s!hasnumber=\v!yes,%\s!haslevel=#6,% \c!reference=#1,\c!title=\namedformulaentry,\c!bookmark=]% [#2]% \glet\namedformulaentry\relax \globallet#3\laststructurecounternumber \globallet#4\laststructurecountersynchronize \globallet#5\laststructurecounterattribute} %\def\dohandleformulanumbering % {\doincrementsubstructurecounter[\v!formula][1]% % \doiftext\currentplaceformulasuffix{\setsubstructurecounterown[\v!formula][2]{\currentplaceformulasuffix}}% % \placecurrentformulanumber} \def\dohandleformulanumbering {\doiftext\currentplaceformulasuffix{\setsubstructurecounterown[\v!formula][2]{\currentplaceformulasuffix}}% \placecurrentformulanumber} Wolfgang

Am 07.11.2011 um 12:45 schrieb Andreas Harder:
When you don’t need subformulas change this in strc-mat.mkiv:
I don’t, thanks.
Instead of patching strc-mat.mkiv you can create a file with the name cont-loc.mkiv in your working directory where you add both modified commands. With this method you don’t have to make the changes in the core and when it’s fixed just delete this file. Wolfgang
participants (3)
-
Andreas Harder
-
Paul Menzel
-
Wolfgang Schuster