[texhax] kern inside llap inside headline

Suresh Govindachar sgovindachar at yahoo.com
Mon Jan 2 22:42:09 CET 2012


Hello,

  % The headline for my plain TeX document compiled via pdftex is
  % from manmac.tex (extract given below), and \output is from
  % Donald Arseneau on comp.text.tex (code and source below) --
  % and the output is as expected.  However, I am unable to
  % control the amount by which the page number "overhangs" the
  % margin:
  %
  % In the lines:
  %
  %       \llap{\tenbf\folio\kern1pc}%
  %       \rlap{\kern1pc\tenbf\folio}%
  %
  % changing the amount of \kern from 0.1pc to 1pc to 10pc has
  % _no_ effect on the output.  I thought \kern cannot stretch or
  % shrink and so was expecting to be able to control the amount
  % by which the page number "overhangs" the margin.
  %
  % So how can the horizontal location of the page number be
  % further controlled?
  %
  %from manmac.tex:
    \def\rhead{}% \rhead contains the running headline
    %
    \def\leftheadline{\hbox to \pagewidth{\spaceskip=0pt
        \vbox to 10pt{}% strut to position the baseline
        \llap{\tenbf\folio\kern1pc}% folio to left of text
        \tenit\rhead\hfil% running head flush left
        }}
    \def\rightheadline{\hbox to \pagewidth{\spaceskip=0pt
        \vbox to 10pt{}% strut to position the baseline
        \hfil\tenit\rhead\/% running head flush right
        \rlap{\kern1pc\tenbf\folio}% folio to right of text
        }}
  %    
  \def\oddevenpageshift{0.12truein}%
  % Donald Arseneau
http://groups.google.com/group/comp.text.tex/msg/bff9634123221983?hl=en
    \catcode`\@=11
    \newdimen\pageshift  \pageshift=\oddevenpageshift%parity of page
controls sign of \pageshift
    \output{\plainoutput}
    \def\plainoutput{\shipout
      \vbox{\moveleft\ifodd\pageno-\fi\pageshift
      \vbox{\makeheadline\pagebody\makefootline}}%
      \advancepageno
      \ifnum\outputpenalty>-\@MM \else\dosupereject\fi}
    \catcode`\@=12
  %    
  %
  % Thanks,
  %
  % --Suresh
  %



More information about the texhax mailing list