diff options
author | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:17 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2006-01-12 23:58:17 +0000 |
commit | 817b19153147abe3facd173fb4e33e0338f218ec (patch) | |
tree | 341fec654f55ebcf492729f6b058fb27f4267cc7 /Master/texmf-dist/tex/latex/logpap | |
parent | f798e82244ad6607d6ef17318471cd639736ad6c (diff) |
logpap
git-svn-id: svn://tug.org/texlive/trunk@1052 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/logpap')
-rw-r--r-- | Master/texmf-dist/tex/latex/logpap/logpap.sty | 705 |
1 files changed, 705 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/logpap/logpap.sty b/Master/texmf-dist/tex/latex/logpap/logpap.sty new file mode 100644 index 00000000000..eba60ee55c2 --- /dev/null +++ b/Master/texmf-dist/tex/latex/logpap/logpap.sty @@ -0,0 +1,705 @@ +%% +%% This is file `logpap.sty', +%% generated with the docstrip utility. +%% +%% The original source files were: +%% +%% logpap.dtx (with options: `package') +%% +%% Copyright (c) 2004 Mike Kaufmann, all rights reserved +%% +%% This program is provided under the terms of the +%% LaTeX Project Public License distributed from CTAN +%% archives in directory macros/latex/base/lppl.txt. +%% +%% Author: Mike Kaufmann +%% Mike.Kaufmann@ei.fh-giessen.de +%% +%% \CharacterTable +%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z +%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z +%% Digits \0\1\2\3\4\5\6\7\8\9 +%% Exclamation \! Double quote \" Hash (number) \# +%% Dollar \$ Percent \% Ampersand \& +%% Acute accent \' Left paren \( Right paren \) +%% Asterisk \* Plus \+ Comma \, +%% Minus \- Point \. Solidus \/ +%% Colon \: Semicolon \; Less than \< +%% Equals \= Greater than \> Question mark \? +%% Commercial at \@ Left bracket \[ Backslash \\ +%% Right bracket \] Circumflex \^ Underscore \_ +%% Grave accent \` Left brace \{ Vertical bar \| +%% Right brace \} Tilde \~} +%% +\def\fileversion{0.6} +\def\filedate{2004/02/01} +\NeedsTeXFormat{LaTeX2e}[2001/06/01] +\ProvidesPackage{logpap}[\filedate\space + v\fileversion\space drawing logarithmic graph paper] +\newif\iflp@ticksupright +\newif\iflp@text +\newif\iflp@dimensions +\newif\iflp@twoninex +\newif\iflp@fsnx +\newif\iflp@twoniney +\newif\iflp@fsny +\newif\iflp@tenlower +\newcommand*\lp@DeclareOS[2]{\DeclareOption{#1}{#2} + \expandafter\def\csname lp@@set#1\endcsname{#2}} +\newcommand*\LPSet[1]{\lp@set#1,\@@end} +\def\lp@set#1,#2\@@end{\csname lp@@set#1\endcsname + \def\@tempa{#2}\ifx\@tempa\@empty\else\lp@set#2\@@end\fi} +\lp@DeclareOS{ticksupright}{\lp@ticksuprighttrue} +\lp@DeclareOS{noticksupright}{\lp@ticksuprightfalse} +\lp@DeclareOS{twoninex}{\lp@twoninextrue} +\lp@DeclareOS{notwoninex}{\lp@twoninexfalse} +\lp@DeclareOS{twoniney}{\lp@twonineytrue} +\lp@DeclareOS{notwoniney}{\lp@twonineyfalse} +\lp@DeclareOS{fsnx}{\lp@fsnxtrue} +\lp@DeclareOS{nofsnx}{\lp@fsnxfalse} +\lp@DeclareOS{fsny}{\lp@fsnytrue} +\lp@DeclareOS{nofsny}{\lp@fsnyfalse} +\lp@DeclareOS{tenlower}{\lp@tenlowertrue} +\lp@DeclareOS{notenlower}{\lp@tenlowerfalse} +\lp@DeclareOS{text}{\lp@texttrue} +\lp@DeclareOS{notext}{\lp@textfalse} +\lp@DeclareOS{dimensions}{\lp@dimensionstrue} +\lp@DeclareOS{nodimensions}{\lp@dimensionsfalse} +\DeclareOption*{\PassOptionToPackage{\CurrentOption}{color}} +\ExecuteOptions{ticksupright,twoninex,twoniney,fsnx,fsny,notenlower,text,dimensions} +\ProcessOptions\relax +\RequirePackage{calc} +\RequirePackage{color} +\newcommand*{\deflp@logline}[2]{\expandafter\def\csname lp@log#1\endcsname{#2}} +\newcommand*{\getlp@logline}[1]{\csname lp@log#1\endcsname} +\deflp@logline{1.0}{0} +\deflp@logline{1.1}{.041393} +\deflp@logline{1.2}{.078181} +\deflp@logline{1.3}{.113943} +\deflp@logline{1.4}{.146128} +\deflp@logline{1.5}{.176091} +\deflp@logline{1.6}{.20412} +\deflp@logline{1.7}{.230449} +\deflp@logline{1.8}{.255273} +\deflp@logline{1.9}{.278754} +\deflp@logline{2.0}{.30103} +\deflp@logline{2.1}{.322219} +\deflp@logline{2.2}{.342423} +\deflp@logline{2.3}{.361728} +\deflp@logline{2.4}{.380211} +\deflp@logline{2.5}{.39794} +\deflp@logline{2.6}{.414973} +\deflp@logline{2.7}{.431364} +\deflp@logline{2.8}{.447158} +\deflp@logline{2.9}{.462398} +\deflp@logline{3.0}{.477121} +\deflp@logline{3.1}{.491362} +\deflp@logline{3.2}{.50515} +\deflp@logline{3.3}{.518514} +\deflp@logline{3.4}{.531479} +\deflp@logline{3.5}{.544068} +\deflp@logline{3.6}{.556303} +\deflp@logline{3.7}{.568202} +\deflp@logline{3.8}{.579784} +\deflp@logline{3.9}{.591065} +\deflp@logline{4.0}{.60206} +\deflp@logline{4.1}{.612784} +\deflp@logline{4.2}{.623249} +\deflp@logline{4.3}{.633468} +\deflp@logline{4.4}{.643453} +\deflp@logline{4.5}{.653213} +\deflp@logline{4.6}{.662758} +\deflp@logline{4.7}{.672098} +\deflp@logline{4.8}{.681241} +\deflp@logline{4.9}{.690196} +\deflp@logline{5.0}{.69897} +\deflp@logline{5.1}{.70757} +\deflp@logline{5.2}{.716003} +\deflp@logline{5.3}{.724276} +\deflp@logline{5.4}{.732394} +\deflp@logline{5.5}{.740363} +\deflp@logline{5.6}{.748188} +\deflp@logline{5.7}{.755875} +\deflp@logline{5.8}{.763428} +\deflp@logline{5.9}{.770852} +\deflp@logline{6.0}{.778151} +\deflp@logline{6.1}{.78533} +\deflp@logline{6.2}{.792392} +\deflp@logline{6.3}{.799341} +\deflp@logline{6.4}{.80618} +\deflp@logline{6.5}{.812913} +\deflp@logline{6.6}{.819544} +\deflp@logline{6.7}{.826075} +\deflp@logline{6.8}{.832509} +\deflp@logline{6.9}{.838849} +\deflp@logline{7.0}{.845098} +\deflp@logline{7.1}{.851258} +\deflp@logline{7.2}{.857332} +\deflp@logline{7.3}{.863323} +\deflp@logline{7.4}{.869232} +\deflp@logline{7.5}{.875061} +\deflp@logline{7.6}{.880814} +\deflp@logline{7.7}{.886491} +\deflp@logline{7.8}{.892095} +\deflp@logline{7.9}{.897627} +\deflp@logline{8.0}{.90309} +\deflp@logline{8.1}{.908485} +\deflp@logline{8.2}{.913814} +\deflp@logline{8.3}{.919078} +\deflp@logline{8.4}{.924279} +\deflp@logline{8.5}{.929419} +\deflp@logline{8.6}{.934498} +\deflp@logline{8.7}{.939519} +\deflp@logline{8.8}{.944483} +\deflp@logline{8.9}{.94939} +\deflp@logline{9.0}{.954243} +\deflp@logline{9.1}{.959041} +\deflp@logline{9.2}{.963788} +\deflp@logline{9.3}{.968483} +\deflp@logline{9.4}{.973128} +\deflp@logline{9.5}{.977724} +\deflp@logline{9.6}{.982271} +\deflp@logline{9.7}{.986772} +\deflp@logline{9.8}{.991226} +\deflp@logline{9.9}{.995635} +\deflp@logline{10.0}{1} +\newcount\lp@dcntx +\newcount\lp@dcnty +\newdimen\lpgridx +\newdimen\lpgridy +\newdimen\lp@thicklinelenx +\newdimen\lp@thicklineleny +\newdimen\lp@medlinelenx +\newdimen\lp@medlineleny +\newdimen\lp@osg +\newdimen\lp@osl +\newif\iflp@partdecx +\newif\iflp@partdecy +\newif\iflp@fulldecx +\newif\iflp@fulldecy +\newif\iflp@twonine +\newif\iflp@fsn +\newif\iflp@ten +\newif\iflp@logx +\newif\iflp@logy +\newif\iflp@preached +\newcommand*\DefineLPThickLineThickness[1]{\renewcommand*\lp@tkltkness{#1}} +\newcommand*\lp@tkltkness{0.8\p@} +\newcommand*\DefineLPMedLineThickness[1]{\renewcommand*\lp@mdltkness{#1}} +\newcommand*\lp@mdltkness{0.5\p@} +\newcommand*\DefineLPThinLineThickness[1]{\renewcommand*\lp@tnltkness{#1}} +\newcommand*\lp@tnltkness{0.2\p@} +\newcommand*\DefineLPMinLineDist[1]{\renewcommand*\lp@mindist{#1}} +\newcommand*\lp@mindist{0.9999mm} +\newcommand*\DefineLPThickTickLen[1]{\renewcommand*\lp@tol{#1}} +\newcommand*\lp@tol{2mm} +\newcommand*\DefineLPMedTickLen[1]{\renewcommand*\lp@mol{#1}} +\newcommand*\lp@mol{1mm} +\newcommand*\DefineLPLabelDist[1]{\renewcommand*\lp@lpos{#1}} +\newcommand*\lp@lpos{1mm} +\newcommand*\DefineLPLabelFont[1]{\renewcommand*\lp@font{#1}} +\newcommand*\lp@font{\scriptsize} +\newcommand*\DefineLPLineColor[1]{\renewcommand*\lp@linecolor{#1}} +\newcommand*\lp@linecolor{\color[cmyk]{1,0,0,0}} +\newcommand*\DefineLPLabelColor[1]{\renewcommand*\lp@labelcolor{#1}} +\newcommand*\lp@labelcolor{\color[cmyk]{0,0,0,1}} +\newcommand*\DefineLPmu[1]{\renewcommand*\lp@mu{#1}} +\newcommand*\lp@mu{u} +\newcommand*\DefineLPText[1]{\renewcommand*\lp@textone{#1}} +\newcommand*\lp@textone{made with \LaTeX\ and \textsf{logpap}\quad} +\def\lp@clearlists{% + \def\lp@thicklines{,}\def\lp@medlines{,}\def\lp@thinlines{,}% + \def\lp@lllist{,}} +\def\lp@mkthickloglist#1{% + \@tempcnta\@ne\loop + \advance\@tempcnta\@ne + \edef\lp@thicklines{\getlp@logline{\the\@tempcnta.0},\lp@thicklines}% + \edef\lp@lllist{\the\@tempcnta,\lp@lllist}% + \ifnum\@tempcnta<#1\repeat} +\def\lp@mkmedloglist#1{% + \edef\lp@medlines{\getlp@logline{#1},\lp@medlines}} +\def\lp@mkthinloglist#1{% + \edef\lp@thinlines{\getlp@logline{#1},\lp@thinlines}} +\def\lp@mkthinloglisttwo#1{% + \lp@mkthinloglist{#1.2}\lp@mkthinloglist{#1.4}% + \lp@mkthinloglist{#1.6}\lp@mkthinloglist{#1.8}} +\def\lp@mkthinloglistone#1{\lp@mkthinloglisttwo{#1}% + \lp@mkthinloglist{#1.1}\lp@mkthinloglist{#1.3}% + \lp@mkthinloglist{#1.7}\lp@mkthinloglist{#1.9}} +\def\lp@getdist#1#2#3{% + \expandafter\@tempdima\getlp@logline{#2}#1% + \expandafter\@tempdimb\getlp@logline{#3}#1% + \advance\@tempdima-\@tempdimb} +\def\lp@mkloglistpart#1#2#3{% + \lp@getdist{#1}{#2.0}{#3.9}\ifdim\@tempdima<\lp@mindist + \lp@getdist{#1}{#2.0}{#3.8}\ifdim\@tempdima<\lp@mindist + \lp@getdist{#1}{#2.0}{#3.5}\ifdim\@tempdima<\lp@mindist + \lp@getdist{#1}{#2.0}{#3.0}\ifdim\@tempdima<\lp@mindist + \PackageWarning{logpap}{% + lines are to close together\MessageBreak}% + \fi + \else + \lp@mkmedloglist{#3.5}% + \fi + \else + \lp@mkthinloglisttwo{#3}% + \fi + \else + \lp@mkmedloglist{#3.5}\lp@mkthinloglistone{#3}% + \fi} +\def\lp@mkloglist#1#2{\lp@clearlists\lp@mkthickloglist{#2}% + \@tempcnta#2\@tempcntb\@tempcnta\advance\@tempcntb\m@ne + \loop + \lp@mkloglistpart{#1}{\the\@tempcnta}{\the\@tempcntb}% + \advance\@tempcnta\m@ne\advance\@tempcntb\m@ne + \ifnum\@tempcnta>\@ne\repeat} +\def\lp@mkthicklinlist#1{% + \@tempdima#1\p@\relax\ifdim\@tempdima>.99\p@\def\lp@thicklines{1,}\fi} +\def\lp@mkmedlinlist#1{% + \@tempdima#1\p@\relax\ifdim\@tempdima>.49\p@\def\lp@medlines{.5,}\fi} +\def\lp@mkthinlinlist#1{% + \edef\lp@thinlines{#1,\lp@thinlines}} +\def\lp@mkthinlinlisttwo#1{% + \@tempdima#1\p@\relax + \ifdim\@tempdima>.19\p@\lp@mkthinlinlist{.2}% + \ifdim\@tempdima>.39\p@\lp@mkthinlinlist{.4}% + \ifdim\@tempdima>.59\p@\lp@mkthinlinlist{.6}% + \ifdim\@tempdima>.79\p@\lp@mkthinlinlist{.8}% + \fi\fi\fi\fi} +\def\lp@mkthinlinlistone#1{\lp@mkthinlinlisttwo{#1}% + \@tempdima#1\p@\relax + \ifdim\@tempdima>.09\p@\lp@mkthinlinlist{.1}% + \ifdim\@tempdima>.29\p@\lp@mkthinlinlist{.3}% + \ifdim\@tempdima>.69\p@\lp@mkthinlinlist{.7}% + \ifdim\@tempdima>.89\p@\lp@mkthinlinlist{.9}% + \fi\fi\fi\fi} +\def\lp@getlindist#1#2#3{% + \@tempdima#2#1\@tempdimb#3#1% + \advance\@tempdima-\@tempdimb} +\def\lp@mklinlist#1#2{\lp@clearlists\lp@mkthicklinlist{#2}% + \lp@getlindist{#1}{1.0}{0.9}\ifdim\@tempdima<\lp@mindist + \lp@getlindist{#1}{1.0}{0.8}\ifdim\@tempdima<\lp@mindist + \lp@getlindist{#1}{1.0}{0.5}\ifdim\@tempdima<\lp@mindist + \lp@getlindist{#1}{1.0}{0.0}\ifdim\@tempdima<\lp@mindist + \PackageWarning{logpap}{% + lines are to close together\MessageBreak}% + \fi + \else + \lp@mkmedlinlist{#2}% + \fi + \else + \lp@mkthinlinlisttwo{#2}% + \fi + \else + \lp@mkmedlinlist{#2}\lp@mkthinlinlistone{#2}% + \fi} +\def\lp@dolinesx#1#2#3#4{\linethickness#2% + \lp@osg\lp@dcntx\lpgridx + \expandafter\lp@dolinex#1,\@@end{#3}{#4}} +\def\lp@dolinex#1,#2,\@@end#3#4{% + \def\@tempc{#1}\ifx\@tempc\@empty\else + \lp@osl#1\lpgridx \advance\lp@osl\lp@osg + \put(\lp@osl,#3){\line(0,1){#4}}% + \def\@tempc{#2}\ifx\@tempc\@empty\else + \lp@dolinex#2,\@@end{#3}{#4}\fi\fi} +\def\lp@dolinesy#1#2#3#4{\linethickness#2% + \lp@osg\lp@dcnty\lpgridy + \expandafter\lp@doliney#1,\@@end{#3}{#4}} +\def\lp@doliney#1,#2,\@@end#3#4{% + \def\@tempc{#1}\ifx\@tempc\@empty\else + \lp@osl#1\lpgridy \advance\lp@osl\lp@osg + \put(#3,\lp@osl){\line(1,0){#4}}% + \def\@tempc{#2}\ifx\@tempc\@empty\else + \lp@doliney#2,\@@end{#3}{#4}\fi\fi} +\def\lp@setuplabel#1,#2\@@end{% + \lp@getsign@ndparse#1\@@end + \def\@tempa{#2}\ifx\@tempa\@empty\def\lp@lfi{1}\else + \def\@tempb{,}\ifx\@tempa\@tempb\def\lp@lfi{1}\else + \lp@setup@lfi#2\@@end\fi\fi} +\def\lp@setup@lfi#1,\@@end{\def\lp@lfi{#1}} +\def\lp@getsign@ndparse#1#2\@@end{% + \if#1-\relax + \def\lp@sign{#1}\lp@parsesll#2xxxx\@@end + \else\if#1+\relax + \def\lp@sign{}\lp@parsesll#2xxxx\@@end + \else + \def\lp@sign{}\lp@parsesll#1#2xxxx\@@end + \fi\fi} +\def\lp@parsesll#1#2#3#4#5\@@end{% + \if\lp@isdigit#1\relax + \if\lp@isdigit#2\relax + \if\lp@isdigit#3\relax + \lp@testletter#4\iflp@preached + \def\lp@sll{#1#2#3}\def\lp@sllp{#4}% + \else\if#4x\relax + \def\lp@sll{#1#2#3}\def\lp@sllp{}% + \else + \lp@formaterr + \fi\fi + \else\lp@testletter#3\iflp@preached + \def\lp@sll{#1#2}\def\lp@sllp{#3}% + \else\if#3x\relax + \def\lp@sll{#1#2}\def\lp@sllp{}% + \else + \lp@formaterr + \fi\fi\fi + \else\lp@testletter#2\iflp@preached + \def\lp@sll{#1}\def\lp@sllp{#2}% + \else\if#2x\relax + \def\lp@sll{#1}\def\lp@sllp{}% + \else + \lp@formaterr + \fi\fi\fi + \else + \lp@formaterr + \fi} +\def\lp@formaterr{% + \PackageError{logpap}{wrong format of start value}% + {The format of the start value is:\MessageBreak + optional + or -, followed by 1-3 digits, optionaly\MessageBreak + followed by one of the letters [yzafpnumkMGTPEZY].\MessageBreak + Please correct it before going on,\MessageBreak + otherwise you might get more error messages.}} +\def\lp@isdigit#1{TT\fi\ifcat_\ifnum9<1#1 _\else A\fi} +\def\lp@testletter#1{% + \def\@tempb{#1}\lp@preachedfalse + \@tfor\@tempc:=yzafpnumkMGTPEZY\do{% + \if\@tempc\@tempb\relax\relax\lp@preachedtrue\@break@tfor\fi}} +\def\lp@testrangelin{\@tempcnta\lp@lfi\relax + \ifnum\@tempcnta=0\relax + \PackageError{logpap}{wrong increment for linear axis}% + {The increment value is 0, which doesn't make any sense.\MessageBreak + Please correct it before going on.}% + \fi} +\def\lp@testrangelog{\@tempcnta\lp@sll\relax + \ifnum\@tempcnta=1\else\ifnum\@tempcnta=10\else\ifnum\@tempcnta=100\else + \ifnum\@tempcnta=0\relax + \PackageError{logpap}{wrong logarithmic start value}% + {0 as start value for a logarithmic axis?\MessageBreak + This is a typo, isn't it?\MessageBreak + If not, you should learn more mathematics\MessageBreak + before using this package ;-)\MessageBreak + Only -100, -10, -1, 1, 10 and 100 are allowed.\MessageBreak + Please correct it before going on.}% + \else + \PackageError{logpap}{wrong logarithmic start value}% + {Only -100, -10, -1, 1, 10 and 100 are allowed.\MessageBreak + Please correct it before going on.}% + \fi + \fi\fi\fi + \@tempcnta\lp@lfi\relax + \ifnum\@tempcnta<1\lp@logfacerr\else\ifnum\@tempcnta>9\lp@logfacerr\fi\fi} +\def\lp@logfacerr{\PackageError{logpap}{wrong factor for logarithmic axis}% + {The factor has to be in the range from 1 to 9.\MessageBreak + Please correct it before going on.}} +\def\lp@nextlinlabel#1#2#3#4#5#6{\@tempcnta#3\multiply\@tempcnta#4\relax + \advance\@tempcnta#3\advance\@tempcnta#6#1\relax + \def\@tempa{#2}\def\@tempb{u}\ifx\@tempa\@tempb\def\@tempa{\lp@mu}\fi + \edef\lp@label{\the\@tempcnta\ifnum\@tempcnta=0\else\@tempa\fi}} +\def\lp@nextloglabel#1#2#3#4#5#6{% + \@tempcnta#5\relax\ifnum\@tempcnta=10 + \lp@tentrue + \@tempcnta#4\relax\@tempcntb#1\relax + \advance\@tempcnta\@ne + \ifnum\@tempcntb>1\advance\@tempcnta\@ne + \ifnum\@tempcntb>10\advance\@tempcnta\@ne\fi\fi + \@tempcntb\@tempcnta + \divide\@tempcntb 3\relax + \multiply\@tempcntb 3\relax + \advance\@tempcnta-\@tempcntb + \ifcase\@tempcnta + \def\lp@label{1}\or + \def\lp@label{10}\or + \def\lp@label{100}\fi + \divide\@tempcntb 3\relax + \lp@getpot{#2}\@tempcntb + \def\@tempb{X}\ifx\@tempa\@tempb + \PackageWarning{logpap}{% + log. axis value went to large\MessageBreak + (no more letters for exponent, used X)\MessageBreak}% + \fi + \def\@tempb{u}\ifx\@tempa\@tempb\def\@tempa{\lp@mu}\fi + \@tempcnta\lp@label\multiply\@tempcnta#3\relax + \edef\lp@label{#6\the\@tempcnta\@tempa}% + \else + \lp@tenfalse + \iflp@twonine + \multiply\@tempcnta#3\relax + \edef\lp@label{#6\the\@tempcnta}% + \iflp@fsn\else + \divide\@tempcnta#3\relax + \ifnum\@tempcnta=9\def\lp@label{}\fi + \ifnum\@tempcnta=7\def\lp@label{}\fi + \ifnum\@tempcnta=5\def\lp@label{}\fi + \fi + \else + \def\lp@label{}% + \fi + \fi} +\def\lp@getpot#1#2{% + \def\@tempb{#1}\def\@tempa{X}\@tempcnta#2\relax\lp@preachedfalse + \@tfor\@tempc:=yzafpnum{}kMGTPEZY\do{% + \if\@tempc\@tempb\relax\relax\lp@preachedtrue\fi + \iflp@preached\advance\@tempcnta\m@ne + \ifnum\@tempcnta=\m@ne\edef\@tempa{\@tempc}\fi + \fi}} +\def\lp@xlabel#1#2{\let\@tempb\lp@lpos + \iflp@tenlower\iflp@ten\let\@tempb\lp@llpos\fi\fi + \put(#1,-\@tempb){\makebox(\z@,\z@)[tc]{\lp@font #2}}} +\def\lp@ylabel#1#2{\put(-\lp@lpos,#1){\makebox(\z@,\z@)[cr]{\lp@font #2}}} +\def\lp@nextlllist#1,#2\@@end{% + \def\lp@llno{#1}\def\lp@lllist{#2}} +\def\lp@dolabelsx#1#2#3#4#5#6{\lp@osg\lp@dcntx\lpgridx + \let\lp@lllist#5\relax + \expandafter\lp@dolabelx#1,\@@end{#2}{#3}{#4}{#6}} +\def\lp@dolabelx#1,#2,\@@end#3#4#5#6{% + \def\@tempc{#1}\ifx\@tempc\@empty\else + \lp@osl#1\lpgridx \advance\lp@osl\lp@osg + \expandafter\lp@nextlllist\lp@lllist\@@end + \lp@nextxlabel{#3}{#4}{#5}\lp@dcntx\lp@llno{#6}% + \lp@xlabel\lp@osl\lp@label + \def\@tempc{#2}\ifx\@tempc\@empty\else + \lp@dolabelx#2,\@@end{#3}{#4}{#5}{#6}\fi\fi} +\def\lp@dolabelsy#1#2#3#4#5#6{\lp@osg\lp@dcnty\lpgridy + \let\lp@lllist#5\relax + \expandafter\lp@dolabely#1,\@@end{#2}{#3}{#4}{#6}} +\def\lp@dolabely#1,#2,\@@end#3#4#5#6{% + \def\@tempc{#1}\ifx\@tempc\@empty\else + \lp@osl#1\lpgridy \advance\lp@osl\lp@osg + \expandafter\lp@nextlllist\lp@lllist\@@end + \lp@nextylabel{#3}{#4}{#5}\lp@dcnty\lp@llno{#6}% + \lp@ylabel\lp@osl\lp@label + \def\@tempc{#2}\ifx\@tempc\@empty\else + \lp@dolabely#2,\@@end{#3}{#4}{#5}{#6}\fi\fi} +\def\lp@setlinesx{\let\lp@thicklinesx\lp@thicklines + \let\lp@medlinesx\lp@medlines \let\lp@thinlinesx\lp@thinlines + \let\lp@lllistx\lp@lllist} +\def\lp@setlinesy{\let\lp@thicklinesy\lp@thicklines + \let\lp@medlinesy\lp@medlines \let\lp@thinlinesy\lp@thinlines + \let\lp@lllisty\lp@lllist} +\def\lp@setpartlinesx{\let\lp@partthicklinesx\lp@thicklines + \let\lp@partmedlinesx\lp@medlines \let\lp@partthinlinesx\lp@thinlines + \let\lp@partlllistx\lp@lllist} +\def\lp@setpartlinesy{\let\lp@partthicklinesy\lp@thicklines + \let\lp@partmedlinesy\lp@medlines \let\lp@partthinlinesy\lp@thinlines + \let\lp@partlllisty\lp@lllist} +\def\lp@ipart#1.#2\@@end{#1} +\def\lp@rpart#1.#2\@@end{#2} +\def\lp@firstdigit#1#2\@@end{#1} +\def\lp@getreal#1{% + \edef\@tempa{\lp@ipart#1.\@@end}% + \ifx\@tempa\@empty\def\@tempa{0}\fi + \edef\@tempc{\lp@rpart#1.\@@end}% + \ifx\@tempc\@empty\let\@tempb\@empty\else + \if\@tempc.\let\@tempb\@empty\else + \edef\@tempd{\expandafter\lp@firstdigit\@tempc\@@end}% + \if\@tempd0\let\@tempb\@empty\else + \let\@tempb\@tempd\fi\fi\fi} +\def\lp@decerr{% + \PackageError{logpap}{number of decades for logaritmic axis to small}% + {The number of decades for a logaritmic axis\MessageBreak + has to be at least 0.2.\MessageBreak + Please correct it before going on,\MessageBreak + otherwise you might get more error messages.}} +\def\lp@decerri{% + \PackageError{logpap}{wrong number of decades for logaritmic axis}% + {For the number of decades for a logaritmic axis\MessageBreak + values like x.1 are not alowed.\MessageBreak + You can only use x.0 (or only x) and x.2 to x.9.\MessageBreak + Please correct it before going on,\MessageBreak + otherwise you might get more error messages.}} +\def\lp@checkdec{\@tempcnta\@tempa + \ifx\@tempb\@empty\@tempcntb0\relax\else\@tempcntb\@tempb\relax\fi + \ifnum\@tempcnta<0\relax\lp@decerr\else + \ifnum\@tempcntb=0\relax\ifnum\@tempcnta=0\relax\lp@decerr\fi\else + \ifnum\@tempcntb<0\relax\lp@decerri\else + \ifnum\@tempcntb=1\relax + \ifnum\@tempcnta=0\relax\lp@decerr\else + \lp@decerri\fi\fi\fi\fi\fi} +\def\lp@diverr{% + \PackageError{logpap}{number of divisions for linear axis to small}% + {The number of divisions for a linear axis\MessageBreak + has to be at least 0.1.\MessageBreak + Please correct it before going on,\MessageBreak + otherwise you might get more error messages.}} +\def\lp@checkdiv{\@tempcnta\@tempa + \ifx\@tempb\@empty\@tempcntb0\relax\else\@tempcntb\@tempb\relax\fi + \ifnum\@tempcnta<0\relax\lp@diverr\else + \ifnum\@tempcnta=0\relax + \ifnum\@tempcntb<1\relax\lp@diverr\fi\fi\fi} +\def\lp@logpap(#1,#2)(#3,#4)#5#6{% + \@ifnextchar[{\lp@@logpap{#1}{#2}{#3}{#4}{#5}{#6}}% + {\lp@@logpap{#1}{#2}{#3}{#4}{#5}{#6}[]}} +\def\lp@@logpap#1#2#3#4#5#6[#7]{% + \@ifnextchar[{\lp@@@logpap{#1}{#2}{#3}{#4}{#5}{#6}[#7]}% + {\lp@@@logpap{#1}{#2}{#3}{#4}{#5}{#6}[#7][]}} +\def\lp@@@logpap#1#2#3#4#5#6[#7][#8]{% + \lp@getreal{#3}\iflp@logx\lp@checkdec\else\lp@checkdiv\fi + \ifnum\@tempa=0\relax\lp@fulldecxfalse\else\lp@fulldecxtrue\fi + \edef\lp@texttwo{\lp@texttwo\ \@tempa}% + \ifx\@tempb\@empty + \lp@partdecxfalse + \let\lp@real\@tempa + \edef\lp@texttwo{\lp@texttwo\iflp@logx\,dec\fi\ $\times$}% + \else + \lp@partdecxtrue + \iflp@logx + \edef\lp@real{\@tempa\getlp@logline{\@tempb.0}}% + \edef\lp@part{\@tempb}% + \edef\lp@texttwo{\lp@texttwo.\@tempb\,dec\ $\times$}% + \else + \edef\lp@real{\@tempa.\@tempb}% + \edef\lp@part{.\@tempb}% + \edef\lp@texttwo{\lp@texttwo.\@tempb\ $\times$}% + \fi + \fi + \lp@dcntx\@tempa + \setlength\lpgridx{#1/\real{\lp@real}}\global\lpgridx\lpgridx + \iflp@logx + \lp@mkloglist\lpgridx{10}\lp@setlinesx + \iflp@partdecx \lp@mkloglist\lpgridx\lp@part \lp@setpartlinesx\fi + \let\lp@testrangex\lp@testrangelog + \let\lp@nextxlabel\lp@nextloglabel + \else + \lp@mklinlist\lpgridx{1}\lp@setlinesx + \iflp@partdecx \lp@mklinlist\lpgridx\lp@part \lp@setpartlinesx\fi + \let\lp@testrangex\lp@testrangelin + \let\lp@nextxlabel\lp@nextlinlabel + \fi + \lp@getreal{#4}\iflp@logx\lp@checkdec\else\lp@checkdiv\fi + \ifnum\@tempa=0\relax\lp@fulldecyfalse\else\lp@fulldecytrue\fi + \edef\lp@texttwo{\lp@texttwo\ \@tempa}% + \ifx\@tempb\@empty + \lp@partdecyfalse + \let\lp@real\@tempa + \edef\lp@texttwo{\lp@texttwo\iflp@logy\,dec\fi}% + \else + \lp@partdecytrue + \iflp@logy + \edef\lp@real{\@tempa\getlp@logline{\@tempb.0}}% + \edef\lp@part{\@tempb}% + \edef\lp@texttwo{\lp@texttwo.\@tempb\,dec}% + \else + \edef\lp@real{\@tempa.\@tempb}% + \edef\lp@part{.\@tempb}% + \edef\lp@texttwo{\lp@texttwo.\@tempb}% + \fi + \fi + \lp@dcnty\@tempa + \setlength\lpgridy{#2/\real{\lp@real}}\global\lpgridy\lpgridy + \iflp@logy + \lp@mkloglist\lpgridy{10}\lp@setlinesy + \iflp@partdecy \lp@mkloglist\lpgridy\lp@part \lp@setpartlinesy\fi + \let\lp@testrangey\lp@testrangelog + \let\lp@nextylabel\lp@nextloglabel + \else + \lp@mklinlist\lpgridy{1}\lp@setlinesy + \iflp@partdecy \lp@mklinlist\lpgridy\lp@part \lp@setpartlinesy\fi + \let\lp@testrangey\lp@testrangelin + \let\lp@nextylabel\lp@nextlinlabel + \fi + \lp@thicklinelenx#1\advance\lp@thicklinelenx\lp@tol + \lp@thicklineleny#2\advance\lp@thicklineleny\lp@tol + \lp@medlinelenx#1\advance\lp@medlinelenx\lp@mol + \lp@medlineleny#2\advance\lp@medlineleny\lp@mol + \iflp@ticksupright + \advance\lp@thicklinelenx\lp@tol + \advance\lp@thicklineleny\lp@tol + \advance\lp@medlinelenx\lp@mol + \advance\lp@medlineleny\lp@mol + \fi + \lp@setuplabel#5,\@@end + \lp@testrangex + \let\lp@sllx\lp@sll\let\lp@sllpx\lp@sllp\let\lp@lfix\lp@lfi + \let\lp@signx\lp@sign + \lp@setuplabel#6,\@@end + \lp@testrangey + \let\lp@slly\lp@sll\let\lp@sllpy\lp@sllp\let\lp@lfiy\lp@lfi + \let\lp@signy\lp@sign + \begingroup + \let\unitlength\relax + {\lp@font\settoheight\@tempdima{M}\advance\@tempdima\lp@tol + \advance\@tempdima\lp@lpos\advance\@tempdima\lp@lpos + \xdef\lp@llpos{\the\@tempdima}}% + \@tempdima\lp@lpos\advance\@tempdima\lp@tol\edef\lp@lpos{\the\@tempdima}% + \begin{picture}(#1,#2)(\z@,\z@) + \lp@labelcolor + \lp@tenfalse + \@tempcnta\lp@sllx\iflp@logx\multiply\@tempcnta\lp@lfix\fi + \def\@tempa{u}\ifx\lp@sllpx\@tempa\def\@tempa{\lp@mu}\else + \def\@tempa{\lp@sllpx}\fi + \begingroup + \ifnum\@tempcnta=0\let\lp@signx\@empty\let\@tempa\@empty\fi + \lp@xlabel{\z@}{\lp@signx\the\@tempcnta\@tempa} + \endgroup + \@tempcnta\lp@slly\iflp@logy\multiply\@tempcnta\lp@lfiy\fi + \def\@tempa{u}\ifx\lp@sllpy\@tempa\def\@tempa{\lp@mu}\else + \def\@tempa{\lp@sllpy}\fi + \begingroup + \ifnum\@tempcnta=0\let\lp@signy\@empty\let\@tempa\@empty\fi + \lp@ylabel{\z@}{\lp@signy\the\@tempcnta\@tempa} + \endgroup + \@tempdima#2\advance\@tempdima\lp@lpos + \iflp@ticksupright\else\advance\@tempdima-\lp@tol\fi + \put(\z@,\@tempdima){\makebox(\z@,\z@)[bl]{\lp@font + \iflp@text\lp@textone\fi\iflp@dimensions\lp@texttwo\fi}} + \put(-\lp@lpos,\@tempdima){\makebox(\z@,\z@)[br]{#8}} + \@tempdima#1\advance\@tempdima\lp@lpos + \iflp@ticksupright\else\advance\@tempdima-\lp@tol\fi + \put(\@tempdima,-\lp@lpos){\makebox(\z@,\z@)[tl]{#7}} + \lp@linecolor + \linethickness\lp@tkltkness + \put(-\lp@tol,\z@){\line(1,0){\lp@thicklinelenx}} + \put(\z@,-\lp@tol){\line(0,1){\lp@thicklineleny}} + \iflp@twoninex\lp@twoninetrue\else\lp@twoninefalse\fi + \iflp@fsnx\lp@fsntrue\else\lp@fsnfalse\fi + \iflp@partdecx + \lp@dolinesx\lp@partthicklinesx\lp@tkltkness{-\lp@tol}\lp@thicklineleny + \lp@dolinesx\lp@partmedlinesx\lp@mdltkness{-\lp@mol}\lp@medlineleny + \lp@dolinesx\lp@partthinlinesx\lp@tnltkness\z@{#2}% + \lp@labelcolor + \lp@dolabelsx\lp@partthicklinesx\lp@sllx\lp@sllpx\lp@lfix\lp@partlllistx\lp@signx + \lp@linecolor + \fi + \iflp@fulldecx\advance\lp@dcntx\m@ne + \loop + \lp@dolinesx\lp@thicklinesx\lp@tkltkness{-\lp@tol}\lp@thicklineleny + \lp@dolinesx\lp@medlinesx\lp@mdltkness{-\lp@mol}\lp@medlineleny + \lp@dolinesx\lp@thinlinesx\lp@tnltkness\z@{#2}% + \lp@labelcolor + \lp@dolabelsx\lp@thicklinesx\lp@sllx\lp@sllpx\lp@lfix\lp@lllistx\lp@signx + \lp@linecolor + \advance\lp@dcntx\m@ne + \ifnum\lp@dcntx>\m@ne\repeat + \fi + \iflp@twoniney\lp@twoninetrue\else\lp@twoninefalse\fi + \iflp@fsny\lp@fsntrue\else\lp@fsnfalse\fi + \iflp@partdecy + \lp@dolinesy\lp@partthicklinesy\lp@tkltkness{-\lp@tol}\lp@thicklinelenx + \lp@dolinesy\lp@partmedlinesy\lp@mdltkness{-\lp@mol}\lp@medlinelenx + \lp@dolinesy\lp@partthinlinesy\lp@tnltkness\z@{#1}% + \lp@labelcolor + \lp@dolabelsy\lp@partthicklinesy\lp@slly\lp@sllpy\lp@lfiy\lp@partlllisty\lp@signy + \lp@linecolor + \fi + \iflp@fulldecy\advance\lp@dcnty\m@ne + \loop + \lp@dolinesy\lp@thicklinesy\lp@tkltkness{-\lp@tol}\lp@thicklinelenx + \lp@dolinesy\lp@medlinesy\lp@mdltkness{-\lp@mol}\lp@medlinelenx + \lp@dolinesy\lp@thinlinesy\lp@tnltkness\z@{#1}% + \lp@labelcolor + \lp@dolabelsy\lp@thicklinesy\lp@slly\lp@sllpy\lp@lfiy\lp@lllisty\lp@signy + \lp@linecolor + \advance\lp@dcnty\m@ne + \ifnum\lp@dcnty>\m@ne\repeat + \fi + \end{picture}\endgroup} +\def\loglinpap{\lp@logxtrue\lp@logyfalse\def\lp@texttwo{log--lin:}\lp@logpap} +\def\loglogpap{\lp@logxtrue\lp@logytrue\def\lp@texttwo{log--log:}\lp@logpap} +\def\linlogpap{\lp@logxfalse\lp@logytrue\def\lp@texttwo{lin--log:}\lp@logpap} +\def\linlinpap{\lp@logxfalse\lp@logyfalse\def\lp@texttwo{lin--lin:}\lp@logpap} +\InputIfFileExists{logpap.cfg}% + {\typeout{Package logpap Info: Local config file logpap.cfg used}}{} +\endinput +%% +%% End of file `logpap.sty'. |