Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!news.cs.indiana.edu!att!ucbvax!FUNCTION.MPS.OHIO-STATE.EDU!neumann From: neumann@FUNCTION.MPS.OHIO-STATE.EDU ("Walter D. Neumann") Newsgroups: comp.text.tex Subject: summary on \midinsert Message-ID: <9103121529.AA20581@function.mps.ohio-state.edu> Date: 12 Mar 91 15:29:50 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 42 Thank-you to all who responded about the problems with midinserts getting out of order. The most severe problems I was having turned out to be an error in a local style file, though the same problem existed in early versions of plain.tex. After careful testing I am fairly sure that this problem (a midinsert that does not fit on the current page being converted to a topinsert that then does fit on the current page) is truly fixed in version 3.0 of plain.tex. Michael Downes was the one who pointed this out: "You might try checking your version of plain.tex to see if you have a recent one (version 3.0 or later). There was a problem with the definition of \endinsert in older versions because \pageshrink was not taken into account." A lesser problem (obscurely documented in Exercise 15.5 of the TeXbook) was addressed by Romesh Kumar: "The problem arises if a relatively large insertion is followed almost immediately by a short one, and there is enough space on the current page to accommodate the second insertion but not the first one. In this case, the first insertion is converted (by TeX) to a \topinsert, after which the second insertion is processed for the current page as usual. A possible way to way to avoid this is to type: \ifnum \insertpenalties > 0 \topinsert \else \midinsert \fi instead of \midinsert to begin the insertions. \insertpenalties is the number of insertions being held over for a succeeding page." Indeed, one might use \MidInsert instead of \midinsert, defined by: \def\MidInsert{\ifnum\insertpenalties>0\topinsert\else\midinsert\fi} This appears to work fine, but I am not sure why. My experiments indicate that \insertpenalties is 100 if any topinsertions are pending, no matter how many, which is not what the TeXbook led me (or Kumar) to believe. -- Walter Neumann Email: neumann@mps.ohio-state.edu Department of Mathematics neumann@ohstpy.bitnet Ohio State University Fax: 614-292-3639 to Neumann, Math Dept Columbus, OH 43210 Tel: (614)-292-4886(office) 292-4975(messages)