关于文本浮动到列中(再次是垂直框)

关于文本浮动到列中(再次是垂直框)

在其他人的帮助下,我设法让文本顺利地流入列中。最后,我摆脱了溢出,TeX 用有限的垂直框做到了这一点。现在,解决方案总是意味着下一个问题:如果我改变 \columnheight 的值,其余内容(溢出..)将被切断并转移到另一个未显示的框中。现在我得到了我想要的......我只需要按编号调用框。看看最后几行。一定是可能的,让它进入循环,但是,我如何检测一个空框来取消该过程?(\ifvoid?)

\raggedright
\hsize=140pt % 
\parindent=0pt
\newdimen\columnheight
\columnheight=160pt
\def\text{ Morality (often referred to as "The Prize Essay"). In 1766 Kant wrote Dreams of a Spirit-Seer which dealt with the writings of Emanuel Swedenborg. The exact influence of Swedenborg on Kant, as well as the extent of Kant's belief in mysticism according to Dreams of a Spirit-Seer, remain controversial. On 31 March 1770, aged 45, Kant was finally appointed Full Professor of Logic and Metaphysics (Professor Ordinarius der Logic und Metaphysic) at the University of K\"onigs\-berg. In defense of this appointment, Kant wrote his inaugural dissertation (Inaugural - Dissertation) De Mundi Sensibilis atque Intelligibilis Forma et Principiis (On the Form and Principles of the Sensible and the Intelligible World).[1] This work saw the emergence of several central themes of his mature work, including the distinction between the faculties of intellectual thought and sensible receptivity. To miss this distinction would mean to commit the error of subreption, and, as he says in the last chapter of the dissertation, only in avoiding this error does metaphysics flourish.
The issue that vexed Kant was central to what 20th-century scholars called "the philosophy of mind". The flowering of the natural sciences had led to an understanding of how data reaches the brain. Sunlight falling on an object is reflected from its surface in a way that maps the surface features (color, texture, etc.). The reflected light reaches the human eye, passes through the cornea, is focused by the lens onto the retina where it forms an image similar to that formed by light passing through a pinhole into a camera obscura. The retinal cells send impulses through the optic nerve and then they form a mapping in the brain of the visual features of the object. The interior mapping is not the exterior object, and our belief that there is a meaningful relationship between the object and the mapping in the brain depends on a chain of reasoning that is not fully grounded. But the uncertainty aroused by these considerations, by optical illusions, misperceptions, delusions, etc., is not the end of the problem.Morality (often referred to as "The Prize Essay"). In 1766 Kant wrote Dreams of a Spirit-Seer which dealt with the writings of Emanuel Swedenborg. The exact influence of Swedenborg on Kant, as well as the extent of Kant's belief in mysticism according to Dreams of a Spirit-Seer, remain controversial. On 31 March 1770, aged 45, Kant was finally appointed Full Professor of Logic and Metaphysics (Professor Ordinarius der Logic und Metaphysic) at the University of K\"onigs\-berg. In defense of this appointment, Kant wrote his inaugural dissertation (Inaugural - Dissertation) De Mundi Sensibilis atque Intelligibilis Forma et Principiis (On the Form and Principles of the Sensible and the Intelligible World).[1] This work saw the emergence of several central themes of his mature work, including the distinction between the faculties of intellectual thought and sensible receptivity. To miss this distinction would mean to commit the error of subreption, and, as he says in the last chapter of the dissertation, only in avoiding this error does metaphysics flourish.
\vskip0.5\baselineskip \it Cited from Wikipedia}
\newbox\textbox
\setbox\textbox=\vtop{\text}
\newbox\textboxtemp
\newcount\textcounter
\textcounter=0
\loop
\advance\textcounter by 1%
\setbox\textcounter=\vsplit\textbox to \columnheight
\ifnum\ht\textcounter=0{}\fi
\ifnum\ht\textcounter>0\repeat
{\bf About text floating into columns} \vskip\baselineskip
%here is the problem
\hbox{ \copy1 \hskip10pt\copy2  \hskip10pt\copy3}
\hbox{\copy4  \hskip10pt\copy5 \hskip10pt \copy6 \hskip10pt}
\hbox{\copy7  \hskip10pt\copy8 \hskip10pt \copy9 \hskip10pt}
%\hbox{\copy10  \hskip10pt\copy11 \hskip12pt \copy13 \hskip10pt}
%\hbox{\copy14  \hskip10pt\copy15 \hskip12pt \copy16 \hskip10pt}
\bye

答案1

在此处输入图片描述

\tracingonline2
\raggedright
\hsize=140pt % 
\parindent=0pt
\newdimen\columnheight
\columnheight=160pt
\def\text{ Morality (often referred to as "The Prize Essay"). In 1766 Kant wrote Dreams of a Spirit-Seer which dealt with the writings of Emanuel Swedenborg. The exact influence of Swedenborg on Kant, as well as the extent of Kant's belief in mysticism according to Dreams of a Spirit-Seer, remain controversial. On 31 March 1770, aged 45, Kant was finally appointed Full Professor of Logic and Metaphysics (Professor Ordinarius der Logic und Metaphysic) at the University of K\"onigs\-berg. In defense of this appointment, Kant wrote his inaugural dissertation (Inaugural - Dissertation) De Mundi Sensibilis atque Intelligibilis Forma et Principiis (On the Form and Principles of the Sensible and the Intelligible World).[1] This work saw the emergence of several central themes of his mature work, including the distinction between the faculties of intellectual thought and sensible receptivity. To miss this distinction would mean to commit the error of subreption, and, as he says in the last chapter of the dissertation, only in avoiding this error does metaphysics flourish.
The issue that vexed Kant was central to what 20th-century scholars called "the philosophy of mind". The flowering of the natural sciences had led to an understanding of how data reaches the brain. Sunlight falling on an object is reflected from its surface in a way that maps the surface features (color, texture, etc.). The reflected light reaches the human eye, passes through the cornea, is focused by the lens onto the retina where it forms an image similar to that formed by light passing through a pinhole into a camera obscura. The retinal cells send impulses through the optic nerve and then they form a mapping in the brain of the visual features of the object. The interior mapping is not the exterior object, and our belief that there is a meaningful relationship between the object and the mapping in the brain depends on a chain of reasoning that is not fully grounded. But the uncertainty aroused by these considerations, by optical illusions, misperceptions, delusions, etc., is not the end of the problem.Morality (often referred to as "The Prize Essay"). In 1766 Kant wrote Dreams of a Spirit-Seer which dealt with the writings of Emanuel Swedenborg. The exact influence of Swedenborg on Kant, as well as the extent of Kant's belief in mysticism according to Dreams of a Spirit-Seer, remain controversial. On 31 March 1770, aged 45, Kant was finally appointed Full Professor of Logic and Metaphysics (Professor Ordinarius der Logic und Metaphysic) at the University of K\"onigs\-berg. In defense of this appointment, Kant wrote his inaugural dissertation (Inaugural - Dissertation) De Mundi Sensibilis atque Intelligibilis Forma et Principiis (On the Form and Principles of the Sensible and the Intelligible World).[1] This work saw the emergence of several central themes of his mature work, including the distinction between the faculties of intellectual thought and sensible receptivity. To miss this distinction would mean to commit the error of subreption, and, as he says in the last chapter of the dissertation, only in avoiding this error does metaphysics flourish.
\vskip0.5\baselineskip \it Cited from Wikipedia}
\newbox\textbox
\setbox\textbox=\vtop{\text}
\newbox\textboxtemp
\newcount\textcounter
\textcounter=0

\newif\ifloop 
{\bf About text floating into columns} \vskip\baselineskip

\loop
\setbox0=\vsplit\textbox to \columnheight
\setbox2=\vsplit\textbox to \columnheight
\setbox4=\vsplit\textbox to \columnheight
\ifvoid0
\loopfalse
\else
\looptrue
\hbox{\box0 \hskip10pt\copy2  \hskip10pt\copy4}
\fi
\ifloop
\repeat
\bye

请注意,如果按编号访问框,则应使用小于 10 的寄存器,对于本地分配使用偶数,对于全局分配使用奇数。例如,如果您使用 box11,则您会覆盖 \strutboxbreak \strut,该 break 在多个地方用于规范行距。

测试\ifloop只是一个否定\ifvoid。在 latex 版本中,\loop它不需要,因为您可以使用\ifvoid0 \else ... \repeat,但纯 tex\loop不允许\else。或者,您可以\unless\ifvoid0 ... \repeat在 pdftex 中使用,但不能在 tex 中使用,因为后者不启用 e-tex 扩展。

与您的循环问题无关,如上图所示,您需要注意第一行对齐,并防止\parskip拉伸以保持线条对齐。

如果你初始化

 \setbox\textbox=\vtop{\hbox{}\parskip=0pt \text}

在此处输入图片描述

相关内容