Plan 9 from Bell Labs’s /usr/web/sources/contrib/steve/root/sys/lib/texmf/tex/latex/local/troffman.sty

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


% -*-LaTeX-*-
% <BEEBE.TR2TEX>TROFFMAN.STY.6, 24-Feb-87 09:53:53, Edit by BEEBE
% These macros are intended to be referenced by a LaTeX
% \documentstyle[troffman]{article}
% command.  You can insert an 11pt or 12pt option if you like larger
% type--sizes set here are computed from the LaTeX point size setting.
% Size values have been chosen to closely match Unix manual page
% documents, which are actually too wide and too high for good
% typographic taste and readability.
%
\hbadness=10000                 % do not want underfull box messages--there are
                                % usually lots in man pages
\hfuzz=\maxdimen                % no overfull box messages either
\voffset=-0.8in                 % man pages start high on page
\textheight=9in                 % and are long
\textwidth=6.5in                % troff man pages have very wide text
\parindent=0pt
\oddsidemargin=-.2in
\newdimen\singlespacing
\singlespacing=10pt                     % LaTeX has (10+\@ptsize)pt
\addtolength{\singlespacing}{\@ptsize pt} % get size from \documentstyle[??pt]{}

% Use conventional typesetting baselineskip spacing for 10pt type
\normalbaselineskip=1.2\singlespacing
\newlength{\parmargin}  % whole paragraphs indented this much on man pages
\parmargin=3\normalbaselineskip 
\baselineskip=\normalbaselineskip

% page heading/footing
% NB: we need \hfill, not \hfil, here; otherwise box is filled only to current
%     paragraph width
\newcommand{\phead}[3]{%
   \renewcommand{\@oddhead}{%\@setpar{\hangindent=0pt\hangafter=0\@@par}
     {\makebox[\textwidth]{#1(#2) \hfill \rm UNIX Programmer's Manual%
         \hfill #1(#2)}}}%
   \renewcommand{\@oddfoot}{%\@setpar{\hangindent=0pt\hangafter=0\@@par}
      {\makebox[\textwidth]{4th Berkeley distribution \hfill #3%
         \hfill \rm\thepage}}}%
   \renewcommand{\@evenfoot}{\@oddfoot}%
   \renewcommand{\@evenhead}{\@oddhead}%
}
% multi-line left-justified subheading
\def\shead#1{
        \par % force out previous paragraph with its \hangindent values
        \@setpar{\hangindent=0pt\hangafter=0\@@par}
        \typeout{[#1]}  % maybe temporary, but nice for progress report
        \subsubsection*{#1}
        \@setpar{\hangindent=\parmargin\hangafter=0\@@par}
}

\newcommand{\bs}{$\backslash$}
\def\under{\underline}
\def\dotdot{\ddot}
\def\nwl{\hfill\break}          % similar to LaTex's \newline but does not
                                % complain if there is no line to break
\def\ind#1{\par\everypar{\hangindent=#1\hangafter=0\hskip-\parindent}}
\def\tmpind#1{\par\hskip#1}
\newenvironment{SEPcntr}{\begin{center}}{\end{center}}
\def\cntr#1{\begin{SEPcntr} #1 \end{SEPcntr}}
% displayed text, indented, justification off
\def\displaybegin{\par\begingroup\medskip\narrower\narrower\noindent
                  \obeylines\obeyspaces}
\def\displayend{\endgroup\smallskip\noindent}
% fill and nofill
\def\nofill{\par\begingroup\noindent\obeylines
    \frenchspacing\@vobeyspaces\linepenalty10000}
{\catcode`\ =\active\gdef\@vobeyspaces{\catcode`\ \active \let \@xobeysp}}
\def\@xobeysp{\leavevmode{} }
\def\fill{\endgroup\noindent}

% define a boxing macro
\def\boxit#1{\vbox{\hrule\hbox{\vrule\kern10pt\vbox{\medskip\kern5pt#1\bigskip
\kern5pt}\kern10pt\vrule}\hrule}}

% try this TPlist environment
\newcommand{\TPlistlabel}[1]{\mbox{#1}\hfil}
\newenvironment{TPlist}[1]{
\begin{list}{}
    {
      \let\makelabel\TPlistlabel
      \settowidth{\labelwidth}{#1mm}
      \setlength{\leftmargin}{\parmargin}       % all paragraphs have this much
      \addtolength{\leftmargin}{\labelwidth}    % space for label
    }
  }{
\end{list}}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.