summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/tex/latex/base/graphpap.sty
blob: 89b5e492fc98b3570b985370fcb6b173d7fd3ef7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
%%
%% This is file `graphpap.sty',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% graphpap.dtx  (with options: `package')
%% 
%% This is a generated file.
%% 
%% Copyright 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006
%% The LaTeX3 Project and any individual authors listed elsewhere
%% in this file.
%% 
%% This file was generated from file(s) of the LaTeX base system.
%% --------------------------------------------------------------
%% 
%% It may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3c
%% 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.3c or later is part of all distributions of LaTeX
%% version 2005/12/01 or later.
%% 
%% This file has the LPPL maintenance status "maintained".
%% 
%% This file may only be distributed together with a copy of the LaTeX
%% base system. You may however distribute the LaTeX base system without
%% such generated files.
%% 
%% The list of all files belonging to the LaTeX base distribution is
%% given in the file `manifest.txt'. See also `legal.txt' for additional
%% information.
%% 
%% The list of derived (unpacked) files belonging to the distribution
%% and covered by LPPL is defined by the unpacking scripts (with
%% extension .ins) which are part of the distribution.
%%
%% File `graphpap.dtx'.
%% Copyright (C) 1994 by Leslie Lamport
%%                       all rights reserved.
%%
\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{graphpap}
      [1994/08/09 v1.0c Standard LaTeX graphpap package (LL)]
\let\c@@grid\count@
\def\@vgrid(#1,#2)#3#4#5{%
  \setcounter{@grid}{#1}%
  \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}%
  \multiput(#1,#2)(#3,0){#4}{\@vgridnumber{#3}}}
\def\@vgridnumber#1{%
  \makebox(0,0)[t]{%
    \shortstack{\rule{0pt}{10pt}\\\arabic{@grid}}}%
  \addtocounter{@grid}{#1}}
\def\@nonumvgrid(#1,#2)#3#4#5{%
  \multiput(#1,#2)(#3,0){#4}{\line(0,1){#5}}}
\def\@hgrid(#1,#2)#3#4#5{%
  \setcounter{@grid}{#2}%
  \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}%
  \multiput(#1,#2)(0,#3){#4}{\@hgridnumber{#3}}}
\def\@hgridnumber#1{%
  \makebox(0,0)[r]{\arabic{@grid}\hspace{10pt}}%
  \addtocounter{@grid}{#1}}
\def\@nonumhgrid(#1,#2)#3#4#5{%
  \multiput(#1,#2)(0,#3){#4}{\line(1,0){#5}}}
\newcommand\graphpaper[1][10]{\leavevmode\@grid{#1}}
\def\@grid#1(#2,#3)#4{\@grid@i{#1}{#2}{#3}(}
\def\@grid@i#1#2#3(#4,#5){%
  \@tempcnta=#4\relax
  \divide\@tempcnta#1\relax
  \advance\@tempcnta1\relax
   {\thinlines\@nonumvgrid(#2,#3){#1}{\@tempcnta}{#5}
    \@tempcnta#4\relax
    \divide\@tempcnta5\relax
    \divide\@tempcnta#1\relax
    \advance\@tempcnta1\relax
    \@tempcntb5\relax
    \multiply\@tempcntb#1\relax
    \thicklines\@vgrid(#2,#3){\@tempcntb}{\@tempcnta}{#5}
    \@tempcnta#5\relax
    \divide\@tempcnta #1\relax
    \advance\@tempcnta1\relax
    \thinlines\@nonumhgrid(#2,#3){#1}{\@tempcnta}{#4}
    \@tempcnta#5\relax
    \divide\@tempcnta5\relax
    \divide\@tempcnta#1\relax
    \advance\@tempcnta1\relax
    \thicklines\@hgrid(#2,#3){\@tempcntb}{\@tempcnta}{#4}}%
  \ignorespaces}

\endinput
%%
%% End of file `graphpap.sty'.