diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:33 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:53:33 +0000 |
commit | 4584c66f99994f1ea96d5ad8551daaf7e7f655c1 (patch) | |
tree | ba01f746fb7051950e9cad792f82cb9398588551 /Master | |
parent | 179bf60bda56170d7b22f51f2314ed4d5c06f9a1 (diff) |
coordsys
git-svn-id: svn://tug.org/texlive/trunk@788 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r-- | Master/texmf-dist/tex/latex/coordsys/coordsys.sty | 622 | ||||
-rw-r--r-- | Master/texmf-dist/tex/latex/coordsys/logsys.sty | 335 |
2 files changed, 957 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/coordsys/coordsys.sty b/Master/texmf-dist/tex/latex/coordsys/coordsys.sty new file mode 100644 index 00000000000..82f4fbaefc6 --- /dev/null +++ b/Master/texmf-dist/tex/latex/coordsys/coordsys.sty @@ -0,0 +1,622 @@ +%% +%% This is file `coordsys.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% coordsys.dtx (with options: `coordsys') +%% +%% +%% This is the coordsys and logsys packages +%% Copyright 2000-04 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{coordsys}[2004/11/15 version 1.3] +\newcommand{\ticklength}{\relax} +\newcommand{\vtickmark}{\relax} +\newcommand{\htickmark}{\relax} +\DeclareOption{centred}{% + \def\vtickmark{\makebox(0,0){\rule{\@wholewidth}{\ticklength}}}% + \def\htickmark{\makebox(0,0){\rule{\ticklength}{\@wholewidth}}}% + \def\ticklength{6\p@}% +} +\DeclareOption{outside}{% + \def\vtickmark{\makebox(0,0)[t]{\rule{\@wholewidth}{\ticklength}}}% + \def\htickmark{\makebox(0,0)[r]{\rule{\ticklength}{\@wholewidth}}}% + \def\ticklength{3\p@}% +} +\DeclareOption{inside}{% + \def\vtickmark{\makebox(0,0)[b]{\rule{\@wholewidth}{\ticklength}}}% + \def\htickmark{\makebox(0,0)[l]{\rule{\ticklength}{\@wholewidth}}}% + \def\ticklength{3\p@}% +} +\ExecuteOptions{centred} +\ProcessOptions +\newcommand{\vgridfromto}[2]{% + \vbox to \z@{\vskip -#2\unitlength + \leaders\vbox to \coordsys@w{\vss\hbox{\picsquare}\vss} + \vfill + \vskip #1\unitlength}} +\newcommand{\hgridfromto}[2]{% + \hbox to \z@{\hskip #1\unitlength + \leaders\hbox to \coordsys@w{\hss\picsquare\hss}\hfill + \hskip-#2\unitlength}} +\newcommand{\vgridlength}[1]{\line(0,1){#1}} +\newcommand{\hgridlength}[1]{\line(1,0){#1}} +\@ifpackageloaded{color}{% + \newcommand{\setvlabel}[2][r]{% + \makebox(0,0)[#1]{\colorbox{white}{$#2$}\hspace{5pt}}} + \newcommand{\sethlabel}[2][t]{% + \makebox(0,0)[#1]{% + \setlength{\@tempdimc}{3pt}% + \addtolength{\@tempdimc}{\baselineskip}% + \rule{0pt}{\@tempdimc}\colorbox{white}{$#2$}}}% +}{% no colour + \newcommand{\setvlabel}[2][r]{% + \makebox(0,0)[#1]{$#2$\hspace{5\p@}}} + \newcommand{\sethlabel}[2][t]{% + \makebox(0,0)[#1]{% + \setlength{\@tempdimc}{3\p@}% + \addtolength{\@tempdimc}{\baselineskip}% + \rule{\z@}{\@tempdimc}$#2$}}% +}% end if color package +\newcommand{\hlabel}[1]{#1}% +\newcommand{\vlabel}[1]{#1}% +\newcommand{\rescaleby}[4][]{\renewcommand{#4}[1]{{% + \count@=##1\relax + \ifnum\count@<0\count@=-\count@\fi + \ifnum\count@=0\relax + \@tempcntb=1\relax + \else + \multiply\count@ #2\relax + \@EuclidGCD{\count@}{#3}% + \count@=##1\relax + \multiply\count@ #2\relax + \divide\count@\@tempcnta + \@tempcntb=#3\relax + \divide\@tempcntb\@tempcnta + \fi + \ifnum\count@<0\relax + -% + \count@=-\count@ + \fi + \def\coordsys@a{#1}% + \ifx\coordsys@a\@empty\relax + \ifnum\@tempcntb=1\relax + \the\count@ + \else + \frac{\the\count@}{\the\@tempcntb}% + \fi + \else + \ifnum\@tempcntb=1\relax + \ifnum\count@=1\relax + \coordsys@a + \else + \the\count@\coordsys@a + \fi + \else + \ifnum\count@=1\relax + \frac{\coordsys@a}{\the\@tempcntb}% + \else + \frac{\the\count@}{\the\@tempcntb}\coordsys@a + \fi + \fi + \fi +}}} +\newcommand{\hthickratio}{5} +\newcommand{\vthickratio}{5} +\providecommand{\text}[1]{\mbox{\scriptsize #1}} +\providecommand{\picsquare}{% + \makebox(0,0){\rule{\@wholewidth}{\@wholewidth}}} +\let\c@@coord\count@ +\newif\if@numbline +\newcommand{\tickstyle}[2]{% + \def\thin@ticks{#1}% + \def\thick@ticks{#2}} +\tickstyle{\thinlines}{\thicklines} +\newcommand{\@set@ticks}[6]{% + \thin@ticks + \edef\coordsys@c{#2}% + \@tempcnta=#3\relax + \ifnum\@tempcnta>0\advance\@tempcnta -1\relax\fi + \divide\@tempcnta \coordsys@c\relax + \ifnum #3>0\advance\@tempcnta 1\relax\fi + \multiply\@tempcnta \coordsys@c\relax + \edef\coordsys@a{\the\@tempcnta}% + \@tempcntb=#4\relax + \advance\@tempcntb -\@tempcnta\relax + \setlength{\@tempdima}{\@tempcntb\unitlength}% + \addtolength{\@tempdima}{-#5}% + \ifdim\@tempdima<\z@\relax + \def\coordsys@b{0}% + \else + \divide\@tempdima\unitlength\relax + \divide\@tempdima\coordsys@c\relax + \@tempcntb=\@tempdima% + \advance\@tempcntb 1\relax% + \edef\coordsys@b{\the\@tempcntb}% + \fi + #6% + \thick@ticks + \@tempcntb=#1\relax + \multiply\@tempcntb \coordsys@c\relax + \edef\coordsys@c{\the\@tempcntb}% + \@tempcnta=#3\relax + \ifnum\@tempcnta>0\advance\@tempcnta -1\relax\fi + \divide\@tempcnta \coordsys@c\relax + \ifnum #3>0\advance\@tempcnta 1\relax\fi + \multiply\@tempcnta \coordsys@c\relax + \edef\coordsys@a{\the\@tempcnta}% + \@tempcntb=#4\relax + \advance\@tempcntb -\@tempcnta\relax + \setlength{\@tempdima}{\@tempcntb\unitlength}% + \addtolength{\@tempdima}{-#5}% + \ifdim\@tempdima<\z@\relax + \def\coordsys@b{0}% + \else + \divide\@tempdima\unitlength\relax + \divide\@tempdima#2\relax + \@tempcntb=\@tempdima% + \divide\@tempcntb #1\relax + \advance\@tempcntb 1\relax + \edef\coordsys@b{\the\@tempcntb}% + \fi + #6% +} +\newcommand{\numbline}{% + \@ifstar{\@numblinefalse\hnumbline@i} + {\@numblinetrue \hnumbline@i}} +\newcommand{\hnumbline@i}[1][10]{\leavevmode\hnumbline@ii{#1}} +\newcommand{\hnumbline@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}}% + \@set@ticks{\hthickratio}{#1}{#2}{#3}{6\p@}{ + \multiput(\coordsys@a,0)(\coordsys@c,0)\coordsys@b\vtickmark}% + \if@numbline + \setcounter{@coord}{\coordsys@a}% + \multiput(\coordsys@a,0)(\coordsys@c,0)\coordsys@b{% + \edef\coordsys@a{\arabic{@coord}}% + \sethlabel{\hlabel{\coordsys@a}}% + \addtocounter{@coord}{\coordsys@c}} + \fi + \color@endgroup}% + \def\coordsys@w{0}% +} +\newcommand{\vnumbline}{% + \@ifstar{\@numblinefalse\vnumbline@i} + {\@numblinetrue \vnumbline@i}} +\newcommand{\vnumbline@i}[1][10]{\leavevmode\vnumbline@ii{#1}} +\newcommand{\vnumbline@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}}% + \@set@ticks{\vthickratio}{#1}{#2}{#3}{6\p@}{% + \multiput(0,\coordsys@a)(0,\coordsys@c)\coordsys@b\htickmark}% + \if@numbline + \setcounter{@coord}{\coordsys@a}% + \multiput(0,\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{0}% +} +\newcommand{\coordsys}{% + \def\coordsys@c{\coordsys@i}% + \@ifstar{\@numblinefalse\coordsys@args@i} + {\@numblinetrue \coordsys@args@i}} +\newcommand{\coordsys@args@i}[1][10]{\leavevmode + \def\@hticksep{#1}% + \coordsys@args@ii} +\newcommand{\coordsys@args@ii}[1][\@hticksep]{% + \def\@vticksep{#1}% + \coordsys@args@iii} +\def\coordsys@args@iii(#1,#2)#3{\coordsys@c{#1}{#2}(} +\def\coordsys@i#1#2(#3,#4){{\color@begingroup + \thinlines + \@tempcnta=#3\relax + \advance\@tempcnta -#1\relax + \edef\coordsys@w{\the\@tempcnta}% + \put(#1,0){\vector(1,0){\coordsys@w}}% + \@tempcnta=#4\relax + \advance\@tempcnta -#2\relax + \edef\coordsys@h{\the\@tempcnta}% + \put(0,#2){\vector(0,1){\coordsys@h}}% + \@set@ticks{\hthickratio}{\@hticksep}{#1}{#3}{6\p@}{% + \multiput(\coordsys@a,0)(\coordsys@c,0)\coordsys@b\vtickmark}% + \if@numbline + \setcounter{@coord}{\coordsys@a}% + \multiput(\coordsys@a,0)(\coordsys@c,0)\coordsys@b{% + \ifnum\value{@coord}=0\relax\else + \edef\coordsys@a{\arabic{@coord}}% + \sethlabel{\hlabel{\coordsys@a}}% + \fi + \addtocounter{@coord}{\coordsys@c}}% + \fi + \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{6\p@}{% + \multiput(0,\coordsys@a)(0,\coordsys@c)\coordsys@b\htickmark}% + \if@numbline + \setcounter{@coord}{\coordsys@a}% + \multiput(0,\coordsys@a)(0,\coordsys@c)\coordsys@b{% + \ifnum\value{@coord}=0\relax\else + \edef\coordsys@a{\arabic{@coord}}% + \setvlabel{\vlabel{\coordsys@a}}% + \fi + \addtocounter{@coord}{\coordsys@c}}% + \fi + \color@endgroup}% + \def\coordsys@w{0}% + \def\coordsys@h{0}% +} +\newcommand{\fcoordsys}{% + \def\coordsys@c{\fcoordsys@i}% + \@ifstar{\@numblinefalse\coordsys@args@i} + {\@numblinetrue \coordsys@args@i}} +\def\fcoordsys@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 + \@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{\bcoordsys}{% + \def\coordsys@c{\bcoordsys@i}% + \@ifstar{\@numblinefalse\coordsys@args@i} + {\@numblinetrue \coordsys@args@i}} +\def\bcoordsys@i#1#2(#3,#4){{\color@begingroup + \thinlines + \@tempcnta=#3\relax + \advance\@tempcnta -#1\relax + \edef\coordsys@w{\the\@tempcnta}% + \put(#1,#2){\line(1,0){\coordsys@w}}% + \put(#1,#4){\line(1,0){\coordsys@w}}% + \@tempcnta=#4\relax + \advance\@tempcnta -#2\relax + \edef\coordsys@h{\the\@tempcnta}% + \put(#1,#2){\line(0,1){\coordsys@h}}% + \put(#3,#2){\line(0,1){\coordsys@h}}% + \@set@ticks{\hthickratio}{\@hticksep}{#1}{#3}{\z@}{% + \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 + \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{\z@}{% + \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{\window}{% + \def\coordsys@c{\window@i}% + \@ifstar{\let\coordsys@a\phantom\coordsys@args@i} + {\let\coordsys@a\relax \coordsys@args@i}} +\def\window@i#1#2(#3,#4){{% + \thinlines + \@tempcnta=#3\relax + \advance\@tempcnta-#1\relax + \edef\coordsys@w{\the\@tempcnta}% + \@tempcnta=#4\relax + \advance\@tempcnta-#2\relax + \edef\coordsys@h{\the\@tempcnta}% + \put(#1,#2){\line(1,0){\coordsys@w}}% + \put(#1,#2){\line(0,1){\coordsys@h}}% + \put(#3,#4){\line(-1,0){\coordsys@w}}% + \put(#3,#4){\line(0,-1){\coordsys@h}}% + \put(#1,#2){\sethlabel[tl]% + {\ensuremath{x_{\text{min}}=\coordsys@a{#1}}}}% + \put(#3,#2){\sethlabel[tr]% + {\ensuremath{x_{\text{max}}=\coordsys@a{#3}}}}% + \put(#1,#2){\setvlabel[rb]% + {\ensuremath{y_{\text{min}}=\coordsys@a{#2}}}}% + \put(#1,#4){\setvlabel[rt]% + {\ensuremath{y_{\text{max}}=\coordsys@a{#4}}}}% + \ifnum #1<0\relax\ifnum #3>0\relax + \vnumbline*[\@vticksep]{#2}{#4}% + \fi\fi + \ifnum #2<0\relax\ifnum #4>0\relax + \numbline*[\@hticksep]{#1}{#3}% + \fi\fi + }% + \def\coordsys@h{#1}% + \def\coordsys@w{#2}% +} +\newcommand{\gridstyle}[2]{\def\grid@style{\tickstyle{#1}{#2}}} +\newcommand{\grid@style}{\relax} +\newcommand{\coordgrid}{% + \@ifstar{\def\coordsys@c{\coordgrid@ii}\coordsys@args@i} + {\def\coordsys@c{\coordgrid@i}\coordsys@args@i}} +\def\coordgrid@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}}}% + \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{\z@}{% + \multiput(0,\coordsys@a)(0,\coordsys@c)\coordsys@b + {\hgridfromto{#1}{#3}}}% + \color@endgroup}} +\def\coordgrid@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}}}% + \@set@ticks{\vthickratio}{\@vticksep}{#2}{#4}{\z@}{% + \multiput(#1,\coordsys@a)(0,\coordsys@c)\coordsys@b + {\hgridlength{\coordsys@w}}}% + \color@endgroup}} +\newcommand{\coordgrid@calc}{% + \@EuclidGCD{\@vticksep}{\@hticksep}% + \@tempdima=\unitlength + \multiply\@tempdima\@tempcnta + \@tempdimb=2\p@\relax + \ifdim\@tempdima<\@tempdimb + \PackageWarning{coordsys}{The tick marks are too + close\MessageBreak for a pretty grid}% + \else + \divide\@tempdima \@tempdimb\relax + \@tempdimb=\unitlength + \multiply\@tempdimb\@tempcnta + \divide\@tempdimb\@tempdima + \fi + \edef\coordsys@w{\the\@tempdimb}% +} +\newcommand{\interval}{} +\def\interval#1#2,{% + \def\coordsys@a{#1}% + \def\coordsys@b{#2}% + \def\coordsys@c{}% + \if\coordsys@a]\def\coordsys@a{(}\fi + \if\coordsys@a[% + \def\coordsys@a{% + \makebox[0.5\width][l]{\@circlefnt\char'163}}% + \else\if\coordsys@a(% + \def\coordsys@a{% + \makebox[0.5\width][l]{\@circlefnt\char'143}}% + \else\if\coordsys@a<% + \def\coordsys@a{% + \raisebox{-\fontdimen22\textfont2}{% + \makebox[\z@]{$<$}}}% + \else + \PackageError{coordsys} + {Bad delimiter} + {\string\interval\space expects [, (, <, or ] % + but got \coordsys@a}% + \def\coordsys@a{}% + \fi\fi\fi + \afterassignment\interv@l\count@=} +\newcommand{\interv@l}[1]{% + \if#1.% + \edef\coordsys@c{\the\count@.}% + \def\next{\afterassignment\interv@l\count@=}% + \else + \edef\coordsys@c{\coordsys@c\the\count@}% + \setlength{\@tempdima}{\coordsys@b\unitlength}% + \setlength{\@tempdima}{-\@tempdima}% + \addtolength{\@tempdima}{\coordsys@c\unitlength}% + \def\coordsys@c{#1}% + \if\coordsys@c[\def\coordsys@c{)}\fi + \if\coordsys@c]% + \def\coordsys@c{\mbox{% + \@circlefnt + \settowidth{\@tempdima}{\char'163}% + \hskip 0.5\@tempdima + \char'163% + \hskip -\@tempdima}% + }% + \else\if\coordsys@c)% + \def\coordsys@c{\mbox{% + \@circlefnt + \settowidth{\@tempdima}{\char'143}% + \hskip 0.5\@tempdima + \char'143% + \hskip -\@tempdima}% + }% + \else\if\coordsys@c>% + \def\coordsys@c{% + \raisebox{-\fontdimen22\textfont2}{% + \makebox[\z@]{$>$}}}% + \else + \PackageError{coordsys} + {Bad delimiter} + {\string\interval\space expects ], ), <, or [ % + but got \coordsys@c}% + \def\coordsys@c{}% + \fi\fi\fi + \put(\coordsys@b,\coordsys@w){\makebox[\@tempdima][s]{% + \coordsys@a + \interval@line + \coordsys@c + }}% + \let\next=\ignorespaces + \fi + \next} +\newcommand{\vinterval}{} +\def\vinterval#1#2,{% + \def\coordsys@a{#1}% + \def\coordsys@b{#2}% + \def\coordsys@c{}% + \if\coordsys@a]\def\coordsys@a{(}\fi + \if\coordsys@a[% + \def\coordsys@a{\hbox to\z@{% + \@circlefnt + \settowidth{\@tempdima}{\char'163}% + \hskip 0.5\@tempdima minus 1fil + \char'163% + \hskip -0.5\@tempdima minus 1fil + \vrule width \z@ depth \z@ height 0.5\@tempdima + }}% + \else\if\coordsys@a(% + \def\coordsys@a{\hbox to\z@{% + \@circlefnt + \settowidth{\@tempdima}{\char'143}% + \hskip 0.5\@tempdima minus 1fil + \char'143% + \hskip -0.5\@tempdima minus 1fil + \vrule width \z@ depth \z@ height 0.5\@tempdima + }}% + \else\if\coordsys@a<% + \def\coordsys@a{\hbox to\z@{\hss + \raisebox{-\fontdimen22\textfont2}[\z@][\z@]{% + $\vee$}\hss}}% + \else + \PackageError{coordsys} + {Bad delimiter} + {\string\vinterval\space expects [, (, <, or ] % + but got \coordsys@a}% + \def\coordsys@a{}% + \fi\fi\fi + \afterassignment\vinterv@l\count@=} +\newcommand{\vinterv@l}[1]{% + \if#1.% + \edef\coordsys@c{\the\count@.}% + \def\next{\afterassignment\interv@l\count@=}% + \else + \edef\coordsys@c{\coordsys@c\the\count@}% + \setlength{\@tempdima}{\coordsys@b\unitlength}% + \setlength{\@tempdima}{-\@tempdima}% + \addtolength{\@tempdima}{\coordsys@c\unitlength}% + \def\coordsys@c{#1}% + \if\coordsys@c[\def\coordsys@c{)}\fi + \if\coordsys@c]% + \def\coordsys@c{\hbox to\z@{% + \@circlefnt + \settowidth{\@tempdima}{\char'163}% + \hskip 0.5\@tempdima minus 1fil + \char'163% + \hskip -0.5\@tempdima minus 1fil + \vrule width \z@ depth 0.5\@tempdima height \z@ + }}% + \else\if\coordsys@c)% + \def\coordsys@c{\hbox to\z@{% + \@circlefnt + \settowidth{\@tempdima}{\char'143}% + \hskip 0.5\@tempdima minus 1fil + \char'143% + \hskip -0.5\@tempdima minus 1fil + \vrule width \z@ depth 0.5\@tempdima height \z@ + }}% + \else\if\coordsys@c>% + \def\coordsys@c{\hbox to\z@{\hss% + \raisebox{-\fontdimen22\textfont2}[\z@][\z@]{% + $\wedge$}\hss}}% + \else + \PackageError{coordsys} + {Bad delimiter} + {\string\vinterval\space expects ], ), <, or [ % + but got \coordsys@c}% + \def\coordsys@c{}% + \fi\fi\fi + \put(\coordsys@h,\coordsys@b){\vbox{% + \setlength{\baselineskip}{\z@}% + \setlength{\lineskip}{\z@}% + \settoheight{\@tempdimb}{\coordsys@a}% + \addtolength{\@tempdima}{-\@tempdimb}% + \settodepth {\@tempdimb}{\coordsys@c}% + \addtolength{\@tempdima}{-\@tempdimb}% + \coordsys@c + \vinterval@line + \coordsys@a + }}% + \let\next=\ignorespaces + \fi + \next} +\newcommand{\intervalthickness}[2][\z@]{% + \setlength{\@tempdima}{#2}% + \setlength{\@tempdima}{0.5\@tempdima}% + \setlength{\@tempdimb}{-\@tempdima}% + \addtolength{\@tempdima}{#1}% + \addtolength{\@tempdimb}{#1}% + \edef\coordsys@a{\the\@tempdima}% + \edef\coordsys@b{-\the\@tempdimb}% + \edef\interval@line{% + \leaders\hrule depth \coordsys@b height \coordsys@a\hss}% + \setlength{\@tempdima}{#2}% + \setlength{\@tempdima}{-0.5\@tempdima}% + \addtolength{\@tempdima}{#1}% + \edef\coordsys@a{\the\@tempdima}% + \edef\vinterval@line{% + \hbox to\z@{% + \hskip \coordsys@a + \vrule height\@tempdima width #2% + \hss + }% + }% +} +\intervalthickness{1.6\p@} +\def\coordsys@w{0} +\def\coordsys@h{0} +\newcommand{\@EuclidGCD}[2]{% + \@tempcnta=#1\relax + \@tempcntb=#2\relax + \loop + \count@=\@tempcntb + \divide\count@\@tempcnta + \multiply\count@\@tempcnta + \advance\count@ -\@tempcntb + \ifnum\count@<0\relax + \@tempcntb=\@tempcnta + \@tempcnta=-\count@ + \repeat +} +\endinput +%% +%% End of file `coordsys.sty'. diff --git a/Master/texmf-dist/tex/latex/coordsys/logsys.sty b/Master/texmf-dist/tex/latex/coordsys/logsys.sty new file mode 100644 index 00000000000..0bdd97daa09 --- /dev/null +++ b/Master/texmf-dist/tex/latex/coordsys/logsys.sty @@ -0,0 +1,335 @@ +%% +%% 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-04 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}[2004/11/15 version 1.3] +\DeclareOption{centred}{\PassOptionsToPackage{centred}{coordsys}} +\DeclareOption{outside}{\PassOptionsToPackage{outside}{coordsys}} +\DeclareOption{inside}{\PassOptionsToPackage{inside}{coordsys}} +\ProcessOptions +\RequirePackage{coordsys}[2004/11/15] +\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'. |