% \iffalse meta-comment
%
% Copyright 1994 the LaTeX3 project and the individual authors.
% All rights reserved. For further copyright information see the file
% legal.txt, and any other copyright indicated in this file.
% 
% This file is part of the LaTeX2e system.
% ----------------------------------------
% 
%  This system is distributed in the hope that it will be useful,
%  but WITHOUT ANY WARRANTY; without even the implied warranty of
%  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% 
% 
% IMPORTANT NOTICE:
% 
% For error reports in case of UNCHANGED versions see bugs.txt.
% 
% Please do not request updates from us directly.  Distribution is
% done through Mail-Servers and TeX organizations.
% 
% You are not allowed to change this file.
% 
% You are allowed to distribute this file under the condition that
% it is distributed together with all files mentioned in manifest.txt.
% 
% If you receive only some of these files from someone, complain!
% 
% You are NOT ALLOWED to distribute this file alone.  You are NOT
% ALLOWED to take money for the distribution or use of either this
% file or a changed version, except for a nominal charge for copying
% etc.
% \fi
%
% \iffalse
%%% File: ltpage
%
%<*driver>
% \fi
\ProvidesFile{ltpage.dtx}
             [1994/05/20 v1.0d LaTeX Kernel (Remaining Commands)]
% \iffalse
\documentclass{ltxdoc}
\GetFileInfo{ltpage.dtx}
\title{\filename}
\date{\filedate}
 \author{%
  Johannes Braams\and
  David Carlisle\and
  Alan Jeffrey\and
  Leslie Lamport\and
  Frank Mittelbach\and
  Chris Rowley\and
  Rainer Sch\"opf}

\begin{document}
\maketitle
 \DocInput{\filename}
\end{document}
%</driver>
% \fi
%
% \CheckSum{163}
%
% \section{Page styles and related commands}
%
%
% \changes{v1.0a}{1994/03/07}{Initial version, split from ltherest.dtx}
% \changes{v1.0b}{1994/04/19}{Improve documentation}
%
%
% \subsection{Page Style Commands}
%
%  |\pagestyle|\marg{style} : sets the page style of the
%  current and succeeding  pages to \emph{style}
%
%  |\thispagestyle|\marg{style} : sets the page style of the
%  current page only to \emph{style}. 
%
%  To define a page style \emph{style}, you must define
%  |\ps@|\emph{style} to set the page style parameters.
%
%  HOW A PAGE STYLE MAKES RUNNING HEADS AND FEET:
%
% The |\ps@|\ldots command defines the macros |\@oddhead|, |\@oddfoot|,
% |\@evenhead|, and |\@evenfoot| to define the running heads and feet.
% (See output routine.)  To make headings determined by the sectioning
% commands, the page style defines the commands |\chaptermark|,
% |\sectionmark|, etc., where |\chaptermark|\marg{text} is called by
% |\chapter| to set a mark.  The |\...mark| commands and the |\...head|
% macros are defined  with the help of the following macros.  
%
% (All the |\...mark| commands should be initialized to no-ops.)
%
% \subsection{marking conventions}
%
% \LaTeX\ extends TeX's |\mark| facility by producing two kinds of marks
% a `left' and a `right' mark, using the following commands:\\
%     |\markboth|\marg{left}\marg{right} : Adds both marks.\\
%     |\markright|\marg{right}      : Adds a 'right' mark.\\
%     |\leftmark| : 
%        Used in the output routine, gets the current `left'  mark.
%        Works like TeX's |\botmark.|\\
%     |\rightmark| : 
%        Used in the output routine, gets the current `right' mark.
%        Works like TeX's |\firstmark|.
% The marking commands work reasonably well for right marks `numbered
% within' left marks---e.g., the left mark is changed by a |\chapter|
% command and the right mark is changed by a |\section| command.
% However, it does produce somewhat anomalous results if 2 |\markboth|'s
% occur on the same page.
%
% Commands like |\tableofcontents| that should set the marks in some
% page styles use a |\@mkboth| command, which is |\let| by the pagestyle
% command (|\ps@...|) to |\markboth| for setting the heading or to
% |\@gobbletwo| to do nothing.
%
% \StopEventually{}
%
%    \begin{macrocode}
%<*2ekernel>
%    \end{macrocode}
%
% \begin{macro}{\pagestyle}
% \changes{LaTeX2e}{1994/01/24}
%         {(DPC) Complain if pagestyle is undefined.}
% \changes{LaTeX2e}{1994/02/01}
%         {(DPC) Modify to get nicer error message}
%    \begin{macrocode}
\def\pagestyle#1{%
  \@ifundefined{ps@#1}%
    \undefinedpagestyle
    {\@nameuse{ps@#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{macro}{\thispagestyle}
% \changes{LaTeX2e}{1994/02/01}
%         {(DPC) Modify to get nicer error message}
%    \begin{macrocode}
\def\thispagestyle#1{%
  \@ifundefined{ps@#1}%
    \undefinedpagestyle
    {\global\@specialpagetrue\gdef\@specialstyle{#1}}}
%    \end{macrocode}
% \end{macro}
%
% \begin{oldcomments}
%
% Default Initializations
%
%    \begin{macrocode}
\def\ps@empty{%
  \let\@mkboth\@gobbletwo\let\@oddhead\@empty\let\@oddfoot\@empty
  \let\@evenhead\@empty\let\@evenfoot\@empty}
%    \end{macrocode}
%
%    \begin{macrocode}
\def\ps@plain{\let\@mkboth\@gobbletwo
     \let\@oddhead\@empty\def\@oddfoot{\reset@font\rmfamily\hfil\thepage
     \hfil}\let\@evenhead\@empty\let\@evenfoot\@oddfoot}
%    \end{macrocode}
%
%    We implement |\@leftmark| and |\@rightmark| in terms of already
%    defined commands to save token space. We can't get rid of them
%    since they are sometimes used in applications.
%    \begin{macrocode}
\let\@leftmark\@firstoftwo
\let\@rightmark\@secondoftwo
%    \end{macrocode}
%
% test for @nobreak added 15 Apr 86 in \markboth and \markright
% letting \label and \index to \relax added 22 Feb 86 so these
%   commands can appear in sectioning command arguments
% RmS 91/06/21 Same for \glossary
%
%
% \changes{v1.0d}{1994/05/20}{Changed setting for \cs{protect}.}
%    \begin{macrocode}
\def\markboth#1#2{\gdef\@themark{{#1}{#2}}{%
     \let\protect\@unexpandable@protect
     \let\label\relax \let\index\relax \let\glossary\relax
     \mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
\def\markright#1{{\let\protect\@unexpandable@protect
     \let\label\relax \let\index\relax \let\glossary\relax
     \expandafter\@markright\@themark
     {#1}\mark{\@themark}}\if@nobreak\ifvmode\nobreak\fi\fi}
%    \end{macrocode}
%
% \end{oldcomments}
%
% \changes{LaTeX2e}{1993/12/17}{Stopgap solution to mark \cmd{leftmark}
%      and \cmd{rightmark} work without initializing mark until
%      the problem is solved.}
% \task{???}{mark initialisation solved?}
%    \begin{macrocode}
\def\@markright#1#2#3{\gdef\@themark{{#1}{#3}}}
\def\leftmark{\expandafter\@leftmark\botmark{}{}}
\def\rightmark{\expandafter\@rightmark\firstmark{}{}}
%    \end{macrocode}
%
% Initialization
%
%    \begin{macrocode}
\def\@themark{{}{}}
%    \end{macrocode}
%
%  \begin{macro}{\mark}
%    We initialize the internal \TeX{} |\mark| when we reach
%    |\begin{document}|. Initialization in the format would not
%    survive.
% \changes{LaTeX2e}{1993/12/16}{Init `mark at begin document}
% \changes{LaTeX2e}{1993/12/17}{Removed init `mark at begin document,
%                  since it doesn't work.}
%    \begin{macrocode}
%\AtBeginDocument{\mark{{}{}}}
%    \end{macrocode}
%  \end{macro}
%
% \begin{oldcomments}
%  OTHER
%  -----
%
%   \raggedbottom :Typesets pages with no vertical stretch, so they have
%                  their natural height instead of all being exactly the
%                  same height.  (Uses a space of .0001fil to avoid
%                  interfering with the 1fil space of \newpage.)
%
%   \flushbottom  : Inverse of \raggedbottom - makes all pages the same
%                   height.
%
%   \sloppy : Resets TeX's parameters so it accepts worse line and page
%             breaks, and slightly more overfull boxes.
%
%   \fussy  : Resets TeX's parameters to their normal finnicky values.
%
%    \begin{macrocode}
\def\raggedbottom{%
  \def\@textbottom{\vskip \z@ \@plus.0001fil}\let\@texttop\relax}
\def\flushbottom{%
  \let\@textbottom\relax \let\@texttop\relax}
%    \end{macrocode}
%
% \end{oldcomments}
%
% Default definitions
%
% \begin{macro}{\sloppy}
%  |\sloppy| will never (well, hardly ever) produce overfull boxes, but
%  may produce underfull ones.  (14 June 85)
%  A sloppypar environment is equivalent to |{\par \sloppy ... \par}|.
% \changes{LaTeX2e}{1993/12/18}{Added `emergencystretch}
%    \begin{macrocode}
\def\sloppy{\tolerance 9999 
            \emergencystretch 3em
            \hfuzz .5\p@ \vfuzz .5\p@}
%    \end{macrocode}
% \end{macro}
%
%    \begin{macrocode}
\def\sloppypar{\par\sloppy}
\def\endsloppypar{\par}
\def\fussy{\tolerance 200 \hfuzz .1\p@ \vfuzz .1\p@}
%    \end{macrocode}
%
% \LaTeX\ default is no overfull box rule.  Changed by document
% style option
%    \begin{macrocode}
\overfullrule 0pt
%</2ekernel>
%    \end{macrocode}
%
% \Finale
%
