ConTeXt:\setupfloats[indentnext=yes] 如果有标题,则在 marginfloat 后不进行缩进

ConTeXt:\setupfloats[indentnext=yes] 如果有标题,则在 marginfloat 后不进行缩进

我在浮动后的缩进方面遇到了问题。这是一篇交叉帖子。我问在 ConTeXt 邮件列表上,但目前尚未收到任何回复。

我在文档中使用 marginfloats,我想让下面的段落缩进。如果我none在放置浮动时添加关键字,它当然可以工作,否则不行。我认为下面这个稍微简单的例子说明了一切。

(我使用更新的独立 ConTeXt ver:2016.09.05 10:28 MKIV beta fmt:2016.9.5 int:english/english)

\usemodule[ipsum]

\setupindenting[yes,medium]

\setupfloats[indentnext=yes]

\starttext

\ipsum[alternative=lines,n=4]

\placefigure[outermargin,high]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, but it is not! On the other hand, it has
a caption, as I want. \ipsum[alternative=lines,n=6]

\placefigure[outermargin,high,none]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, and it is! But I want the caption, and
hence note use the \type{none} keyword.
\ipsum[alternative=lines,n=3]
\stoptext

结果图像

PS1:还有一个老话题在 ConTeXt 邮件列表上有类似的问题,但我不知道这如何解决我的问题。

PS2:我可以\indentation在所有的\placefigures 之后添加,但我不想手动执行此操作。

答案1

ConTeXt 在某些浮点参数之后不适用。我相信只有在和indentnext之后才适用。我从来不明白它背后的设计原理。tophere

话虽如此,链接中的代码修改版本您链接到的话题确实有效:

\usemodule[ipsum]
\setuppagenumbering[alternative=doublesided]

\unprotect
\def\page_one_place_float_auto   {\page_one_place_float_otherwise\useindentnextparameter\floatparameter}
\def\page_one_place_float_bottom {\page_one_place_float_otherwise\useindentnextparameter\floatparameter}
\def\page_one_place_float_margin {\page_margin_blocks_process_float\useindentnextparameter\floatparameter}
\def\page_one_place_float_leftmargin {\page_one_place_float_side_indeed\page_sides_process_float_leftmargin\useindentnextparameter\floatparameter}
\def\page_one_place_float_rightmargin{\page_one_place_float_side_indeed\page_sides_process_float_rightmargin\useindentnextparameter\floatparameter}
\protect


\setupindenting[yes,medium]

\setupfloats[indentnext=yes]

\starttext

\ipsum[alternative=lines,n=4]

\placefigure[outermargin,high]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, but it is not! On the other hand, it has
a caption, as I want. \ipsum[alternative=lines,n=6]

\placefigure[bottom]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, but it is not! On the other hand, it has
a caption, as I want. \ipsum[alternative=lines,n=6]

\placefigure[outermargin,high,none]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, and it is! But I want the caption, and
hence note use the \type{none} keyword.
\ipsum[alternative=lines,n=3]

\page

\ipsum[alternative=lines,n=4]

\placefigure[outermargin,high]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, but it is not! On the other hand, it has
a caption, as I want. \ipsum[alternative=lines,n=6]

\placefigure[bottom]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, but it is not! On the other hand, it has
a caption, as I want. \ipsum[alternative=lines,n=6]

\placefigure[outermargin,high,none]{}{\blackrule[width=1cm,height=1cm]}

This paragraph should be indented, and it is! But I want the caption, and
hence note use the \type{none} keyword.
\ipsum[alternative=lines,n=3]

\stoptext

这使

在此处输入图片描述

相关内容