has@ztivax.UUCP (Hans-Albert Schneider) (03/01/90)
[As the original request was to comp.text, but TeX related stuff is now to go to comp.text.tex, I am posting this to both groups. HAS.] Some weeks ago, in comp.text, I asked: > Trying to create a new letter style (actually, a style option) for > LaTeX, I ran into some minor problems. > > The style is to be used with our firm's preprinted letter sheets, > i.e., the dimensions for the first page are to fit into this format. I > succeeded to position the stuff for the heading and the first page's > footer as desired; however, since this preprinted footer is rather > large -- it extends to some 5cm (about 2in) from the bottom of the > page -- I would like to change the \textheight for the first page. I > tried the following: > > \def\ps@firstpage{ > \setlength{\textheight}{19cm} > \setlength{\footskip}{6cm} > \def\@oddhead{} > ...} > and \thispagestyle{firstpage} in the definition of \opening. > > Though \footskip is obeyed, \textheight is not. > > Furthermore, I would like to set \textwidth (and, if necessary, > \oddsidemargin) differently for the footer (of the first page) to > avoid "Overfull \hbox" messages. Guess -- \textwidth is ignored (I did > not try with \oddsidemargin). Thanks to Bernd Raichle <raichle@informatik.uni-stuttgart.de> who pointed me to the problem: ``\thispagestyle{firstpage}'' sets some flag but does not expand the \ps@firstpage macro---this expansion is done by \output, and that is too late. His quick&dirty solution (which works fine if you do not want to have more than one letter per document) is to set \textheight=19cm % the height of the first page in the style file, and to use \global\textheight=24cm % the height of the other pages in the definition of \ps@firstpage . For the footer width, he suggested to use \rlap{} ot \llap{}. I copied its definition from ``The TeX book'', and my first footer now looks like this: \setlength{\unitlength}{0.1cm} \def\@oddfoot{\raisebox{0pt}[5cm]{\hbox to 0pt{\tenrm \begin{picture}(170,60) \put(86,37){\makebox(0,0)[tl]{\fromname}} %% and so on \end{picture}\hss}}} Thanks also to Ralf Treinen <yxoc@cs.uni-sb.de> who sent me the essential parts of his letter style (sorry, Ralf, I did not yet find the time to read it carefully---I just had a first glance). Finally, thanks to everybody who tried to answer but did not get through :-). Hans-Albert -- Hans-Albert Schneider ARPA: has@ztivax.siemens.com Siemens AG, ZFE IS INF 21 or: has%ztivax@siemens.siemens.com Otto-Hahn-Ring 6, Munich, W.Germany EUnet & UUCP: phone: (+49) 89 636 45 890 has@ztivax.UUCP