gnus / texi / pixidx.sty

% SHOWIDX DOCUMENT-STYLE OPTION - released 16 June 1991
%    for LaTeX version 2.09
% Copyright (C) 1985, 1988, 1989, 1991 by Leslie Lamport
% Modified by Lars Ingebrigtsen 1993
% 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}
\typeout{Modified for use in eyesore.}


  \global \setbox \eye@boxa \hbox{}
  \global \setbox \eye@boxb \hbox{}
  \global \setbox \eye@boxc \hbox{}
  \global \setbox \eye@boxd \hbox{}
  \global \setbox \eye@boxe \hbox{}
  \global \setbox \eye@boxf \hbox{}
  \global \setbox \eye@boxg \hbox{}

\newdimen\eye@boxadim \global\eye@boxadim\z@
\newdimen\eye@boxbdim \global\eye@boxbdim\z@
\newdimen\eye@boxcdim \global\eye@boxcdim\z@
\newdimen\eye@boxddim \global\eye@boxddim\z@
\newdimen\eye@boxedim \global\eye@boxedim\z@
\newdimen\eye@boxfdim \global\eye@boxfdim\z@
\newdimen\eye@boxgdim \global\eye@boxgdim\z@

\newdimen\gnus@horiz \global\gnus@horiz\z@
\newdimen\gnus@vert \global\gnus@vert\z@

% \global\advance\eye@height 8cm


\global\eye@adjust 0cm




  \advance\eye@strutd -1mm

  \ifdim \eye@dim < \eye@height 
%             \eye@strut{\ht#3}
             \vrule \@height 1cm \@width\z@}
    \setbox #3 \hbox{}

  % \typeout{Vi er i showidx.}
  \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
    \ifdim \ht\new@box > \z@
      \typeout{Discarding index.}

    \doinsert \z@
    \ifdim \eyeins@height > \z@
      \ifdim \eye@dim < \eye@height 
         \doinsert 1pt
     \doinsert 1pt

  \ifdim \ht\eye@boxa > \z@
    \ifdim \doinsert > \z@
%      \typeout{Vi inserter i indexbox.}
         \baselineskip .8\normalbaselineskip
      \global \setbox \eye@boxa \copy\eye@boxb
      \global \setbox \eye@boxb \copy\eye@boxc
      \global \setbox \eye@boxc \copy\eye@boxd
      \global \setbox \eye@boxd \copy\eye@boxe
      \global \setbox \eye@boxe \copy\eye@boxf
      \global \setbox \eye@boxf \copy\eye@boxg
      \global \setbox \eye@boxg \hbox{}
      \global \eye@boxadim\eye@boxbdim
      \global \eye@boxbdim\eye@boxcdim
      \global \eye@boxcdim\eye@boxddim
      \global \eye@boxddim\eye@boxedim
      \global \eye@boxedim\eye@boxfdim
      \global \eye@boxfdim\eye@boxgdim
      \global \eye@boxgdim\z@


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


%  \typeout{Vi er i mkidx 1.}

  \vbox to \z@{
    \vskip \gnus@vert
      \hskip \gnus@horiz
  \vbox to \z@{ 
    \ifdim \eyeins@height < \textheight
      \eye@dim \textheight
      \advance \eye@dim -\eyeins@height
%      \vskip \eye@dim
      \eye@dim \eye@height
      \advance \eye@dim -3cm
      \ifdim \eyeins@height > \eye@dim
      %   \vskip -3cm
      \ifodd\c@page \@rightidx \else \@leftidx \fi



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


     \baselineskip .8\normalbaselineskip

\begingroup\@sanitize\catcode32=10\relax\@gnusfig{#3}\global\gnus@horiz#1 \global\gnus@vert#2



% arch-tag: 286974d6-3578-4aa9-b298-f6a03b13f0bd
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.