[texhax] Add space and separator except at top of page in LaTeX

Reinhard Kotucha reinhard.kotucha at web.de
Sun Nov 30 03:17:48 CET 2008


Philip TAYLOR (Ret'd) writes:
 > If it were /just/ vertical white space, TeX would
 > do what you want automatically; however, you not
 > only want to lose VWSP at top of page but a
 > horizontal rule as well.  The key lies in what
 > exactly TeX is defined to jettison at top of page,
 > and the answer "discardable items" (pp.~110--112),
 > which include glue, kerns and penalty items.
 > 
 > Now there's no way you can convert a rule into
 > a kern or a penalty item, but you /can/ convert
 > it into a special sort of glue called "leaders".
 > So if you write (for example)
 > 
 > 	\leaders \hrule \vskip 0,4pt
      This should be a period   ^

 > 
 > your rule will be concealed inside leaders, and
 > therefore become discardable.
 > 
 > Whether this will work out of the box with LaTeX,
 > I cannot say, but others more experienced with
 > LaTeX should be able to advise.

Hi Phil, 
it seems that none of the commands mentioned above are redefined
by LaTeX.  Try:

  latex "\relax\nonstopmode\show\leaders\show\hrule\show\vskip\stop"

(Maybe without the quotes on Windows.)  Unless I misunderstand the
output, they all are primitives not replaced my macros.

\leaders is used by some LaTeX macros, there is an additional macro
\rule which takes an optional and two mandatory arguments.

The LaTeX macro \vspace{0.4pt} is discardable, \vspace*{0.4pt} is not.

There are very few plain TeX commands which had been replaced by LaTeX
macros and most of them are macros, not primitives.  They had been
made obsolete by LaTeX's tabbing environment, LaTeX's output routine,
NFSS, and LaTeX's eqnarray environment [1].  The latter is obsolete
too and document class designers better put
\RequirePackage[all]{onlyamsmath} into their class files.

The only primitive which had been changed that I'm aware of is \input.
However, the original behaviour is retained.  You can say \input{foo}
or \input foo .  (Note the space after foo :)

There are *very* few other plain TeX commands which don't work in
LaTeX (either not as expected or not at all) [1].

I assume that what you proposed works perfectly with LaTeX.  Using
LaTeX macros whenever possible is preferred though.

[1] Leslie Lamport, A Document Preparation System, 2nd edition,
    Appendix E, "Using Plain TeX Commands".

Regards,
  Reinhard

-- 
----------------------------------------------------------------------------
Reinhard Kotucha			              Phone: +49-511-3373112
Marschnerstr. 25
D-30167 Hannover	                      mailto:reinhard.kotucha at web.de
----------------------------------------------------------------------------
Microsoft isn't the answer. Microsoft is the question, and the answer is NO.
----------------------------------------------------------------------------


More information about the texhax mailing list