% \CheckSum{138}
% \iffalse meta-comment
%
% Copyright (C) 2003--2006 by Juergen fenn <juergen.fenn@gmx.de>
% 
% The latest version of the LaTeX Project Public License is
% applicable. Please see 
%
%    http://www.latex-project.org/lppl.txt
%
% for details.
%
% \fi
%
% \iffalse
%<*driver>
\ProvidesFile{wordlike.dtx}
%</driver>
%<package>\NeedsTeXFormat{LaTeX2e}[1999/12/01]
%<package>\ProvidesPackage{wordlike}
%<*package>
    [2006/03/29 v1.2a simulating word processor layout]
%</package>
%
%<*driver>
\documentclass[12pt]{ltxdoc}
  \usepackage{wordlike}[2006/02/28]
  \usepackage[T1]{fontenc}
  \usepackage[latin1]{inputenc}
  \newcommand{\wordlike}{\textsf{wordlike.sty}}
  \EnableCrossrefs         
  \CodelineIndex
  \RecordChanges
  \begin{document}
    \DocInput{wordlike.dtx}
    \PrintChanges
    \PrintIndex
  \end{document}
%</driver>
% \fi
%
% \CharacterTable
%  {Upper-case    \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%   Lower-case    \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
%   Digits        \0\1\2\3\4\5\6\7\8\9
%   Exclamation   \!     Double quote  \"     Hash (number) \#
%   Dollar        \$     Percent       \%     Ampersand     \&
%   Acute accent  \'     Left paren    \(     Right paren   \)
%   Asterisk      \*     Plus          \+     Comma         \,
%   Minus         \-     Point         \.     Solidus       \/
%   Colon         \:     Semicolon     \;     Less than     \<
%   Equals        \=     Greater than  \>     Question mark \?
%   Commercial at \@     Left bracket  \[     Backslash     \\
%   Right bracket \]     Circumflex    \^     Underscore    \_
%   Grave accent  \`     Left brace    \{     Vertical bar  \|
%   Right brace   \}     Tilde         \~}
%
%
% \changes{v1.0}{2006/02/18}{Initial version}
% \changes{v1.0.1}{2006/02/21}{Documentation slightly fixed}
% \changes{v1.2a}{2006/03/29}{Broken v1.1 on CTAN replaced by fixed
%   local version 1.2a}
%
% \GetFileInfo{wordlike.dtx}
%
% \title{The \textsf{wordlike} package\thanks{This document
%     corresponds to \textsf{wordlike}~\fileversion, dated \filedate.
%     -- An earlier version was published as \textsf{redmond.sty} on
%     the author's private website. It was renamed to \wordlike{} so
%     as to make it easier for users to find the package. --
%     Suggestions should be sent to the author at
%     \texttt{juergen.fenn@gmx.de}~. -- I would like to thank
%     \emph{Peter Flynn} and \emph{Scott Pakin} for contributing
%     example code and for making suggestions for more features in
%     \texttt{comp.text.tex}. -- Thanks also to \emph{Martin Wilhelm
%       Leidig} for pointing out an embarrasing syntax error in
%     version 1.1 I last uploaded to CTAN. I apologise for any
%     inconvenience this may have caused.}}
%
% \author{J�rgen Fenn}
%
% \maketitle
% \tableofcontents
%
% \begin{abstract}
%   This manual describes \wordlike{} for simulating word processor
%   layout using \LaTeXe.
% \end{abstract}
% 
% \section{Why \wordlike?}
%
% We know that there is typesetting beyond \textsf{Microsoft Word}.
% After all, this is why we use \LaTeX \dots
%
% On the other hand, the default settings used in \LaTeX\ do not fit
% every purpose.  Authors of scientific papers or those using \LaTeX{}
% in office often have to cope with minute descriptions of how their
% papers should look like.  In most cases, the layout required goes
% back to what we know from word processors. Often, users ask how to
% change the look of headings or how to reduce page margins.
%
% Some think we should ignore the typographic ignorants that want us
% to produce such ugly-look\-ing layout. But after all, we produce our
% papers for the ``market'' and those we write for have certain
% expectations about what they should look like. Oftentimes users have
% no say at all in what their thesis supervisors etc. want their
% documents to look like. This is why I think we ought to take these
% demands seriously. Word processors have had that big an impact on
% our definition of typography and on most people's habits of viewing
% that it cannot be denied most addressees think papers should be
% produced with a word processor (and that those papers that are not
% produced this way should look as if they were produced using a word
% processor\dots). After all, only a minority of people out there even
% know about \LaTeX\dots
%
% So \wordlike{} pays tribute to the ubiquitous typewriter-like layout
% of the word processor. You may not be surprised, then, that the
% package is named after the program \textsf{``Microsoft
%   Word''}.\footnote{Cynics may say that the program is called
%   ``word'', but neither ``sentence'' nor ``paragraph'' nor ``book''
%   or the like which may already be a hint to certain limitations you
%   should be aware of when trying to use it for scientific purposes.}
% Let \textsf{wordlike} be a synonym for this way of typesetting,
% although we should be aware that other word processors such as
% \textsf{StarOffice}/\textsf{OpenOffice}, or \textsf{Word Perfect}
% may produce a layout different from---and maybe better
% than--\textsf{MS Word}'s layout.
%
% \wordlike{} is for those \LaTeX\ users who do not want to use a word
% processor in order to produce a paper that looks as though it were
% made in a word processor. I leave it to you whether you deem this a
% progressive development, as it allows you to use your favourite
% typesetting software even for these tasks, or whether you rather find
% it a foolish idea, eventually supporting proprietary software. I don't
% mind as this package is useful at least to me. \texttt{;-)}
%
% I mostly use it for creating handouts as for this purpose I can do
% without the broad page margins \LaTeX\ comes with by default.
% Aesthetics, or ease of reading here are no criteria for typesetting as
% the public I address---German students of law and lawyer colleages of
% mine---usually are not at all interested in this. They only very
% seldomly know about the world beyond \textsf{Microsoft Office}, and,
% sadly, they usually reject by instinct anything that does not look
% like what they are used to.
%
% \section{Usage}
% Usage is straightforward: Insert |\usepackage{wordlike}| in the
% preamble of your document. Usually no more is needed.
% 
% You might like to know about the option \texttt{basic}, though,
% which typesets section headings \texttt{bold} and
% \texttt{normalsize}.
%
% \wordlike{} is made for \texttt{article} class or a replacement for
% this, \emph{e.\,g.} \texttt{scratcl} from the \textsf{KOMA-Script}
% bundle, or whatever other class you prefer.\footnote{I think this
%   will suffice in most cases. If you require an option for
%   \texttt{book} and \texttt{report} classes, please let me know.}
% 
% \wordlike{} does, however, require the following packages:
% \begin{itemize}
% \item \textsf{courier}
% \item \textsf{geometry}
% \item \textsf{helvet}
% \item \textsf{mathptmx}
% \end{itemize}
% \changes{v1.2a}{2006/03/29}{Hint to the arial package added.}  They
% are usually installed on a \LaTeX{} system.\footnote{Please note
%   that \emph{Walter Schmidt} by now has supplied a clone of the
%   Arial font usually used on Windows systems. His package is
%   available from \texttt{CTAN://fonts/urw/arial}~. If the package is
%   installed on your system you may replace Helvetica by Arial to
%   achieve still ``better'' results.}
%
% No\label{sec:fontsize} attempt is made to set the default font size
% to \texttt{12pt} because this is typically done when loading a
% document class. So, font size is left to the users' preferences. If
% you use \texttt{article.cls} your preamble should start like this:
% \begin{verbatim}
%   \documentclass[12pt]{article}
%   \usepackage{wordlike}
% \end{verbatim}
%
% \StopEventually{}
%
% \section{Implementation}
% \subsection{Option \texttt{msword}}
% \changes{v1.1}{2006/02/28}{New option \texttt{msword}}
% Default settings are provided by option \texttt{msword} which tries
% to resemble the usual layout supplied by \textsf{Microsoft
%   Word}.\footnote{I have to admit, though, that the last version of
%   \textsf{Word} I used was \textsf{Word 2000} and I don't have
%   \textsf{MS Word} installed on my system for quite a while now
%   because it was of no use to me since my thesis surpassed 20
%   pages{}\dots So, I would be grateful if you please could let me
%   know if you are missing a feature.}
%    \begin{macrocode}
\DeclareOption{msword}{
%    \end{macrocode}
% \subsubsection{Word-like section numbering and table of contents}
% We start by redefining the depth of section numbering both in the
% document and in the table of contents. All five sectioning levels
% are supported and appear in the table of contents by default.
%    \begin{macrocode}
\setcounter{secnumdepth}{5}%
\setcounter{tocdepth}{5}%
%    \end{macrocode}
% Then, the look of the table of contents is modified. First, the dots
% that appear between section headings and page numbers in the TOC are
% re-defined so that they are typeset closer to one another:
%    \begin{macrocode}
\renewcommand{\@dotsep}{1}
%    \end{macrocode}
% Now, the appearance of TOC entries is slightly modified.
%    \begin{macrocode}
\renewcommand\l@section{\@dottedtocline{1}{0em}{1.5em}}
\renewcommand*\l@subsection{\@dottedtocline{2}{1.5em}{2.3em}}
\renewcommand*\l@subsubsection{\@dottedtocline{3}{3.8em}{3.2em}}
\renewcommand*\l@paragraph{\@dottedtocline{4}{7.0em}{4.1em}}
\renewcommand*\l@subparagraph{\@dottedtocline{5}{10em}{5em}}
%    \end{macrocode}
% \subsubsection{Word-like section headings}
% \textsf{Microsoft Word} pursues a completely different approach to
% typesetting section headings than \LaTeX{} does. All headings are
% typeset using bold sansserif fonts, except for \texttt{paragraph}s
% and \texttt{subparagraph}s.
%    \begin{macrocode}
\renewcommand{\section}{\@startsection%
  {section}%
  {0}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\bfseries\LARGE\sffamily}}%
\renewcommand{\subsection}{\@startsection%
  {subsection}%
  {1}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\bfseries\Large\itshape\sffamily}}%
\renewcommand{\subsubsection}{\@startsection%
  {subsubsection}%
  {2}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\bfseries\Large\itshape\sffamily}}%
\renewcommand{\paragraph}{\@startsection%
  {paragraph}%
  {3}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\normalfont\normalsize\itshape\sffamily}}%
\renewcommand{\subparagraph}{\@startsection%
  {subparagraph}%
  {4}%
  {0.7cm}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\normalfont\normalsize\itshape\sffamily}}%
%    \end{macrocode}
% If you prefer to put a full stop after the section numbering I
% recommend you use documentclass \texttt{scrartcl} from
% \textsf{KOMA-Script} with option \texttt{pointednumbers}:
% \begin{quote}
%   |\documentclass[12pt,a4paper,pointednumbers]{scrartcl}|
% \end{quote}
% \changes{v1.2}{2006/03/19}{Recommendation for footmisc added}
% In this case you should also load package |footmisc.sty| if you use
% footnotes because \textsf{KOMA-Script} re-defines footnotes in a way
% no user of a word processor would ever do. 
%
% \subsection{Word-like document title}
% \changes{v1.1}{2006/02/28}{New title, author, date commands}
% Document title, author and date are re-defined,
% too.\footnote{\label{fn:flynn}Part of this code goes back to a
%   contribution by \emph{Peter Flynn} who implemented
%   \textsf{winword.sty} a while ago (\emph{cf.}  \emph{ibid.},
%   TUGboat 20 (1999), p.\,344.)} The paper's title is typeset
% flushleft, bold and \texttt{LARGE}. The author's name and the date
% of publishing are placed beneath the title in \texttt{large} serif
% fonts. Note that the title starts right at the top of the page, no
% skip above.
%    \begin{macrocode}
\def\@maketitle{\newpage
    \begin{flushleft}%
        \let\footnote\thanks%
       {\LARGE\bfseries\sffamily \@title \par\medskip}%
       {\large\@author\par}%
       {\large\@date}%
    \end{flushleft}\par\vskip\baselineskip%
    \thispagestyle{empty}}%
%    \end{macrocode}
% This ends default option \texttt{msword}.
%    \begin{macrocode}
}
%    \end{macrocode}
%
% \subsection{Option \texttt{basic}}
% \changes{v1.1}{2006/02/28}{New option \texttt{basic}}
% Option \texttt{basic} supplies a more ``reserved'' look for section
% headings. If you call \wordlike{} with the option \texttt{basic} all
% headings are typeset \texttt{normalsize}. This also holds true for
% the heading introducing the table of contents.
%    \begin{macrocode}
\DeclareOption{basic}{%
\renewcommand{\section}{\@startsection%
  {section}%
  {0}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\bfseries\normalsize}}%
\renewcommand{\subsection}{\@startsection%
  {subsection}%
  {1}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\bfseries\normalsize}}%
\renewcommand{\subsubsection}{\@startsection%
  {subsubsection}%
  {2}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\normalfont\normalsize\itshape}}%
\renewcommand{\paragraph}{\@startsection%
  {paragraph}%
  {3}%
  {0em}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\normalfont\small\itshape}}%
\renewcommand{\subparagraph}{\@startsection%
  {subparagraph}%
  {4}%
  {0.7cm}%
  {-\baselineskip}%
  {0.5\baselineskip}%
  {\normalfont\small\itshape}}%
}
%    \end{macrocode}
%
% \subsection{Executing options}
% By default option \texttt{msword} is executed. 
%    \begin{macrocode}
\ExecuteOptions{msword}
%    \end{macrocode}
% If \wordlike{} is called with the option \texttt{basic} the layout
% is slightly changed accordingly here:
%    \begin{macrocode}
\ProcessOptions\relax
%    \end{macrocode}
% \subsection{Loading required packages}
% Then, external packages \wordlike{} relies upon are loaded. First,
% page margins are set to narrow: 2,5\,cm all around, including the
% footer: 
%    \begin{macrocode}
\RequirePackage[includefoot,margin=2.5cm]{geometry}%
%    \end{macrocode}
% Now, the typical fonts you would expect from a word processor are
% loaded: Times, Helvetica and Courier:
%    \begin{macrocode}
\RequirePackage{mathptmx}%
\RequirePackage[scaled=.90]{helvet}%
\RequirePackage{courier}%
%    \end{macrocode}
% For font size \emph{cf.} page \pageref{sec:fontsize}.
% \subsection{Special commands}
% There are some commands in \LaTeX{} documents word processors don't
% know about (and never will\dots).\footnote{Thanks, again (\emph{cf.}
%   footnote \ref{fn:flynn}) to Peter Flynn for this point.} They have
% to be replaced by ordinary text:
%    \begin{macrocode}
\renewcommand\TeX{TeX}
\renewcommand\LaTeX{LaTeX}
%    \end{macrocode}
% \subsection{Word-like typesetting}
% Sloppy typesetting is provided by using
%    \begin{macrocode}
\sloppy%
%    \end{macrocode}
% for the whole document.
%
% No attempt is made, however, to simulate \textsf{Microsoft Word}'s
% line-breaking mechanism, or even to modify word spacing beyond going
% ``sloppy''.  Some suggestions on this have been given by \LaTeX{}
% developers, although not in full earnest: \texttt{;-)}
% \begin{itemize}
% \item \emph{Donald Arseneau}, \texttt{comp.text.tex},\newline
%     MID: |<23MAR199815480027@erich.triumf.ca>|,\newline and
%     |<yfiaed12u33.fsf@triumf.ca>|.
% \item \emph{Mark Trettin}, \texttt{de.comp.text.tex},\newline 
%     MID: |<m3el63q67v.fsf@beldin.mt743742.dialup.rwth-aachen.de>|.
% \item \emph{Markus Kohm}, \texttt{de.comp.text.tex},\newline
%     MID: |<1913912.19c0S0PJ5s@ID-107054.user.dfncis.de>|.
% \end{itemize}
% Users are encouraged to play with the code provided there.
%
% \section{To do}
% Of course, suggestions are welcome. Please feel free to write me an
% email (see cover page for details).
%
% \begin{center}$\ast$\ $\ast$\ $\ast$\end{center}
% 
% \Finale
\endinput