我改变了 mickep 的回答ConTeXt:需要帮助理解当图层被推迟时 \setupbackgrounds让全宽图像横跨边距 + 正文。我摆弄了一下,让标题按照我的意愿出现在图像上方。这有两个问题:
1 - 在第 1 页上,正文仅延伸到页边距标题的顶部。我希望它延伸到牛的正上方。
2 - 当 ConTeXt 将浮动内容推到下一页时,图像位于页面顶部,标题位于上方。在这种情况下,我希望标题位于图像下方。
如果可以简单轻松地解决这些问题,我很想知道。否则,我会探索其他方法来实现我想要的。
\showframe
\setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
\setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm, footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]
\setupexternalfigures[location=default]
\definefloat[bottomfigure][figure][
default=bottom,
location=innermargin, % moves image left
]
\setupcaption[bottomfigure][
location=top,
width=40mm,
align={flushleft},
]
\starttext
Some text at the start
\startplacebottomfigure[title={The Futch cow looks to the left to get the margin right.}]
\externalfigure[cow][width=150mm]
\stopplacebottomfigure
\startplacebottomfigure[title={The French parlex voux.}]
\externalfigure[hacker][width=150mm]
\stopplacebottomfigure
\dorecurse{1}{\samplefile{tufte}\par}
\stoptext
答案1
- 我们可以偷懒,把标题放到图层里。
- 如果空间不足,您(目前)需要推迟,否则图像似乎被放置在下一页的顶部。另一种方法是利用图层的角落和位置来作弊,但我认为您当时处于手动状态。
\showframe
\setuppapersize[A4][A3,landscape] \setuparranging[2SIDE]
\setupalign[height]
\setuplayout[backspace=80mm, width=100mm, topspace=50mm, header=0mm, footer=0mm, height=200mm, margindistance=10mm, leftmargin=40mm]
\setupexternalfigures[location=default]
\definefloat[bottomfigure][figure][
default={bottom,none},
location=innermargin,
]
\setupcaption[figure][
style=small,
]
\defineframed[captionframed][
align=flushleft,
width=40mm,
offset=overlay,
boffset=\lineheight,
frame=no,
]
\definelayer[Stanley]
\setuplayer[Stanley][
corner=lefttop,
location={right,top},
]
\startsetups Stanley
\setlayer[Stanley]{\getbuffer[Stanley]}
\stopsetups
\defineexternalfigure[Stanley][externalfigure][
setups=Stanley,
background=Stanley,
]
\starttext
\startbuffer[Stanley]
\captionframed{\placefloatcaption[figure][title={This is the caption of the cow picture, and as we know the cow says meow meow!}]}
\stopbuffer
\startplacebottomfigure
\externalfigure[cow][Stanley][width=150mm]
\stopplacebottomfigure
\dorecurse{3}{{\darkblue\samplefile{knuth}}\par}
\startbuffer[Stanley]
\captionframed{\placefloatcaption[figure][title={This is the caption of the hacker picture, and as the hacker is hacking, we hear a \quotation{hack hack}!}]}
\stopbuffer
\startpostponing[+1]
\startplacebottomfigure
\externalfigure[hacker][Stanley][width=150mm]
\stopplacebottomfigure
\stoppostponing
\dorecurse{8}{\samplefile{knuth}\par}
\stoptext
在示例中,我通过改变颜色标记了我们试图插入黑客的位置。如您所见,剩余空间不足。