上下文:缓冲区中声明的嵌套表不会出现在嵌入表中

上下文:缓冲区中声明的嵌套表不会出现在嵌入表中

我在使用嵌套在 Context 中的表时遇到了麻烦embeddedxtables(警告“这对我来说都很新,所以请原谅任何明显的失误......)

我试图简化我的例子来说明我遇到的问题,因此可能感觉有点做作。

下面的代码将生成以下输出: 在此处输入图片描述

这是我不明白的:

  • C21为什么包含和的嵌套表没有C22 出现?(我尝试在这里使用embeddedxtable而不是xtable,但这会阻止文件编译)。

  • 为什么内部表格没有mybuffer1出现在旁边的第一个 xtable 中B1

  • 为什么周围的整个外表皮mybuffer2根本没有出现?

谢谢您的见解!

\def\OuterTable[#1]{
\startembeddedxtable
\startxrow
    \startxcell A1 \stopxcell
    \startxcell A2 \stopxcell
\stopxrow

\startxrow
    \startxcell B1 \stopxcell
    \startxcell \getbuffer[#1] \stopxcell
\stopxrow
\startxrow
    \startxcell C1 \stopxcell
    \startxcell
        \startxtable
        \startxrow
            \startxcell C21 \stopxcell
            \startxcell C22 \stopxcell
        \stopxrow
        \stopxtable
    \stopxcell
\stopxrow
\stopembeddedxtable
}


\startbuffer[mybuffer1]
Text from buffer that precedes my table

\startxtable
\startxrow
    \startxcell B21 \stopxcell
    \startxcell B22 \stopxcell
\stopxrow
\stopxtable

Text from buffer that comes after table
\stopbuffer


\startbuffer[mybuffer2]
Text from buffer that precedes my table

\startembeddedxtable
\startxrow
    \startxcell B21 \stopxcell
    \startxcell B22 \stopxcell
\stopxrow
\stopembeddedxtable

Text from buffer that comes after table
\stopbuffer


\starttext

Inner table using xtable
\OuterTable[mybuffer1]

\blank
Inner table using embeddedxtable (nothing shows up but space is used on the page)
\OuterTable[mybuffer2]

\blank
The buffer works fine when we don't go through a macro: \\
\startxtable
\startxrow
    \startxcell B1 \stopxcell
    \startxcell \getbuffer[mybuffer1] \stopxcell
\stopxrow
\startxrow
    \startxcell B1' \stopxcell
    \startxcell \getbuffer[mybuffer2] \stopxcell
\stopxrow
\stopxtable

\stoptext

相关内容