Debian Codegraph @

texmf-dist/doc/latex/knittingpattern/introduction.tex

raw
1 \documentclass{article}
2
3 \usepackage{fancyhdr}
4
5 %% introduction.tex, version 1
6 %% Copyright 2010 Hugh Griffiths
7 %
8 % This work may be distributed and/or modified under the conditions
9 % of the LaTeX Project Public License, either version 1.3 of this
10 % license or (at your option) any later version. The latest version
11 % of this license is in http://www.latex-project.org/lppl.txt and
12 % version 1.3 or later is part of all distributions of LaTeX version
13 % 2005/12/01 or later.
14 %
15 % This work has the LPPL maintenance status `maintained'.
16 %
17 % The Current Maintainer of this work is Hugh Griffiths.
18 %
19 % This work consists of the files knittingpattern.cls, template.tex,
20 % template.pdf, introduction.tex and introduction.pdf
21
22 \title{How to use the Knitting Pattern class}
23 \author{Hugh Griffiths}
24
25 \begin{document}
26
27 \maketitle
28
29 \pagestyle{fancy}
30 \fancyhead{}
31 \fancyfoot{}
32 \renewcommand{\footrulewidth}{.4pt}
33 \renewcommand{\headrulewidth}{0pt}
34 \fancyfoot[R]{\copyright 2010 Hugh Griffiths}
35 \thispagestyle{fancy}
36
37 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.
38
39 \section*{Contents}
40 In this directory you'll find:
41 \begin{itemize}
42 \item
43 knittingpattern.cls
44 \item
45 template.tex
46 \item
47 template.pdf
48 \item
49 lion.png
50 \item
51 readme.txt
52 \item
53 introduction.tex
54 \item
55 introduction.pdf
56 \end{itemize}
57
58 The first is the class file, you'll need to download that and put it
59 in the directory you're working in (or `somewhere where TeX will find
60 it'). ``template.tex'' is a sample of how this might be used,
61 although here it's just creating a basic block diagram document.
62 ``template.pdf'' is the compiled version, so you can see how it looks.
63 The image used throughout (lion.png) is the CTAN lion, drawn by Duane
64 Bibby. The last two files are, of course, this introduction.
65
66 Some quick notes on how to use the Knitting Pattern class. First, the
67 class requires a number of other packages: graphicx, float, fancyhdr,
68 longtable, calc and xcolor. These are standard and are most likely
69 included in your copy of latex. Second, a note on the
70 ``\textbackslash{}definecolor'' command - this comes from the xcolor
71 package, and allows you to specify colours using HTML colour codes.
72 If you're not familiar with these,
73 \begin{verbatim}
74 http://html-color-codes.com/
75 \end{verbatim}
76 has a nice chart. It's important to use capital letters in these
77 codes.
78
79 \section*{Copyright notice}
80
81 The gist of this is that you can use, distribute and modify this
82 package freely. In particular, you're very welcome to sell patterns
83 produced using it:
84
85 This work may be distributed and/or modified under the conditions of
86 the LaTeX Project Public License, either version 1.3 of this license
87 or (at your option) any later version. The latest version of this
88 license is in
89 \begin{verbatim}
90 http://www.latex-project.org/lppl.txt
91 \end{verbatim}
92 and version 1.3 or later is part of all distributions of LaTeX version
93 2005/12/01 or later.
94
95 This work has the LPPL maintenance status `maintained'.
96
97 The Current Maintainer of this work is Hugh Griffiths.
98
99 This work consists of the files knittingpattern.cls, template.tex,
100 template.pdf, introduction.tex and introduction.pdf
101
102 \section*{How to use the Knitting Pattern class}
103 After copying the .cls file into the appropriate directory, begin your document with:
104 \begin{verbatim}
105 \documentclass{knittingpattern}
106 \end{verbatim}
107 You will then be able to make use of the following commands:
108 \begin{itemize}
109 \item
110 \begin{verbatim}
111 \intro{Text}{pic}
112 \end{verbatim}
113 Divides the page into two columns, the first containing the `Text'
114 section, and the second the image `pic'. This will work best if your
115 text is long enough that it ends up with a vertical length close to
116 that of `pic'. By default the picture will take up a quarter of the
117 page width.
118
119 \item
120 \begin{verbatim}
121 \note{borderColour}{backgroundColour}{Title}{Text}
122 \end{verbatim}
123 Produces a centred box with coloured background and border, containing
124 the `Title' text and `Text'. The `Title' part is underlined, in a
125 larger font and appears on a separate line. The box defaults to 90\%
126 of the page width.
127
128 \item
129 \begin{verbatim}
130 \diagram{diag}
131 \end{verbatim}
132 Gives a centred, bordered box containing the image
133 `diag'. The default width is half of the page width.
134
135 \item
136 \begin{verbatim}
137 \important{borderColour}{backgroundColour}{Text}
138 \end{verbatim}
139 Produces a centred, coloured box and border containing `Text', for
140 anything you feel needs to be highlighted. Like \textbackslash{}note,
141 the box defaults to 90\% of the page width.
142
143 \item
144 \begin{verbatim}
145 \cpyrght{Name}
146 \end{verbatim}
147 This sets up the footer. It removes the page numbering, puts a
148 horizontal bar at the bottom and adds `Name' on the right-hand side.
149 It's important that this command appear within the first page (but
150 after the title), so it's best to put this immediately after
151 \textbackslash{}maketitle (otherwise the footer on the first page is
152 not set up correctly).
153
154 Not to be confused with \textbackslash{}copyright, which gives a
155 copyright symbol.
156
157 \item
158 \begin{verbatim}
159 \biog{pic}{Text}
160 \end{verbatim}
161 Produces a biographical note. Place this on the last page of your
162 pattern. As with \textbackslash{}intro, this is divided into two
163 columns, with an image `pic' on the left and `Text' on the right.
164 This will appear as a float at the bottom of the page. The image
165 will take up a quarter of the page width by default.
166
167 \item
168 \begin{verbatim}
169 \begin{pattern}{colour1}{colour2}
170 Instructions & (st) \\
171 ...
172 \end{pattern}
173 \end{verbatim}
174 Produces a table of knitting instructions. Each row has two entries,
175 the first for the instructions for that row of knitting, and the
176 second for the number of stitches. The rows have alternating colours
177 for ease of reading.
178 \end{itemize}
179
180 All of these commands (except \textbackslash{}cpyrght) also accept an
181 optional argument which will vary the default sizes. For
182 \textbackslash{}note, \textbackslash{}diagram,
183 \textbackslash{}important and \textbackslash{}begin\{pattern\} this
184 changes the width of the object:
185
186 For example,
187 \begin{verbatim}
188 \diagram[width]{diag}
189 \end{verbatim}
190 will produce a diagram covering a
191 proportion `width' of the page width.
192
193 For the ``pattern'' environment, this optional argument will vary the
194 width of the second column, adjusting the other column appropriately:
195 \begin{verbatim}
196 \begin{pattern}[width]{colour1}{colour2}
197 ...
198 \end\pattern}
199 \end{verbatim}
200 gives a pattern table whose second column has width `width' as a
201 proportion of the page. The default value for this width is 0.05.
202
203 For \textbackslash{}intro and \textbackslash{}biog the optional
204 argument changes the width of the image, adjusting the size of the
205 other column to account for this. So
206 \begin{verbatim}
207 \intro[0.5]{Text}{pic}
208 \end{verbatim}
209 will produce two columns half the width of the page, the first
210 containing ``Text'' and the second containing the image ``pic''.
211
212 \section*{Suggestions}
213
214 If you have any suggestions for improvements or extra functions you'd
215 like added, or if you'd like to report any bugs, please email me at
216 \begin{verbatim}
217 griffiths(dot)hugh(at)gmail(dot)com.
218 \end{verbatim}
219
220 All of the commands are easily modifiable, and I would encourage you
221 to edit them to find a style you like, or to make the commands more
222 user-friendly.
223 \end{document}