* How to switch off the numbering of a float in a CLDocument?
@ 2022-07-18 18:31 Willi Egger via ntg-context
2022-07-18 18:56 ` Henning Hraban Ramm via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Willi Egger via ntg-context @ 2022-07-18 18:31 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
Hi all,
I wanted to place a figure in a cld. The example in the cld manual does not reveal how to influence bahavior except for the caption.
context.placefigure(
“caption”,
function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
Can anybody enlighten me?
Kind regards
Willi
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to switch off the numbering of a float in a CLDocument?
2022-07-18 18:31 How to switch off the numbering of a float in a CLDocument? Willi Egger via ntg-context
@ 2022-07-18 18:56 ` Henning Hraban Ramm via ntg-context
2022-07-21 11:18 ` Willi Egger via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Henning Hraban Ramm via ntg-context @ 2022-07-18 18:56 UTC (permalink / raw)
To: ntg-context; +Cc: Henning Hraban Ramm
Am 18.07.22 um 20:31 schrieb Willi Egger via ntg-context:
> Hi all,
>
> I wanted to place a figure in a cld. The example in the cld manual does not reveal how to influence bahavior except for the caption.
>
> context.placefigure(
> “caption”,
> function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
>
> Can anybody enlighten me?
Just use
context.startplacefigure({ option = "some", otheroption = "thing" })
...
context.stopplacefigure()
Hraban
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to switch off the numbering of a float in a CLDocument?
2022-07-18 18:56 ` Henning Hraban Ramm via ntg-context
@ 2022-07-21 11:18 ` Willi Egger via ntg-context
2022-07-21 15:35 ` Taco Hoekwater via ntg-context
0 siblings, 1 reply; 4+ messages in thread
From: Willi Egger via ntg-context @ 2022-07-21 11:18 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Willi Egger
Hraban thank you for your answer.
I tried diffrent approaches in the meantime, however I am unable to get it working.
What is wrong with this code? — The code woks a for the context.framedtext()
\setupexternalfigures[location={local,default}]
\startluacode
function Foto_page() --thirddata....
context.startplacefigure({number="",textstyle="red",title="A Test"})
context.externalfigure("{cow.pdf}",{width="0.5\\textwidth"})
--context.framedtext(
-- {frame="on",style="\\bfd"},
-- "{This is a test}")
context.stopplacefigure()
end
\stopluacode
\define\Test{\ctxlua{Foto_page()}}
\starttext
\strut
\Test
\stoptext
KR
Willi
> On 18 Jul 2022, at 20:56, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>
> Am 18.07.22 um 20:31 schrieb Willi Egger via ntg-context:
>> Hi all,
>> I wanted to place a figure in a cld. The example in the cld manual does not reveal how to influence bahavior except for the caption.
>> context.placefigure(
>> “caption”,
>> function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
>> Can anybody enlighten me?
>
> Just use
>
> context.startplacefigure({ option = "some", otheroption = "thing" })
> ...
> context.stopplacefigure()
>
> Hraban
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: How to switch off the numbering of a float in a CLDocument?
2022-07-21 11:18 ` Willi Egger via ntg-context
@ 2022-07-21 15:35 ` Taco Hoekwater via ntg-context
0 siblings, 0 replies; 4+ messages in thread
From: Taco Hoekwater via ntg-context @ 2022-07-21 15:35 UTC (permalink / raw)
To: mailing list for ConTeXt users; +Cc: Taco Hoekwater, Willi Egger
> On 21 Jul 2022, at 13:18, Willi Egger via ntg-context <ntg-context@ntg.nl> wrote:
>
> Hraban thank you for your answer.
>
> I tried diffrent approaches in the meantime, however I am unable to get it working.
>
> What is wrong with this code? — The code woks a for the context.framedtext()
>
> \setupexternalfigures[location={local,default}]
>
> \startluacode
>
> function Foto_page() --thirddata....
>
> context.startplacefigure({number="",textstyle="red",title="A Test"})
> context.externalfigure("{cow.pdf}",{width="0.5\\textwidth"})
It is subtle, but you need:
context.externalfigure({“cow.pdf"},{width="0.5\\textwidth"})
A “lua table” becomes [] stuff, a “lua string” becomes {} stuff. Your original resulted in
\externalfigure{{cow.pdf}}[width={0.5\textwidth}]
Best wishes,
Taco
PS \enabletrackers[context.*]
> --context.framedtext(
> -- {frame="on",style="\\bfd"},
> -- "{This is a test}")
> context.stopplacefigure()
> end
>
> \stopluacode
>
> \define\Test{\ctxlua{Foto_page()}}
>
> \starttext
> \strut
> \Test
> \stoptext
>
> KR
> Willi
>
>> On 18 Jul 2022, at 20:56, Henning Hraban Ramm via ntg-context <ntg-context@ntg.nl> wrote:
>>
>> Am 18.07.22 um 20:31 schrieb Willi Egger via ntg-context:
>>> Hi all,
>>> I wanted to place a figure in a cld. The example in the cld manual does not reveal how to influence bahavior except for the caption.
>>> context.placefigure(
>>> “caption”,
>>> function() context.externalfigure({i}, { width = "\\textwidth" } ) end )
>>> Can anybody enlighten me?
>>
>> Just use
>>
>> context.startplacefigure({ option = "some", otheroption = "thing" })
>> ...
>> context.stopplacefigure()
>>
>> Hraban
>>
>> ___________________________________________________________________________________
>> If your question is of interest to others as well, please add an entry to the Wiki!
>>
>> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
>> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
>> archive : https://bitbucket.org/phg/context-mirror/commits/
>> wiki : https://contextgarden.net
>> ___________________________________________________________________________________
>
> ___________________________________________________________________________________
> If your question is of interest to others as well, please add an entry to the Wiki!
>
> maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
> webpage : https://www.pragma-ade.nl / http://context.aanhet.net
> archive : https://bitbucket.org/phg/context-mirror/commits/
> wiki : https://contextgarden.net
> ___________________________________________________________________________________
—
Taco Hoekwater E: taco@bittext.nl
genderfluid (all pronouns)
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage : https://www.pragma-ade.nl / http://context.aanhet.net
archive : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___________________________________________________________________________________
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-07-21 15:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-18 18:31 How to switch off the numbering of a float in a CLDocument? Willi Egger via ntg-context
2022-07-18 18:56 ` Henning Hraban Ramm via ntg-context
2022-07-21 11:18 ` Willi Egger via ntg-context
2022-07-21 15:35 ` Taco Hoekwater 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).