<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">\title{Layout design with \LaTeXbf\ is possible}
Contrary to a widespread belief, \LaTeX\ does not force you to use one of
the four sample layouts provided by Leslie Lamport.
Rather, you can define and use any reasonable layout,
and doing so within the framework of \LaTeX\ is in fact
less difficult than with plain \TeX.
 
How does this work?
Who is who in \LaTeX's high society?
\bi
The author specifies the contents in the {\tt tex}-file.
\bi
The layout designer specifies the layout in the {\tt sty}-files.
\bi
\LaTeX\ typesets the contents,
using the layout that results from the style files
specified in the |\documentstyle| command.
 
\noindent How can you implement and use a new layout?
I recommend  these four steps:
 
\item{1}
find an original \LaTeX\ style file that produces a similar layout,
 
\item{2}
find the definitions of the features that have to be changed,
 
\item{3}
write a style option file that contains the modified versions of these
definitions,
 
\item{4}
add the name of this file
as an option into the |\documentstyle| command.
 

 \noindent
Where do you find the original layout definitions
and an explanation how to modify them?
This information is distributed over four sources:

 
\item{1} Leslie Lamport's \LaTeX\ manual,
 
\item{2} the files {\tt article.doc}, {\tt art10.doc} etc.,
 
\item{3} the file {\tt latex.tex},
 
\item{4} Donald Knuth's \TeX book.
 
For the fun of it, just try the following two examples:
 
The first one deals with section headings.
In file {\tt art10.doc}, you will find definitions like
\begintt
\def\section{\@startsection
   {section}{1}{\z@}%1,2,3
   {-3.5ex plus -1ex minus -.2ex}%4
   {2.3ex plus .2ex}%5
   {\Large\bf}}%6
\endtt
The absolute values of the fourth and fifth parameters
specify the spacing before and after the heading,
and the sixth parameter specifies its style.
Therefore, if you want smaller vertical skips and a smaller typesize,
you put the following definitions into your private style option file:
\begintt
\def\section{\@startsection
   {section}{1}{\z@}%1,2,3
   {-1.75ex plus -0.5ex minus -.1ex}%4
   {1.15ex plus .1ex}%5
   {\large\bf}}%6
\endtt
for sections, and similar ones for subsections etc.
 
The second example deals with running headers and footers,
which are defined within \LaTeX's pagestyles.
In file {\tt article.doc}, you will find the following definition for
the {\tt myheadings} pagestyle:
\begintt
\def\ps@myheadings{%
   \let\@mkboth\@gobbletwo
   \def\@oddhead{%
      \hbox{}\sl\rightmark\hfil
      \rm\thepage}%
   \def\@oddfoot{}%
   \def\@evenhead{%
      \rm \thepage \hfil
      \sl\leftmark\hbox {}}%
   \def\@evenfoot{}%
   \def\sectionmark##1{}
   \def\subsectionmark##1{}}
\endtt
If you want running footlines with a horizontal rule, you define
\begintt
\def\ps@myfootings{%
   \let\@mkboth\@gobbletwo
   \def\@oddfoot{\parbox{\textwidth}%
      {\rule{\textwidth}{0.4pt}\\[2pt]
      \mbox{}\small\sl\rightmark \hfill
      \small\sl Page~\thepage}}%
   \def\@oddhead{}%
   \def\@evenfoot{\parbox{\textwidth}%
      {\rule{\textwidth}{0.4pt}\\[2pt]
      \small\sl Page~\thepage \hfill
      \leftmark \mbox{}}}%
   \def\@evenhead{}%
   \def\sectionmark##1{}
   \def\subsectionmark##1{}}
\endtt
You put this definition into a file {\tt myfoot.sty}
and then use it with
\begintt
\documentstyle[11pt,myfoot]{article}
\pagestyle{myfootings}
\markboth{News of \today}{News of \today}
\endtt
 
Other layout features can be changed in similar ways;
there is nothing to stop you from
creating masterpieces of layout design with \LaTeX!
 
\author{Hubert Partl}
\endinput
--------------------------- cut here ------------------------------------
 
</pre></body></html>