Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!SC.ZIB-BERLIN.DBP.DE!Schoepf From: Schoepf@SC.ZIB-BERLIN.DBP.DE (Rainer Schoepf) Newsgroups: comp.text.tex Subject: lastskip Message-ID: <9103191328.AA19226@sc.ZIB-BERLIN.DBP.DE> Date: 19 Mar 91 13:29:00 GMT Sender: daemon@ucbvax.BERKELEY.EDU Lines: 34 From: "Walter D. Neumann" \midinsert still has unresolved problems, which I will report on, hopefully with solution, soon. In trying to fix it I ran into a stupid debugging problem in trying to see why a \removelastskip was not removing the last skip. If I define \def\t{\immediate\write16{\the\lastskip}} and then tex "\medbreak\t\medbreak" with \tracingall, I see that the \t tells me that \lastskip is 0.0pt between the two medbreaks, while the text \ifdim\lastskip<\medskipamount inside the second \medbreak yields "false" (as it should). There is some special treatment of vertical-type quantities (like your \lastskip) within a \write. Try the following: \def\t{\skip0=\the\lastskip\immediate\write16{\the\skip0}} With this you get the correct value of \lastskip. If I remember correctly, the problem with \write is that TeX is in a special "no-mode" when it is processing the content of the \write, and \lastskip can only be accessed reliably in vertical and horizontal modes. The only way to find this out is to read TeX - the program. I'm sorry---there are lots of things that are not in the TeXbook... Dr. Rainer Schoepf Konrad-Zuse-Zentrum ,,Ich mag es nicht, wenn fuer Informationstechnik Berlin sich die Dinge so frueh Heilbronner Strasse 10 am Morgen schon so D-1000 Berlin 31 dynamisch entwickeln!'' Federal Republic of Germany or