%%
%% This is file `logsys.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% coordsys.dtx  (with options: `logsys')
%% 
%% 
%%  This is the coordsys and logsys packages
%%  Copyright 2000-06 by Mogens Lemvig Hansen,
%%                       mlhansen@uniserve.com
%% 
%% This program may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3
%% of this license or (at your option) any later version. The latest
%% version of this license is in
%%   http://www.latex-project.org/lppl.txt
%% and version 1.2 or later is part of all distributions of LaTeX
%% version 2003/12/01 or later.
%% 
%% This program consists of the files coordsys.dtx and coordsys.ins
%% 
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{logsys}[2006/02/03 version 1.4]
\DeclareOption{centred}{\PassOptionsToPackage{centred}{coordsys}}
\DeclareOption{outside}{\PassOptionsToPackage{outside}{coordsys}}
\DeclareOption{inside}{\PassOptionsToPackage{inside}{coordsys}}
\ProcessOptions
\RequirePackage{coordsys}[2006/02/03]
\newcommand{\loglabel}[1]{%
   \ifnum      #1=-2\relax \frac{1}{100}%
   \else\ifnum #1=-1\relax \frac{1}{10}%
   \else\ifnum #1= 0\relax 1%
   \else\ifnum #1= 1\relax 10%
   \else\ifnum #1= 2\relax 100%
   \else                   10^{#1}%
   \fi\fi\fi\fi\fi}
\newcommand{\v@logbox}[2]{%
   \vbox to #1\unitlength{%
      \offinterlineskip
      \vskip \z@ plus  458fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  9
      \vskip \z@ plus  512fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  8
      \vskip \z@ plus  580fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  7
      \vskip \z@ plus  669fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  6
      \vskip \z@ plus  792fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  5
      \vskip \z@ plus  969fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  4
      \vskip \z@ plus 1249fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  3
      \vskip \z@ plus 1761fil\relax
      \vbox to \z@{\vss\hbox{#2}\vss}%  2
      \vskip \z@ plus 3010fil\relax
   }}
\newcommand{\h@logbox}[2]{%
   \hbox to #1\unitlength{%
      \hskip \z@ plus 3010fill\relax
      \hbox to \z@{\hss #2\hss}%  2
      \hskip \z@ plus 1761fill\relax
      \hbox to \z@{\hss #2\hss}%  3
      \hskip \z@ plus 1249fill\relax
      \hbox to \z@{\hss #2\hss}%  4
      \hskip \z@ plus  969fill\relax
      \hbox to \z@{\hss #2\hss}%  5
      \hskip \z@ plus  792fill\relax
      \hbox to \z@{\hss #2\hss}%  6
      \hskip \z@ plus  669fill\relax
      \hbox to \z@{\hss #2\hss}%  7
      \hskip \z@ plus  580fill\relax
      \hbox to \z@{\hss #2\hss}%  8
      \hskip \z@ plus  512fill\relax
      \hbox to \z@{\hss #2\hss}%  9
      \hskip \z@ plus  458fill\relax
   }}
\newcommand{\@sethlogticks}[5]{%
   \thin@ticks
   \@tempcnta=#2\relax
   \ifnum\@tempcnta>0\advance\@tempcnta -1\relax\fi
   \divide\@tempcnta #1\relax
   \ifnum #2>0\advance\@tempcnta 1\relax\fi
   \multiply\@tempcnta #1\relax
   \edef\coordsys@a{\the\@tempcnta}%
   \@tempcntb=#3\relax
   \ifnum\@tempcnta<\@tempcntb\relax
      \advance\@tempcntb -\@tempcnta\relax
      \divide\@tempcntb #1\relax
      \edef\coordsys@b{\the\@tempcntb}%
      \multiput(\coordsys@a,#4)(#1,0)\coordsys@b
         {\h@logbox{#1}{#5}}%
      \thick@ticks
      \@tempcntb=\coordsys@b\relax
      \advance\@tempcntb 1\relax
      \edef\coordsys@b{\the\@tempcntb}%
      \multiput(\coordsys@a,#4)(#1,0)\coordsys@b
         {#5}%
      \if@numbline
         \setcounter{@coord}{\coordsys@a}%
         \divide\c@@coord #1\relax
         \multiput(\coordsys@a,#4)(#1,0)\coordsys@b{%
            \sethlabel{\loglabel{\arabic{@coord}}}%
            \stepcounter{@coord}}%
      \fi
   \fi
}
\newcommand{\@setvlogticks}[5]{%
   \thin@ticks
   \@tempcnta=#2\relax
   \ifnum\@tempcnta>0\advance\@tempcnta -1\relax\fi
   \divide\@tempcnta #1\relax
   \ifnum #2>0\advance\@tempcnta 1\relax\fi
   \multiply\@tempcnta #1\relax
   \edef\coordsys@a{\the\@tempcnta}%
   \@tempcntb=#3\relax
   \ifnum\@tempcnta<\@tempcntb\relax
      \advance\@tempcntb -\@tempcnta\relax
      \divide\@tempcntb #1\relax
      \edef\coordsys@b{\the\@tempcntb}%
      \multiput(#4,\coordsys@a)(0,#1)\coordsys@b
         {\v@logbox{#1}{#5}}%
      \thick@ticks
      \@tempcntb=\coordsys@b\relax
      \advance\@tempcntb 1\relax
      \edef\coordsys@b{\the\@tempcntb}%
      \multiput(#4,\coordsys@a)(0,#1)\coordsys@b
         {#5}%
      \if@numbline
         \setcounter{@coord}{\coordsys@a}%
         \divide\c@@coord #1\relax
         \multiput(#4,\coordsys@a)(0,#1)\coordsys@b{%
            \setvlabel{\loglabel{\arabic{@coord}}}%
            \stepcounter{@coord}}%
      \fi
   \fi
}
\newcommand{\logline}{%
   \@ifstar{\@numblinefalse\hlogline@i}
           {\@numblinetrue \hlogline@i}}
\newcommand{\hlogline@i}[1][50]{\leavevmode\hlogline@ii{#1}}
\newcommand{\hlogline@ii}[3]{{\color@begingroup
   \thinlines
   \@tempcnta=#3\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \put(#2,0){\vector(1,0){\coordsys@w}}%
   \@sethlogticks{#1}{#2}{#3}{0}{\vtickmark}
   \color@endgroup}%
   \def\coordsys@w{0}%
}
\newcommand{\vlogline}{%
   \@ifstar{\@numblinefalse\vlogline@i}
           {\@numblinetrue \vlogline@i}}
\newcommand{\vlogline@i}[1][50]{\leavevmode\vlogline@ii{#1}}
\newcommand{\vlogline@ii}[3]{{\color@begingroup
   \thinlines
   \@tempcnta=#3\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \put(0,#2){\vector(0,1){\coordsys@h}}%
   \@setvlogticks{#1}{#2}{#3}{0}{\htickmark}
   \color@endgroup}%
   \def\coordsys@h{0}%
}
\newcommand{\logsys}{%
   \def\coordsys@c{\logsys@i}%
   \def\@hticksep{10}%
   \def\@vticksep{50}%
   \@ifstar{\@numblinefalse\logsys@args@i}
           {\@numblinetrue \logsys@args@i}}
\newcommand{\logsys@args@i}[1][\@hticksep]{\leavevmode
   \edef\@hticksep{#1}%
   \logsys@args@ii}
\newcommand{\logsys@args@ii}[1][\@vticksep]{%
   \edef\@vticksep{#1}%
   \coordsys@args@iii}
\def\logsys@i#1#2(#3,#4){{\color@begingroup
   \thinlines
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \put(#1,#2){\vector(1,0){\coordsys@w}}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \put(#1,#2){\vector(0,1){\coordsys@h}}%
   \@set@ticks{\hthickratio}{\@hticksep}{#1}{#3}{6\p@}{%
      \multiput(\coordsys@a,#2)(\coordsys@c,0)\coordsys@b\vtickmark}%
   \if@numbline
      \setcounter{@coord}{\coordsys@a}%
      \multiput(\coordsys@a,#2)(\coordsys@c,0)\coordsys@b{%
         \edef\coordsys@a{\arabic{@coord}}%
         \sethlabel{\hlabel{\coordsys@a}}%
         \addtocounter{@coord}{\coordsys@c}}%
   \fi
   \@setvlogticks{\@vticksep}{#2}{#4}{#1}{\htickmark}%
   \color@endgroup}%
   \def\coordsys@h{#1}%
   \def\coordsys@w{#2}%
}
\newcommand{\semilogsys}{%
   \def\coordsys@c{\semilogsys@i}%
   \def\@hticksep{50}%
   \def\@vticksep{10}%
   \@ifstar{\@numblinefalse\logsys@args@i}
           {\@numblinetrue \logsys@args@i}}
\def\semilogsys@i#1#2(#3,#4){{\color@begingroup
   \thinlines
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \put(#1,#2){\vector(1,0){\coordsys@w}}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \put(#1,#2){\vector(0,1){\coordsys@h}}%
   \@sethlogticks{\@hticksep}{#1}{#3}{#2}{\vtickmark}%
   \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{6\p@}{%
      \multiput(#1,\coordsys@a)(0,\coordsys@c)\coordsys@b\htickmark}%
   \if@numbline
      \setcounter{@coord}{\coordsys@a}%
      \multiput(#1,\coordsys@a)(0,\coordsys@c)\coordsys@b{%
         \edef\coordsys@a{\arabic{@coord}}%
         \setvlabel{\vlabel{\coordsys@a}}%
         \addtocounter{@coord}{\coordsys@c}}%
   \fi
   \color@endgroup}%
   \def\coordsys@h{#1}%
   \def\coordsys@w{#2}%
}
\newcommand{\loglogsys}{%
   \def\coordsys@c{\loglogsys@i}%
   \def\@hticksep{50}%
   \def\@vticksep{50}%
   \@ifstar{\@numblinefalse\logsys@args@i}
           {\@numblinetrue \logsys@args@i}}
\def\loglogsys@i#1#2(#3,#4){{\color@begingroup
   \thinlines
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \put(#1,#2){\vector(1,0){\coordsys@w}}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \put(#1,#2){\vector(0,1){\coordsys@h}}%
   \@sethlogticks{\@hticksep}{#1}{#3}{#2}{\vtickmark}%
   \@setvlogticks{\@vticksep}{#2}{#4}{#1}{\htickmark}%
   \color@endgroup}%
   \def\coordsys@h{#1}%
   \def\coordsys@w{#2}%
}
\newcommand{\loggrid}{%
   \def\@hticksep{10}%
   \def\@vticksep{50}%
   \@numblinefalse
   \@ifstar{\def\coordsys@c{\loggrid@ii}\logsys@args@i}
           {\def\coordsys@c{\loggrid@i}\logsys@args@i}}
\def\loggrid@i#1#2(#3,#4){{\color@begingroup
   \coordgrid@calc
   \grid@style
   \@set@ticks{\hthickratio}{\@hticksep}{#1}{#3}{\z@}{%
      \multiput(\coordsys@a,0)(\coordsys@c,0)\coordsys@b
         {\vgridfromto{#2}{#4}}}%
   \@setvlogticks{\@vticksep}{#2}{#4}{0}{\hgridfromto{#1}{#3}}%
   \color@endgroup}}
\def\loggrid@ii#1#2(#3,#4){{\color@begingroup
   \grid@style
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \@set@ticks{\hthickratio}{\@hticksep}{#1}{#3}{\z@}{%
      \multiput(\coordsys@a,#2)(\coordsys@c,0)\coordsys@b
         {\vgridlength{\coordsys@h}}}%
   \@setvlogticks{\@vticksep}{#2}{#4}{#1}{\hgridlength{\coordsys@w}}%
   \color@endgroup}}
\newcommand{\semiloggrid}{%
   \def\@hticksep{50}%
   \def\@vticksep{10}%
   \@numblinefalse
   \@ifstar{\def\coordsys@c{\semiloggrid@ii}\logsys@args@i}
           {\def\coordsys@c{\semiloggrid@i}\logsys@args@i}}
\def\semiloggrid@i#1#2(#3,#4){{\color@begingroup
   \coordgrid@calc
   \grid@style
   \@sethlogticks{\@hticksep}{#1}{#3}{0}{\vgridfromto{#2}{#4}}%
   \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{\z@}{%
      \multiput(0,\coordsys@a)(0,\coordsys@c)\coordsys@b
         {\hgridfromto{#1}{#3}}}%
   \color@endgroup}}
\def\semiloggrid@ii#1#2(#3,#4){{\color@begingroup
   \grid@style
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \@sethlogticks{\@hticksep}{#1}{#3}{#2}{\vgridlength{\coordsys@h}}%
   \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{\z@}{%
      \multiput(#1,\coordsys@a)(0,\coordsys@c)\coordsys@b
         {\hgridlength{\coordsys@w}}}%
   \color@endgroup}}
\newcommand{\logloggrid}{%
   \def\@hticksep{50}%
   \def\@vticksep{50}%
   \@numblinefalse
   \@ifstar{\def\coordsys@c{\logloggrid@ii}\logsys@args@i}
           {\def\coordsys@c{\logloggrid@i}\logsys@args@i}}
\def\logloggrid@i#1#2(#3,#4){{\color@begingroup
   \coordgrid@calc
   \grid@style
   \@sethlogticks{\@hticksep}{#1}{#3}{0}{\vgridfromto{#2}{#4}}%
   \@setvlogticks{\@vticksep}{#2}{#4}{0}{\hgridfromto{#1}{#3}}%
   \color@endgroup}}
\def\logloggrid@ii#1#2(#3,#4){{\color@begingroup
   \grid@style
   \@tempcnta=#3\relax
   \advance\@tempcnta -#1\relax
   \edef\coordsys@w{\the\@tempcnta}%
   \@tempcnta=#4\relax
   \advance\@tempcnta -#2\relax
   \edef\coordsys@h{\the\@tempcnta}%
   \@sethlogticks{\@hticksep}{#1}{#3}{#2}{\vgridlength{\coordsys@h}}%
   \@setvlogticks{\@vticksep}{#2}{#4}{#1}{\hgridlength{\coordsys@w}}%
   \color@endgroup}}
\endinput
%%
%% End of file `logsys.sty'.
