* \externafigure and \at do not work together
@ 2021-10-31 12:07 a badin via ntg-context
2021-10-31 12:49 ` a badin via ntg-context
0 siblings, 1 reply; 5+ messages in thread
From: a badin via ntg-context @ 2021-10-31 12:07 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: a badin
Hello, perhaps this is how it is supposed to work, but:
\externalfigure[clock.jpg][clock]
\starttext
\at[clock] refers to a clock
\stoptext
produces "?? refers to a clock", instead of "1 refers a clock" --- the
wiki of \at says, that labels of figures can be refered to. Is this a
bug, or can only some labels be refered to? I was able to fix it
using:
\reference[clock]{\externalfigure[clock.jpg]}
\starttext
\at[clock] refers to a clock
\stoptext
and
\externalfigure[clock][]
\starttext
\at
\stoptext
produces an interesting artwork... so I thought maybe this could be a
bug. LMTX 2021.10.21
Best,
Andrej
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \externafigure and \at do not work together
2021-10-31 12:07 \externafigure and \at do not work together a badin via ntg-context
@ 2021-10-31 12:49 ` a badin via ntg-context
2021-10-31 13:03 ` Bruce Horrocks via ntg-context
2021-10-31 17:11 ` Otared Kavian via ntg-context
0 siblings, 2 replies; 5+ messages in thread
From: a badin via ntg-context @ 2021-10-31 12:49 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: a badin
The fix is not really a fix thought, as it makes the image of the
figure disappear.
Still don't know how to make a .jpg work with \at
On Sun, 31 Oct 2021 at 13:07, a badin <andrej.badin@gmail.com> wrote:
>
> Hello, perhaps this is how it is supposed to work, but:
>
> \externalfigure[clock.jpg][clock]
> \starttext
> \at[clock] refers to a clock
> \stoptext
>
> produces "?? refers to a clock", instead of "1 refers a clock" --- the
> wiki of \at says, that labels of figures can be refered to. Is this a
> bug, or can only some labels be refered to? I was able to fix it
> using:
>
> \reference[clock]{\externalfigure[clock.jpg]}
> \starttext
> \at[clock] refers to a clock
> \stoptext
>
> and
>
> \externalfigure[clock][]
> \starttext
> \at
> \stoptext
>
> produces an interesting artwork... so I thought maybe this could be a
> bug. LMTX 2021.10.21
>
> Best,
> Andrej
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \externafigure and \at do not work together
2021-10-31 12:49 ` a badin via ntg-context
@ 2021-10-31 13:03 ` Bruce Horrocks via ntg-context
2021-10-31 17:11 ` Otared Kavian via ntg-context
1 sibling, 0 replies; 5+ messages in thread
From: Bruce Horrocks via ntg-context @ 2021-10-31 13:03 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Bruce Horrocks, a badin
I thought it was necessary to use one of the derivations of \placefloat in order to get the reference generated. In your case this would be \placefigure thus:
\starttext
\placefigure [ ] [clock] { } {\externalfigure[clock.jpg]}
\at[clock] refers to a clock
\stoptext
> On 31 Oct 2021, at 12:49, a badin via ntg-context <ntg-context@ntg.nl> wrote:
>
> The fix is not really a fix thought, as it makes the image of the
> figure disappear.
> Still don't know how to make a .jpg work with \at
>
> On Sun, 31 Oct 2021 at 13:07, a badin <andrej.badin@gmail.com> wrote:
>>
>> Hello, perhaps this is how it is supposed to work, but:
>>
>> \externalfigure[clock.jpg][clock]
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>>
>> produces "?? refers to a clock", instead of "1 refers a clock" --- the
>> wiki of \at says, that labels of figures can be refered to. Is this a
>> bug, or can only some labels be refered to? I was able to fix it
>> using:
>>
>> \reference[clock]{\externalfigure[clock.jpg]}
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>>
>> and
>>
>> \externalfigure[clock][]
>> \starttext
>> \at
>> \stoptext
>>
>> produces an interesting artwork... so I thought maybe this could be a
>> bug. LMTX 2021.10.21
>>
>> Best,
>> Andrej
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
—
Bruce Horrocks
Hampshire, UK
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \externafigure and \at do not work together
2021-10-31 12:49 ` a badin via ntg-context
2021-10-31 13:03 ` Bruce Horrocks via ntg-context
@ 2021-10-31 17:11 ` Otared Kavian via ntg-context
2021-11-01 11:40 ` Wolfgang Schuster via ntg-context
1 sibling, 1 reply; 5+ messages in thread
From: Otared Kavian via ntg-context @ 2021-10-31 17:11 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Otared Kavian
Hi,
Your example has two issues, since you invoke \externalfigure before \starttext, and moreover you don’t use the place figure mechanism.
The following gives the result you want:
\setupinteraction[state=start]
\starttext
\startplacefigure[reference=clock]
\externalfigure[clock.jpg]
\stopplacefigure
In figure \at[clock] you see a clock
\page
In figure \at[clock] you see a clock.
Or better: in \in{Figure}[clock] you see a clock.
\stoptext
Best regards: Otared
> On 31 Oct 2021, at 13:49, a badin via ntg-context <ntg-context@ntg.nl> wrote:
>
> The fix is not really a fix thought, as it makes the image of the
> figure disappear.
> Still don't know how to make a .jpg work with \at
>
> On Sun, 31 Oct 2021 at 13:07, a badin <andrej.badin@gmail.com> wrote:
>>
>> Hello, perhaps this is how it is supposed to work, but:
>>
>> \externalfigure[clock.jpg][clock]
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>>
>> produces "?? refers to a clock", instead of "1 refers a clock" --- the
>> wiki of \at says, that labels of figures can be refered to. Is this a
>> bug, or can only some labels be refered to? I was able to fix it
>> using:
>>
>> \reference[clock]{\externalfigure[clock.jpg]}
>> \starttext
>> \at[clock] refers to a clock
>> \stoptext
>>
>> and
>>
>> \externalfigure[clock][]
>> \starttext
>> \at
>> \stoptext
>>
>> produces an interesting artwork... so I thought maybe this could be a
>> bug. LMTX 2021.10.21
>>
>> Best,
>> Andrej
> ___________________________________________________________________________________
> 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://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: \externafigure and \at do not work together
2021-10-31 17:11 ` Otared Kavian via ntg-context
@ 2021-11-01 11:40 ` Wolfgang Schuster via ntg-context
0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Schuster via ntg-context @ 2021-11-01 11:40 UTC (permalink / raw)
To: mailing list for ConTeXt users, Otared Kavian via ntg-context
Cc: Wolfgang Schuster, Otared Kavian
Otared Kavian via ntg-context schrieb am 31.10.2021 um 18:11:
> Hi,
>
> Your example has two issues, since you invoke \externalfigure before \starttext, and moreover you don’t use the place figure mechanism.
> The following gives the result you want:
>
> \setupinteraction[state=start]
> \starttext
> \startplacefigure[reference=clock]
> \externalfigure[clock.jpg]
> \stopplacefigure
> In figure \at[clock] you see a clock
> \page
> In figure \at[clock] you see a clock.
>
> Or better: in \in{Figure}[clock] you see a clock.
> \stoptext
With \in you the value of the float counter while \at shows the page
where the float is placed.
The original example passed a name to the optional argument of
\externalfigure but when you do this you just access a named list of
figure options, e.g. rotating the image by 90 degrees counter clockwise.
\setupexternalfigures[location={local,global,default}]
\defineexternalfigure[rotated][orientation=90]
\starttext
\externalfigure[hacker.jpg][rotated]
\stoptext
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://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-01 11:40 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-31 12:07 \externafigure and \at do not work together a badin via ntg-context
2021-10-31 12:49 ` a badin via ntg-context
2021-10-31 13:03 ` Bruce Horrocks via ntg-context
2021-10-31 17:11 ` Otared Kavian via ntg-context
2021-11-01 11:40 ` Wolfgang Schuster via ntg-context
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).