* 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
* Re: No numbers with `\ref` and floats like `\placetable`
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 7:30 ` Wolfgang Schuster
1 sibling, 1 reply; 11+ messages in thread
From: Andreas Harder @ 2011-10-29 21:57 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 29.10.2011, at 23:47, Paul Menzel wrote:
> 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
That's also true for yesterdays beta.
\starttext
\placeformula[eq:1]
\startformula a+b \stopformula
\in{Equation:}[eq:1]
\stoptext
Regards
Andreas
___________________________________________________________________________________
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
* Re: No numbers with `\ref` and floats like `\placetable`
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
0 siblings, 2 replies; 11+ messages in thread
From: Wolfgang Schuster @ 2011-10-30 8:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 29.10.2011 um 23:57 schrieb Andreas Harder:
>
> On 29.10.2011, at 23:47, Paul Menzel wrote:
>
>> 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
>
> That's also true for yesterdays beta.
I’m aware of this but I hadn’t time so far to write a fix for this.
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] 11+ messages in thread
* Re: No numbers with `\ref` and floats like `\placetable`
2011-10-30 8:45 ` Wolfgang Schuster
@ 2011-10-30 9:05 ` Andreas Harder
2011-11-07 10:53 ` Andreas Harder
1 sibling, 0 replies; 11+ messages in thread
From: Andreas Harder @ 2011-10-30 9:05 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 30.10.2011, at 09:45, Wolfgang Schuster wrote:
>
> Am 29.10.2011 um 23:57 schrieb Andreas Harder:
>
>>
>> On 29.10.2011, at 23:47, Paul Menzel wrote:
>>
>>> 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
>>
>> That's also true for yesterdays beta.
>
> I’m aware of this but I hadn’t time so far to write a fix for this.
Okay. Thank you in advance.
Andreas
___________________________________________________________________________________
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
* Re: No numbers with `\ref` and floats like `\placetable`
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
1 sibling, 1 reply; 11+ messages in thread
From: Andreas Harder @ 2011-11-07 10:53 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 30.10.2011, at 09:45, Wolfgang Schuster wrote:
>
> Am 29.10.2011 um 23:57 schrieb Andreas Harder:
>
>>
>> On 29.10.2011, at 23:47, Paul Menzel wrote:
>>
>>> 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
>>
>> That's also true for yesterdays beta.
>
> I’m aware of this but I hadn’t time so far to write a fix for this.
Hi Wolfgang,
still no fix?
\starttext
\placeformula[eq:1]
\startformula a+b \stopformula
\in{Equation:}[eq:1]
\stoptext
Regards
Andreas
___________________________________________________________________________________
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
* Re: No numbers with `\ref` and floats like `\placetable`
2011-11-07 10:53 ` Andreas Harder
@ 2011-11-07 11:03 ` Wolfgang Schuster
2011-11-07 11:45 ` Andreas Harder
0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-11-07 11:03 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 07.11.2011 um 11:53 schrieb Andreas Harder:
>
> On 30.10.2011, at 09:45, Wolfgang Schuster wrote:
>
>>
>> Am 29.10.2011 um 23:57 schrieb Andreas Harder:
>>
>>>
>>> On 29.10.2011, at 23:47, Paul Menzel wrote:
>>>
>>>> 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
>>>
>>> That's also true for yesterdays beta.
>>
>> I’m aware of this but I hadn’t time so far to write a fix for this.
>
> Hi Wolfgang,
>
> still no fix?
>
> \starttext
> \placeformula[eq:1]
> \startformula a+b \stopformula
> \in{Equation:}[eq:1]
> \stoptext
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
___________________________________________________________________________________
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
* Re: No numbers with `\ref` and floats like `\placetable`
2011-11-07 11:03 ` Wolfgang Schuster
@ 2011-11-07 11:45 ` Andreas Harder
2011-11-07 12:02 ` Wolfgang Schuster
0 siblings, 1 reply; 11+ messages in thread
From: Andreas Harder @ 2011-11-07 11:45 UTC (permalink / raw)
To: mailing list for ConTeXt users
On 07.11.2011, at 12:03, Wolfgang Schuster wrote:
>
> Am 07.11.2011 um 11:53 schrieb Andreas Harder:
>
>>
>> On 30.10.2011, at 09:45, Wolfgang Schuster wrote:
>>
>>>
>>> Am 29.10.2011 um 23:57 schrieb Andreas Harder:
>>>
>>>>
>>>> On 29.10.2011, at 23:47, Paul Menzel wrote:
>>>>
>>>>> 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
>>>>
>>>> That's also true for yesterdays beta.
>>>
>>> I’m aware of this but I hadn’t time so far to write a fix for this.
>>
>> Hi Wolfgang,
>>
>> still no fix?
>>
>> \starttext
>> \placeformula[eq:1]
>> \startformula a+b \stopformula
>> \in{Equation:}[eq:1]
>> \stoptext
>
> When you don’t need subformulas change this in strc-mat.mkiv:
I don’t, thanks.
Andreas
___________________________________________________________________________________
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
* Re: No numbers with `\ref` and floats like `\placetable`
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 7:30 ` Wolfgang Schuster
2011-10-30 11:18 ` [solved] " Paul Menzel
1 sibling, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2011-10-30 7:30 UTC (permalink / raw)
To: mailing list for ConTeXt users
Am 29.10.2011 um 23:47 schrieb Paul Menzel:
> 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].
Use “\in[tab:reference]” to refer to the table number of give “\ref” a keyword (in your case “number”) for the first argument.
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] 11+ messages in thread
* Re: [solved] No numbers with `\ref` and floats like `\placetable`
2011-10-30 7:30 ` Wolfgang Schuster
@ 2011-10-30 11:18 ` Paul Menzel
0 siblings, 0 replies; 11+ messages in thread
From: Paul Menzel @ 2011-10-30 11:18 UTC (permalink / raw)
To: ntg-context
[-- Attachment #1.1.1: Type: text/plain, Size: 722 bytes --]
Am Sonntag, den 30.10.2011, 08:30 +0100 schrieb Wolfgang Schuster:
> Am 29.10.2011 um 23:47 schrieb Paul Menzel:
> > 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].
>
> Use “\in[tab:reference]” to refer to the table number of give “\ref” a keyword (in your case “number”) for the first argument.
That indeed solved this issue. Thank you very much!
Thanks,
Paul
[-- Attachment #1.1.2: ref.pdf --]
[-- Type: application/pdf, Size: 22395 bytes --]
[-- Attachment #1.1.3: ref.tex --]
[-- Type: text/x-tex, Size: 870 bytes --]
\starttext
Table \ref[number][tab:reference] is a nice table. But referencing does not work \in[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).