david@wiley.UUCP (David Hull) (03/22/89)
This isn't a bug, but an enhancement to texinfo.tex.
Often I print out versions of the GNU documentation with the intention
of only making a few copies. In that case, it's more trouble than it's
worth to try to make double-sided copies from the originals that our
laser printer produces. The following patch to texinfo.tex 1.22 adds a
new command, "@headings single," to produce output with headings
suitable for single-sided copies. It also changes "@headings on" to
"@headings double," but retains "@headings on" as an alias for
backwards compatibility.
To produce single-sided output, before you run tex on a texinfo file
you should modify the texinfo file by changing "@setchapternewpage odd"
to "@setchapternewpage on" and inserting "@headings single" immediately
after the "@end titlepage."
-David
---------------------------------------
David Hull TRW Inc. Redondo Beach, CA
...!{uunet,cit-vax,trwrb}!wiley!david
david%wiley.uucp@csvax.caltech.edu
Prereq: \def\texinfoversion{1.22}
*** gcc/texinfo.tex Thu Feb 23 13:12:35 1989
--- texinfo.tex Tue Mar 21 11:54:07 1989
***************
*** 433,439 ****
\let\oldpage=\page
\def\page{\oldpage \hbox{}}}
! \def\Etitlepage{\endgroup\page\HEADINGSon}
% Make altmode in file print out right
--- 433,439 ----
\let\oldpage=\page
\def\page{\oldpage \hbox{}}}
! \def\Etitlepage{\endgroup\page\HEADINGSdouble}
% Make altmode in file print out right
***************
*** 499,506 ****
%
}% unbind the catcode of @.
! % @headings on turns them on.
! % @headings off turns them off.
% By default, they are off.
\def\headings #1 {\csname HEADINGS#1\endcsname}
--- 499,508 ----
%
}% unbind the catcode of @.
! % @headings double turns headings on for double-sided printing.
! % @headings single turns headings on for single-sided printing.
! % @headings off turns them off.
! % @headings on same as @headings double, retained for compatibility.
% By default, they are off.
\def\headings #1 {\csname HEADINGS#1\endcsname}
***************
*** 509,520 ****
\global\evenheadline={\hfil} \global\evenfootline={\hfil}
\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
\HEADINGSoff
! % When we turn headings on, set the page number to 1,
! % Put current file name in lower left corner,
! % Put chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
! \def\HEADINGSon{
\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
--- 511,522 ----
\global\evenheadline={\hfil} \global\evenfootline={\hfil}
\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
\HEADINGSoff
! % When we turn headings on, set the page number to 1.
! % For double-sided printing, put current file name in lower left corner,
! % chapter name on inside top of right hand pages, document
% title on inside top of left hand pages, and page numbers on outside top
% edge of all pages.
! \def\HEADINGSdouble{
\pagealignmacro
\global\pageno=1
\global\evenfootline={\hfil}
***************
*** 522,527 ****
--- 524,540 ----
\global\evenheadline={\line{\folio\hfil\thistitle}}
\global\oddheadline={\line{\thischapter\hfil\folio}}
}
+ % For single-sided printing, chapter title goes across top left of page,
+ % page number on top right.
+ \def\HEADINGSsingle{
+ \pagealignmacro
+ \global\pageno=1
+ \global\evenfootline={\hfil}
+ \global\oddfootline={\hfil}
+ \global\evenheadline={\line{\thischapter\hfil\folio}}
+ \global\oddheadline={\line{\thischapter\hfil\folio}}
+ }
+ \def\HEADINGSon{\HEADINGSdouble}
% Subroutines used in generating headings
% Produces Day Month Year style of output.