Category : EmTeX is a TeX/LaTeX document editor
Archive   : LATEX.ZIP
Filename : SHOWIDX.DOC

 
Output of file : SHOWIDX.DOC contained in archive : LATEX.ZIP
% SHOWIDX DOCUMENT-STYLE OPTION - released 16 June 1991
% for LaTeX version 2.09
% Copyright (C) 1985, 1988, 1989, 1991 by Leslie Lamport
%
% Prints \index entries in outer margin. For use with book or report
% style. Note: makes \flushbottom the default.

\typeout{Document style option `showidx' - released 16 June 1991}

\newinsert\@margin

%\count\@margin=0 \skip\@margin=0pt % marginal inserts take up no space
\newinsert\indexbox
\dimen\indexbox=\maxdimen
\def\@showidx#1{\insert\indexbox{\small
\hsize\marginparwidth
\hangindent\marginparsep \parindent\z@
\everypar{}\let\par\@@par \parfillskip\@flushglue
\lineskip\normallineskip
\baselineskip .8\normalbaselineskip\sloppy
\raggedright \leavevmode
\vrule \@height .7\normalbaselineskip \@width \z@\relax
#1\relax\vrule
\@height \z@ \@depth .3\normalbaselineskip \@width \z@}}
% 9 Mar 89 : \relax added to fix bug reported by Nelson Beebe
% 11 Oct 89 : Another \relax added to fix bug reported by Joachim Schrod

\def\@leftidx{\hskip-\marginparsep \hskip-\marginparwidth}
\def\@rightidx{\hskip\columnwidth \hskip\marginparsep}

\def\@mkidx{\vbox to \z@{\hbox{\if@twocolumn
\if@firstcolumn \@leftidx \else \@rightidx \fi
\else \if@twoside \ifodd\c@page \@rightidx
\else \@leftidx \fi
\else \@rightidx \fi
\fi
\box\indexbox}\vss}}

\def\raggedbottom{\def\@textbottom{\vskip
\z@ plus.0001fil}\let\@texttop\@mkidx}
\def\flushbottom{\let\@textbottom\relax \let\@texttop\@mkidx}



% \@wrindex is called by \index if \makeindex declaration is used.
%
\def\@wrindex#1#2{\let\thepage\relax
\xdef\@gtempa{\write#1{\string
\indexentry{#2}{\thepage}}}\endgroup\@gtempa
\@showidx{#2}\if@nobreak \ifvmode\nobreak\fi\fi\@esphack}

% \@index is called by \index if there is no \makeindex declaration.
%
\def\@index#1{\@showidx{#1}\endgroup\@esphack}

% 91/06/16 RmS "(hex)20 = space changed to (decimal) 32
% to avoid problems with german.sty

\def\index{\@bsphack\begingroup\@sanitize\catcode32=10\relax\@index}

\def\makeindex{\if@filesw \newwrite\@indexfile
\immediate\openout\@indexfile=\jobname.idx
\def\index{\@bsphack\begingroup
\def\protect####1{\string####1\space}\@sanitize
\catcode32=10 \@wrindex\@indexfile}\typeout
{Writing index file \jobname.idx }\fi}

% \flushbottom is default
%
\flushbottom

\endinput


  3 Responses to “Category : EmTeX is a TeX/LaTeX document editor
Archive   : LATEX.ZIP
Filename : SHOWIDX.DOC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/