我想知道为什么后台环境被宣布弃用(例如这里),以及我应该使用什么来创建包含浮动的背景,例如在这个 MWE 中。提前谢谢您,
\setupexternalfigures[location={local,default}]
\starttext
%% Is supposed to be deprecated but works better
\startbackground
\input hawking
\placefigure[here,center,none]{}{
\externalfigure[cow.pdf]
}
\input hawking
\stopbackground
\page
\starttextbackground
\input hawking
\placefigure[here,center,none]{}{
\externalfigure[cow.pdf]
}
\input hawking
\stoptextbackground
\stoptext
答案1
如果您想知道为什么这些机制被改变并被background
视为过时,那么我建议您查阅邮件列表。如果您想复制 的行为background
,那么您只需向float
(尤其是\setupfloat[freeregion=no]
)和添加一些设置选项textbackground
:
\setupexternalfigures[location={local,default}]
\starttext
%% Is supposed to be deprecated but works better
\startbackground
\input hawking
\placefigure[here,center,none]{}{
\externalfigure[cow.pdf]
}
\input hawking
\stopbackground
\page
\setuptextbackground
[frame=off,
location=always]
\setupfloat[freeregion=no]
\starttextbackground
\input hawking
\placefigure[here,center,none]{}{
\externalfigure[cow.pdf]
}
\input hawking
\stoptextbackground
\stoptext