Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!rochester!PT!cadre!pitt!darth!apex!gary From: gary@apex.UUCP (Gary Wisniewski) Newsgroups: comp.text Subject: Re: A TeX beginner's question Message-ID: <306@apex.UUCP> Date: Wed, 16-Sep-87 23:36:19 EDT Article-I.D.: apex.306 Posted: Wed Sep 16 23:36:19 1987 Date-Received: Sat, 19-Sep-87 15:39:42 EDT References: <430@ecrcvax.UUCP> Reply-To: gary@apex.UUCP (Gary Wisniewski) Organization: Apex Software Corp., Pittsburgh, Pa. Lines: 56 In article <430@ecrcvax.UUCP> andy@ecrcvax.UUCP (Andrew Dwelly) writes: >I recently started using TeX on a Vax running 4.3, and a qms laser printer >[...] >If I start a new page with a \vskip command, to move a title halfway down >a page, TeX seems to ignore it, and sets the title at the top of the page. > >On the other hand if I print something and then \vskip, it works perfectly. You're not missing anything. \vskip will perform no action if it is found just after a page break. If you want blank space at the top of a page, type: \vfil\eject \leavevmode\vskip 1in %skip an inch at the top /\ Actually, TeX has a set of tokens called `discardable items' /ss\ which consist of glue and penalties. When a page break occurs \ / (usually at a penalty) all discardable items are removed, since \/ you would not normally want such routine glue items as \parskip || or \baselineskip glue to appear just after a page break. The \leavevmode control sequence is defined in plain TeX to the control sequence "\unhbox\voidbox". The effect is to enter horizontal mode, insert \parindent glue, and begin setting a paragraph. The \vskip immediately after causes a skip because \vskip is an inherently vertical command---horizontal mode is exited and since we are no longer at the page break, a skip occurs. Actually, the best way to set information in the middle of a page is to use stretchable glue: \leavevmode\vfil \centerline{\bf Title of the Book} \vskip 20pt \centerline{\small by Me} \vfil\eject This causes the \vfil glue to consume the same amount. A favorite technique of mine is to use infinite glue with a multiplier: \leavevmode\vskip 0pt plus 1fil \centerline{\bf Title of the Book} \vskip 20pt \centerline{\small by Me} \vskip 0pt plus 2fil\eject Now, the title will appear about one third down from the top of the page. This is because the first \vskip has half the stretchability of the second. Think of the first and second \vskips as consuming (1+2)/3 of the vertical whitespace on the page. This has the desirable effect of maintaining the ratio of whitespace even if the page dimensions are changed. (Who could resist an occasional dangerous bend?) Gary Wisniewski {allegra,bellcore,cadre}!pitt!darth!apex!gary