summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/latex/knittingpattern/introduction.tex
blob: 8ea64cab15de60a5556f15de743248ee78e91a34 (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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
\documentclass{article}

\usepackage{fancyhdr}

%% introduction.tex, version 1
  %% Copyright 2010 Hugh Griffiths
  %
  % This work 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.3 or later is part of all distributions of LaTeX version
  % 2005/12/01 or later.
  %
  % This work has the LPPL maintenance status `maintained'.
  % 
  % The Current Maintainer of this work is Hugh Griffiths.
  %
  % This work consists of the files knittingpattern.cls, template.tex,
  % template.pdf, introduction.tex and introduction.pdf

\title{How to use the Knitting Pattern class} 
\author{Hugh Griffiths}

\begin{document}

\maketitle

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\renewcommand{\footrulewidth}{.4pt}
\renewcommand{\headrulewidth}{0pt}
\fancyfoot[R]{\copyright 2010 Hugh Griffiths}
\thispagestyle{fancy}

Thank you for downloading the Knitting Pattern class!  The purpose of this class is to provide a simple, effective method for knitters to produce high-quality, attractive patterns using \LaTeX.  It does this by providing commands to handle as much of the layout of the document as possible, leaving the author free to concentrate on the pattern itself.

\section*{Contents}
In this directory you'll find:
\begin{itemize}
\item
knittingpattern.cls
\item
template.tex
\item
template.pdf
\item
lion.png
\item
readme.txt
\item
introduction.tex
\item
introduction.pdf
\end{itemize}

The first is the class file, you'll need to download that and put it
in the directory you're working in (or `somewhere where TeX will find
it').  ``template.tex'' is a sample of how this might be used,
although here it's just creating a basic block diagram document.
``template.pdf'' is the compiled version, so you can see how it looks.
The image used throughout (lion.png) is the CTAN lion, drawn by Duane
Bibby.  The last two files are, of course, this introduction.

Some quick notes on how to use the Knitting Pattern class.  First, the
class requires a number of other packages: graphicx, float, fancyhdr,
longtable, calc and xcolor.  These are standard and are most likely
included in your copy of latex.  Second, a note on the
``\textbackslash{}definecolor'' command - this comes from the xcolor
package, and allows you to specify colours using HTML colour codes.
If you're not familiar with these,
\begin{verbatim}
http://html-color-codes.com/
\end{verbatim}
has a nice chart.  It's important to use capital letters in these
codes.

\section*{Copyright notice}

The gist of this is that you can use, distribute and modify this
package freely.  In particular, you're very welcome to sell patterns
produced using it:

This work 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 
\begin{verbatim}
http://www.latex-project.org/lppl.txt
\end{verbatim}
and version 1.3 or later is part of all distributions of LaTeX version
2005/12/01 or later.

This work has the LPPL maintenance status `maintained'.
 
The Current Maintainer of this work is Hugh Griffiths.

This work consists of the files knittingpattern.cls, template.tex,
template.pdf, introduction.tex and introduction.pdf

\section*{How to use the Knitting Pattern class}
After copying the .cls file into the appropriate directory, begin your document with:
\begin{verbatim}
  \documentclass{knittingpattern}
\end{verbatim}
You will then be able to make use of the following commands:
\begin{itemize}
\item
\begin{verbatim}
\intro{Text}{pic}
\end{verbatim}
Divides the page into two columns, the first containing the `Text'
section, and the second the image `pic'.  This will work best if your
text is long enough that it ends up with a vertical length close to
that of `pic'.  By default the picture will take up a quarter of the
page width.

\item
\begin{verbatim}
\note{borderColour}{backgroundColour}{Title}{Text}
\end{verbatim}
Produces a centred box with coloured background and border, containing
the `Title' text and `Text'.  The `Title' part is underlined, in a
larger font and appears on a separate line.  The box defaults to 90\%
of the page width.

\item
\begin{verbatim}
\diagram{diag}
\end{verbatim}
Gives a centred, bordered box containing the image
`diag'.  The default width is half of the page width.

\item
\begin{verbatim}
\important{borderColour}{backgroundColour}{Text}
\end{verbatim}
Produces a centred, coloured box and border containing `Text', for
anything you feel needs to be highlighted.  Like \textbackslash{}note,
the box defaults to 90\% of the page width.

\item
\begin{verbatim}
\cpyrght{Name} 
\end{verbatim}
This sets up the footer.  It removes the page numbering, puts a
horizontal bar at the bottom and adds `Name' on the right-hand side.
It's important that this command appear within the first page (but
after the title), so it's best to put this immediately after
\textbackslash{}maketitle (otherwise the footer on the first page is
not set up correctly).

Not to be confused with \textbackslash{}copyright, which gives a
copyright symbol.

\item
\begin{verbatim}
\biog{pic}{Text}
\end{verbatim}
Produces a biographical note.  Place this on the last page of your
pattern.  As with \textbackslash{}intro, this is divided into two
columns, with an image `pic' on the left and `Text' on the right.
This will appear as a float at the bottom of the page.  The image
will take up a quarter of the page width by default.

\item
\begin{verbatim}
\begin{pattern}{colour1}{colour2}
Instructions & (st) \\
...
\end{pattern}
\end{verbatim}
Produces a table of knitting instructions.  Each row has two entries,
the first for the instructions for that row of knitting, and the
second for the number of stitches.  The rows have alternating colours
for ease of reading.
\end{itemize}

All of these commands (except \textbackslash{}cpyrght) also accept an
optional argument which will vary the default sizes.  For
\textbackslash{}note, \textbackslash{}diagram,
\textbackslash{}important and \textbackslash{}begin\{pattern\} this
changes the width of the object:

For example,
\begin{verbatim}
\diagram[width]{diag}
\end{verbatim}
 will produce a diagram covering a
proportion `width' of the page width.

For the ``pattern'' environment, this optional argument will vary the
width of the second column, adjusting the other column appropriately:
\begin{verbatim}
\begin{pattern}[width]{colour1}{colour2}
...
\end\pattern} 
\end{verbatim}
gives a pattern table whose second column has width  `width' as a
proportion of the page.  The default value for this width is 0.05.

For \textbackslash{}intro and \textbackslash{}biog the optional
argument changes the width of the image, adjusting the size of the
other column to account for this.  So
\begin{verbatim}
\intro[0.5]{Text}{pic}
\end{verbatim}
 will produce two columns half the width of the page, the first
 containing ``Text'' and the second containing the image ``pic''.

\section*{Suggestions}

If you have any suggestions for improvements or extra functions you'd
like added, or if you'd like to report any bugs, please email me at
\begin{verbatim}
griffiths(dot)hugh(at)gmail(dot)com.
\end{verbatim}

All of the commands are easily modifiable, and I would encourage you
to edit them to find a style you like, or to make the commands more
user-friendly.
\end{document}