Bug (?) using \externalfigure with layers and backgrounds
Hi everyone. The following \setuppagenumbering[state=stop] \definelayer[mybg] [ repeat=yes, x=0mm, y=0mm, width=\paperwidth, height=\paperheight, ] \setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]} \setupbackgrounds[page][background=mybg,state=repeat] \setupindenting[yes,small] \startsetups background:default \setupbackgrounds[page][background=mybg,state=repeat] \stopsetups \startsetups background:void \setupbackgrounds[page][background=] \stopsetups \starttext \dorecurse{7}{\input knuth} \page \setups[background:void] \dorecurse{8}{\input tufte} \page \setups[background:default] \dorecurse{7}{\input knuth} \page \stoptext works with a local image (say, if "cow" is in the same folder as the main file), but it doesn't find sample images (cow, hacker, etc.). Is that a bug or an intended result? Thank you in advance. Best regards, Jairo
Jairo A. del Rio schrieb am 03.12.2020 um 18:14:
Hi everyone. The following
\setuppagenumbering[state=stop] \definelayer[mybg] [ repeat=yes, x=0mm, y=0mm, width=\paperwidth, height=\paperheight, ] \setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]} \setupbackgrounds[page][background=mybg,state=repeat] \setupindenting[yes,small] \startsetups background:default \setupbackgrounds[page][background=mybg,state=repeat] \stopsetups \startsetups background:void \setupbackgrounds[page][background=] \stopsetups \starttext \dorecurse{7}{\input knuth} \page \setups[background:void] \dorecurse{8}{\input tufte} \page \setups[background:default] \dorecurse{7}{\input knuth} \page \stoptext
works with a local image (say, if "cow" is in the same folder as the main file), but it doesn't find sample images (cow, hacker, etc.). Is that a bug or an intended result? Thank you in advance.
This is normal, to load figures from the tex directory use \setupexternalfigures[location=default]. More information are on the wiki: https://wiki.contextgarden.net/Command/setupexternalfigure Wolfgang
Oh, I see. Nice, thank you a lot. Jairo :) El jue, 3 de dic. de 2020 a la(s) 12:19, Wolfgang Schuster ( wolfgang.schuster.lists@gmail.com) escribió:
Jairo A. del Rio schrieb am 03.12.2020 um 18:14:
Hi everyone. The following
\setuppagenumbering[state=stop] \definelayer[mybg] [ repeat=yes, x=0mm, y=0mm, width=\paperwidth, height=\paperheight, ]
\setlayer[mybg]{\externalfigure[cow][width=\paperwidth,height=\paperheight]}
\setupbackgrounds[page][background=mybg,state=repeat] \setupindenting[yes,small] \startsetups background:default \setupbackgrounds[page][background=mybg,state=repeat] \stopsetups \startsetups background:void \setupbackgrounds[page][background=] \stopsetups \starttext \dorecurse{7}{\input knuth} \page \setups[background:void] \dorecurse{8}{\input tufte} \page \setups[background:default] \dorecurse{7}{\input knuth} \page \stoptext
works with a local image (say, if "cow" is in the same folder as the main file), but it doesn't find sample images (cow, hacker, etc.). Is that a bug or an intended result? Thank you in advance.
This is normal, to load figures from the tex directory use \setupexternalfigures[location=default].
More information are on the wiki: https://wiki.contextgarden.net/Command/setupexternalfigure
Wolfgang
participants (2)
-
Jairo A. del Rio
-
Wolfgang Schuster