Debian Codegraph @

texmf-dist/doc/fonts/knitting/knitting-doc.tex

raw
1 % knitting-doc.tex
2 %
3 % Provides documentation for the knitting package
4 %
5 % author: Ariel Barton
6 %
7 % Copyright Ariel Barton, 2010-2019
8 %
9 % This work may be distributed and/or modified under the
10 % conditions of the LaTeX Project Public License, either
11 % version 1.3 of this license or (at your option) any
12 % later version.
13 % The latest version of the license is in
14 % http://www.latex-project.org/lppl.txt
15 % and version 1.3 or later is part of all distributions of
16 % LaTeX version 2003/06/01 or later.
17 %
18 % This work has the LPPL maintenance status "author-maintained".
19 %
20 % The complete list of files considered part of this work is in
21 % the file `knitting-doc.pdf' and later in this file.
22 %
23 % Date: 2019/04/03
24 %
25 % Version: 3
26
27 \documentclass[draft]{amsart}
28 % Do not remove the [draft] option; we need it to explain something
29 % in Section 5.
30
31 \usepackage{knitting}
32
33 \raggedbottom
34
35 \definecolor{gray}{gray}{0.8}
36 \definecolor{lightblue}{rgb}{0.5,0.5,1}
37
38 \usepackage{color,verbatim}
39 \hyphenation{auto-number-chart}
40
41 \usepackage[draft=false,pdfborder={0 0 0}]{hyperref}
42 \DeclareRobustCommand{\SkipTocEntry}[5]{}
43
44 \title{The \textsf{knitting} package}
45
46 \author{Ariel Barton}
47
48 \renewcommand\sectionautorefname{Section}
49 \renewcommand\subsectionautorefname{Section}
50
51 \begin{document}
52
53 \maketitle
54
55 \tableofcontents
56
57 %\listoffigures
58
59 %\listoftables
60
61 This package was written to make knitting charts using \LaTeX\ or plain
62 \TeX. It consists of several PostScript fonts of knitting symbols,
63 font-support documents, and packages of commands.
64
65 Here's an example of the code and output:
66 \begin{center}
67 \begin{minipage}[b]{108pt}
68 \obeylines\parindent=0pt\tt
69 \verb|\chart{|
70 =CCppggKKCCppggKK=
71 ===KKkk====KKkk===
72 =ggKKCCppggKKCCpp=
73 =--====kkKK====--=
74 =CCppggKKCCppggKK=
75 ===KKkk====KKkk===
76 =ggKKCCppggKKCCpp=
77 \verb|}|
78 \end{minipage}
79 \quad
80 \begin{minipage}[t]{220pt}
81 \chart{
82 \nonumber``
83 =CCppggKKCCppggKK=
84 ===KKkk====KKkk===
85 =ggKKCCppggKKCCpp=
86 =--====kkKK====--=
87 =CCppggKKCCppggKK=
88 ===KKkk====KKkk===
89 =ggKKCCppggKKCCpp=
90 \nonumber``
91 }
92
93 \end{minipage}
94 \end{center}
95
96 More examples may be found in the file \texttt{knitexamples.tex} and in
97 later sections of this document.
98
99 \section{License}
100
101 This work (the \textsf{knitting} package) consists of all files listed
102 in \autoref{sec:manifest}. It is copyright Ariel Barton, 2011--2019.
103
104 This work may be distributed and/or modified under the
105 conditions of the \LaTeX\ Project Public License, either
106 version 1.3 of this license or (at your option) any
107 later version.
108 The latest version of the license is in
109 \begin{quote}
110 \href {http://www.latex-project.org/lppl.txt}
111 {http://www.latex-project.org/lppl.txt}
112 \end{quote}
113 and version 1.3 or later is part of all distributions of
114 \LaTeX\ version 2003/06/01 or later.
115
116 This work has the LPPL maintenance status ``author-maintained''.
117
118 The \LaTeX\ project license above gives the conditions under which you
119 may redistribute or modify the fonts and files listed in
120 \autoref{sec:manifest}. This license (loosely speaking) allows you to
121 pass around copies of the package provided you redistribute it in its
122 entirety. In addition, any part, no matter how large or small, of the
123 files \texttt{knitkey.tex} and \texttt{knitexamples.tex}, \emph{and
124 these two files only}, may be freely copied, verbatim or modified, into
125 any document you write, without restriction.
126
127 As per the conditions of the LPPL, no restrictions are placed on running
128 this package (i.e., compiling \LaTeX\ documents that use this package).
129 In particular, no restrictions are placed by the package author on
130 selling or distributing patterns typeset using this package. Not
131 all \LaTeX\ packages may be used in commercial products; if you use
132 other packages to produce a PDF or paper document, you must check their
133 documentation to see if you are allowed to sell the result.
134
135 Suggestions and questions may be sent to the package author at
136 \texttt{origamist@\allowbreak gmail.com}.
137
138 \section{Installation}
139
140 This package involves many supporting files. They should be put in
141 appropriate places. Your distribution of \TeX\ may be able to do this
142 for you. If it can't, you'll have to place them yourself.
143
144 Most modern \TeX\ distributions have a folder, usually named
145 \texttt{texmf}, where you can store supporting files for the packages
146 you add yourself.\footnote{If you're using Mac\TeX, this folder should
147 be \texttt{Users\slash username\slash Library\slash texmf}. If it isn't
148 there, create it.
149
150 If you're using MiK\TeX, it is possible to designate any folder you like
151 as the root of your local tree, that is, the place where you store
152 supporting files. Instructions may be found at
153 \href{http://docs.miktex.org/manual/localadditions.html\#id573803}
154 {\texttt{http:/\slash docs.miktex.org\slash manual\slash localadditions.html\allowbreak\#id573803}}
155 or through the manual which should have come with MiKTeX.
156
157 Any time you add supporting files to a local MiKTeX root, you have to
158 refresh the file name database; see
159 \href{http://docs.miktex.org/manual/configuring.html\#fndbupdate}
160 {\texttt{http:/\slash docs.miktex.org\slash manual\slash configuring.html\allowbreak\#fndbupdate}}. }
161 All supporting files should be sorted into specific subfolders of
162 \texttt{texmf}. The sorting rules are:
163 \begin{itemize}
164 \item \texttt{.fd} and \texttt{.sty} files go in \verb.texmf/tex/latex.
165 \item \texttt{.tex} files go in \verb.texmf/tex/plain.
166 \item \texttt{.tfm} files go in \verb.texmf/fonts/tfm.
167 %\item \texttt{.vf} files go in \verb.texmf/fonts/vf.
168 \item \texttt{.pfb} files go in \verb.texmf/fonts/type1.
169 \item \texttt{.map} files go in \verb.texmf/fonts/map.
170 %\item \texttt{.enc} files go in \verb.texmf/fonts/enc.
171 \item \texttt{.mf} files go in \verb.texmf/fonts/source.
172 \item \texttt{.afm} files go in \verb.texmf/fonts/afm.
173 %\item \texttt{.ttf} files go in \verb.texmf/fonts/truetype.
174 \end{itemize}
175 In all cases they can go in sub-subfolders; for example, \texttt{.tfm}
176 files may be put into \texttt{texmf/fonts\slash tfm/knit} and not
177 \texttt{texmf/fonts/tfm}.
178
179 If you're using some other distribution, you may have some entirely
180 different place where you can put these files. Your distribution's
181 documentation should tell you where.
182
183 If you really can't figure out where to put the files, if you're in a
184 hurry, or if you're using someone else's computer and don't want to mess
185 with their \texttt{texmf} folder, just dump every file you think you
186 might need into the same folder as the document that uses the package.
187 (This is probably all the \texttt{.tfm}, \texttt{.pfb}, and
188 \texttt{.map} files, plus the \texttt{.sty} and \texttt{.fd} files if
189 you are using \LaTeX\ or the \texttt{.tex} file if you are using plain
190 \TeX.)
191
192 You aren't done! \TeX\ now knows everything it needs to do its job and
193 \emph{arrange} the characters in the font, and so your document will
194 compile, but the postprocessing software (your DVI viewer, your printer,
195 or the PDF files that pdf\/\TeX\ produces) don't know about the fonts
196 themselves.
197
198 There's a simple way to tell pdf\/\TeX\ about the fonts: use the command
199 \begin{quote}\verb|\pdfmapfile{+knitfont.map}|\end{quote}
200 This map line can go in
201 \texttt{knitting.sty} or the file that uses the package.
202
203 %You may need to downoad the file \texttt{T1-WGL4.enc}. I got this file
204 % from
205 %\begin{quote}\raggedright
206 %\href{http://ctan.binkerton.com/info/german/MiKTeX-WinEdt-TrueType-Anleitung/T1-WGL4.enc}
207 %{\texttt{http://ctan.binkerton.com/info/german/MiKTeX-WinEdt-\allowbreak TrueType-Anleitung\slash T1-WGL4.enc}}
208 %\end{quote}
209 %It goes in \texttt{texmf/fonts/enc}.
210
211 The advantage to this is that it involves nothing outside of the
212 document you are compiling.
213 On the other hand, it can be annoying to have to say that everywhere.
214 And this doesn't work at all if you decide you want to produce DVI files
215 and use a postprocessor such as \textsf{dvips}.
216
217 With Mac\TeX, I can
218 cause \textsf{dvips}, \textsf{dvipdfm}, and pdf\/\TeX\ to know about
219 these fonts by opening a Terminal window (command prompt) and typing
220 {\tt updmap -{}-enable Map=knitfont.map}.
221
222 With MiK\TeX, I need to say \texttt{initexmf -{}-edit-config-file
223 updmap} and then add the line \texttt{Map knitfont.map} to the file
224 which opens, then run \texttt{updmap} from the command line.
225
226 Something similar should work with most distributions; it is always wise
227 to check and see what your distribution's documentation says about
228 \texttt{updmap} before using it.
229
230 \section{Using the package}
231
232 Here is a minimal \LaTeX\ document that will produce a knitting pattern with a chart:
233
234 \bigskip
235
236 \begin{minipage}{0.45\textwidth}
237 \begin{verbatim}
238 \documentclass{article}
239 \usepackage{knitting}
240 \begin{document}
241 Here is my chart:
242 \chart{
243 --OAO--
244 <O---O>
245 -<O-O>-
246 }
247 \end{document}
248 \end{verbatim}
249 \end{minipage}
250 \hfill
251 \begin{minipage}{0.45\textwidth}
252 Here is my chart:
253 \chart{
254 --OAO--
255 <O---O>
256 -<O-O>-
257 }
258 \end{minipage}
259
260 \bigskip
261
262 Here is a minimal plain \TeX\ document that will do the same thing:
263
264 \bigskip
265
266 \begin{minipage}{0.45\textwidth}
267 \begin{verbatim}
268 \input knitting
269 Here is my chart:
270 \chart{
271 --OAO--
272 <O---O>
273 -<O-O>-
274 }
275 \bye
276 \end{verbatim}
277 \end{minipage}
278 \hfill
279 \begin{minipage}{0.45\textwidth}
280 Here is my chart:
281 \chart{
282 --OAO--
283 <O---O>
284 -<O-O>-
285 }
286 \end{minipage}
287
288 \bigskip
289
290 \begin{figure}
291 \caption{The normal symbols}\label{fig:symbols}
292 \newcommand\knitrow[1]{\texttt{#1}&\knitgrid\textknit{#1}&\knitnogrid \textknit{#1}\\}
293 \newcommand\displaypair[2]{\texttt{#2}&\knitgrid\textknit{#1}&\knitnogrid \textknit{#1}\\}
294 \begin{tabular}[t]{|ccc|}
295 \hline
296 \knitrow{-}
297 \knitrow{=}
298 \knitrow{<}
299 \knitrow{>}
300 \knitrow{;}
301 \knitrow{:}
302 \knitrow{L}
303 \knitrow{R}
304 \knitrow{l}
305 \knitrow{r}
306 \knitrow{A}
307 \knitrow{a}
308 \knitrow{!}
309 \knitrow{2}
310 \knitrow{3}
311 \knitrow{4}
312 \knitrow{5}
313 \knitrow{m}
314 \knitrow{M}
315 \knitrow{O}
316 \knitrow{*}
317 \hline
318 \end{tabular}
319 \hfill
320 \begin{tabular}[t]{|ccc|}
321 \hline
322 \knitrow{t}
323 \knitrow{T}
324 \knitrow{x}
325 \knitrow{X}
326 \knitrow{b}
327 \knitrow{B}
328 \knitrow{q}
329 \knitrow{Q}
330 \knitrow{v}
331 \knitrow{V}
332 \knitrow{y}
333 \knitrow{u}
334 \knitrow{0}
335 \knitrow{\#}
336 \knitrow{w}
337 \knitrow{W}
338 \knitrow{E}
339 \knitrow{\&}
340 \knitrow{Y}
341 \knitrow{6}
342 \knitrow{@}
343 %\knitrow{0}
344 \hline
345 \end{tabular}
346 \hfill
347 \begin{tabular}[t]{|ccc|}
348 \hline
349 \knitrow{(}
350 \knitrow{)}
351 \knitrow{i}
352 \knitrow{I}
353 \knitrow{j}
354 \knitrow{J}
355 \knitrow{h}
356 \knitrow{H}
357 \knitrow{s}
358 \knitrow{S}
359 \knitrow{[}
360 \knitrow{]}
361 \knitrow{z}
362 \knitrow{Z}
363 \knitrow{9}
364 \knitrow{U}
365 \knitrow{f}
366 \knitrow{F}
367 \knitrow{7}
368 \knitrow{8}
369 \knitrow{"}
370 \hline
371 \end{tabular}
372 \hfill
373 \begin{tabular}[t]{|ccc|}
374 \hline
375 \knitrow{""}
376 \knitrow{,.,}
377 \knitrow{'`'}
378 \knitrow{111}
379 \knitrow{???}
380 \knitrow{+++}
381 \knitrow{+/+}
382 \displaypair{\|}{\char`\\|}
383 \displaypair{\!}{\char`\\!}
384 \knitrow{kK}
385 \knitrow{pK}
386 \displaypair{\bobble 5}{\char`\\\char`\@5}
387 \displaypair{\narrowincrease 5}{\char`\\<5}
388 \displaypair{\narrowdecrease 5}{\char`\\>5}
389 \displaypair{\pnarrowincrease 5}{\char`\\[5}
390 \displaypair{\pnarrowdecrease 5}{\char`\\]5}
391 \displaypair{\wideincrease{4}}{}
392 \displaypair{\widedecrease{4}}{}
393 &\knitgrid\textknit{\knitbox{3}{3}}&\knitmixed\textknit{\Knit{3}{3}}\\
394 \hline
395 \multicolumn{3}{p{1.85in}}{\rule{0pt}{10pt}See \autoref{sec:fancystitches} for the commands for the last eight rows.}
396 \end{tabular}
397 \end{figure}
398
399 To draw your own chart, you first need access to various knitting symbols. They are produced inside charts using normal letters: \texttt{A} produces \textknit{A}, \texttt{O} produces \textknit{O}, and so on. An almost-complete typing key is provided in \autoref{fig:symbols}. The file \texttt{knitkey.tex} contains my suggested meanings for all the available symbols.
400
401 Ways to modify these symbols are described in \autoref{sec:fancystitches}.
402
403 Some commands to change the overall appearance of the charts or the document are given in \autoref{sec:fourfonts}.
404
405 Sometimes a part of a knitting chart (usually a repeat) should be outlined; the machinery to do so is described in \autoref{sec:outline}.
406
407 Some miscellaneous commands, including control over the various grays and colors used in knitting charts, are described in \autoref{sec:color}. The behavior of spaces and carriage returns in the input is described in \autoref{sec:spacein}.
408
409 Cable symbols such as {\knitgrid\textknit{Kk} or \knitmixed\textknit{Kk}} are complicated; they are described in \autoref{sec:cables}.
410
411 Finally, \textsf{knitting} will count rows and stitches for you automatically; the machinery to do so is described in
412 \autoref{sec:rowcount} and
413 \autoref{sec:counting}.
414
415
416 These sections describe the commands defined by \textsf{knitting}.
417 Many of these commands (indicated
418 with $\star$s and not bullets) only work inside of a knitting chart, to
419 avoid conflicts: \verb|\overline|, for example, already has a meaning
420 $\overline{xy}$ in math mode.
421
422 The command \verb|\chart| is fairly complicated, and as such, may be prone to strange behavior when used with other commands. An alternative command, \verb|\textknit|, may be used inside of, for example, a tabular environment with less risk of unexpected behavior. This is useful for writing chart keys.
423
424 Most of the commands labeled with $\star$ do \emph{not} work in concert
425 with \verb|\textknit|. Also, \textknit{\#} and
426 \textknit{\&} must be accessed with \verb|\textknit{\#}| and
427 \verb|\textknit{\&}|, not \verb|\textknit{#}| and \verb|\textknit{&}|.
428 (Unadorned \verb|#| and~\verb|&| may be used with \verb|\chart|.)
429
430
431
432 \subsection{Stitch symbols produced or modified with commands}
433 \label{sec:fancystitches}
434
435 You can generate new symbols with the command \verb|\knitbox|: \textknit{\knitbox{a}{1}} \textknit{\knitbox{Cable 6 left}{6}}. A great many strange symbols are available by using math symbols:
436 \begin{quote}
437 \verb|\knitbox{$\vspace{-1.5pt}\heartsuit$}{1}| \chart{\knitbox{$\vspace{-1.5pt}\heartsuit$}{1}}. \end{quote}
438 However, these may look a little incongruous with the rest of the font, so use with care.
439
440 Here are some other commands that produce particular symbols:
441
442 \medskip
443
444 \newcommand\myminitable[1]{\begin{tabular}[t]{@{}lc@{}}#1
445 \end{tabular}}
446
447
448 \noindent
449 \begin{tabular}{lcc}
450 Command&\texttt{\char`\\chart}-only shorthand&Symbol\\
451 \texttt{\char`\\wideincrease\char`\{3\char`\}}& & \textknit{\wideincrease{3}}\\
452 \texttt{\char`\\widedecrease\char`\{3\char`\}}& & \textknit{\widedecrease{3}}\\
453 \texttt{\char`\\bobble\char`\{3\char`\}}&\verb|\@| & \textknit{\bobble{3}}\\
454 \texttt{\char`\\narrowincrease\char`\{3\char`\}}&\verb|\<| & \textknit{\narrowincrease{3}}\\
455 \texttt{\char`\\narrowdecrease\char`\{3\char`\}}&\verb|\>| & \textknit{\narrowdecrease{3}}\\
456 \texttt{\char`\\pnarrowincrease\char`\{3\char`\}}&\verb|\[| & \textknit{\pnarrowincrease{3}}\\
457 \texttt{\char`\\pnarrowdecrease\char`\{3\char`\}}&\verb|\]| & \textknit{\pnarrowdecrease{3}}\\
458 & $\sim$& Empty space
459 \end{tabular}
460
461 \medskip
462
463 The arguments to \verb|\wideincrease| and \verb|\widedecrease| must be numbers; they are the width (in stitches). The arguments to \verb|\bobble| and so on may be any text (although you will probably use numbers). The \texttt{\char`\\chart}-only shorthand may be used inside \verb|\chart|s but not inside \verb|\textknit|.
464
465 The $\sim$ should be used on the edges of non-rectangular charts:
466 \bigskip
467
468 \begin{minipage}{0.45\textwidth}
469 \begin{verbatim}
470 ====
471 ~===
472 ~~==
473 ~~~=
474 \end{verbatim}
475 \end{minipage}
476 \hfill
477 \begin{minipage}{0.45\textwidth}
478 \chart{
479 ====
480 ~===
481 ~~==
482 ~~~=
483 }
484 \end{minipage}
485
486 \bigskip
487 You can also use $\sim$ inside a chart, although \verb|`|, \verb|'| or \verb|.| may be better choices. (Do not use $\sim$ on its own line; if you need a blank line in a cable chart, use~\verb|`|.)
488
489 Here are some commands that modify or reaarrange existing symbols in odd ways:
490
491 \begin{itemize}
492
493 \item \verb|\purlbackground|. I use a gray background to indicate simple purls, and also the purl version of more complicated stitches: \textknit{<} for slip, slip, knit, and \textknit{;} for purl 2 together. You can get \textknit{3} instead of \textknit{A} by typing~\texttt{3} instead of~\texttt{A}, but I didn't have space to provide a purl version of every symbol; so the only way to get \textknit{\purlbackground{r}} is with \verb|\purlbackground{r}|.
494
495 \item \verb|\widesymbol| places a symbol or sequence of symbols in a box of a given width: {\knitgrid \verb|\widesymbol{W}{2}| \textknit{\widesymbol{W}{2}}}. In other words, \verb|\widesymbol| behaves like \verb|\knitbox|, but typesets its first argument using the knit symbol font rather than a Roman font.
496
497 \item \verb|\cableleft| and \verb|\cableright| will produce the most general possible cable symbols. While there are simple methods to get {\knitnogrid \textknit{kkKK}} (see \autoref{sec:cables}), these let you get such obscure symbols as \textknit{\cableright{*}{-Q-}} or even (in concert with \verb|\bobble| and \verb|\knitbox|) \textknit{\cableleft{\narrowincrease{3}\knitbox{knit}{2}}{\purlbox{purl}{2}\bobble{3}}}. \verb|\cableforeground| and \verb|\cablebackground| may be used for similar effects.
498
499 \end{itemize}
500
501 \noindent
502 And here are some commands designed to deal with long sequences of knits and purls in a chart, although \verb|\knitbox| can be used to generate other symbols:
503
504 \begin{itemize}
505
506 \item \verb|\knit| and \verb|\purl|. These macros take one argument each and type out that many plain knit or plain purl symbols.
507
508 \item \verb|\Knit|, \verb|\Purl|, \verb|\knitbox|, \verb|\purlbox|. These macros were designed to produce appropriate shorthand for ``Knit or purl 12 stitches, regardless of how many are actually shown''. The first argument is text to appear inside the box; the second is the desired width of the box (in units of one stitch).
509
510 They look like this:
511 \begin{quote}\raggedright
512 \knitgrid
513 \verb|\knitgrid|\\
514 \verb|\Knit{12}{5}| \textknit{\Knit{12}{5}}
515 \verb|\knitbox{12}{5}| \textknit{\knitbox{12}{5}}\\
516 \verb|\Purl{12}{5}| \textknit{\Purl{12}{5}}
517 \verb|\purlbox{12}{5}| \textknit{\purlbox{12}{5}}
518 \knitmixed
519 \verb|\knitmixed|\\
520 \verb|\Knit{12}{5}| \textknit{\Knit{12}{5}}
521 \verb|\knitbox{12}{5}| \textknit{\knitbox{12}{5}}\\
522 \verb|\Purl{12}{5}| \textknit{\Purl{12}{5}}
523 \verb|\purlbox{12}{5}| \textknit{\purlbox{12}{5}}
524 \knitnogrid
525 \verb|\knitnogrid|\\
526 \verb|\Knit{12}{5}| \textknit{\Knit{12}{5}}
527 \verb|\knitbox{12}{5}| \textknit{\knitbox{12}{5}}\\
528 \verb|\Purl{12}{5}| \textknit{\Purl{12}{5}}
529 \verb|\purlbox{12}{5}| \textknit{\purlbox{12}{5}}
530 \end{quote}
531
532 Normally, the first argument is centered inside the box. However, you can offset the label with an optional first argument. This is the displacement to the right in half-stitches; to get a displacement to the left, use negative numbers.
533
534 If you want to make these characters more obvious, you can change the colors for the knit and purl boxes (and the generated {\knitnogrid \textknit{=}s and \textknit{-}s}) by redefining the commands \verb|\knitboxforeground|, \verb|\purlboxforeground|, \verb|\knitboxbackground|, \verb|\purlboxbackground|; by default, they are blank and \verb|\color{purlgray}| (or \verb|\purlgray|).
535
536 \begin{quote}\raggedright
537 \knitnogrid
538 \verb?\definecolor{purlboxbg}{gray}{0.57}?\\
539 \verb?\definecolor{purlboxfg}{gray}{0.2}?\\
540 \verb?\renewcommand\purlboxbackground{\color{purlboxbg}}?\\
541 \verb?\renewcommand\purlboxforeground{\color{purlboxfg}}?\\
542 \verb?\textknit{Kp\Purl[-1]{12}{6}}?
543 \definecolor{purlboxbg}{gray}{0.57}
544 \definecolor{purlboxfg}{gray}{0.2}
545 \renewcommand\purlboxbackground{\color{purlboxbg}}
546 \renewcommand\purlboxforeground{\color{purlboxfg}}
547 \textknit{Kp\Purl[-1]{12}{6}}
548 \end{quote}
549
550 \end{itemize}
551
552 \subsection[Overall appearance]{The four knitting fonts and other commands affecting overall appearance}
553
554 \label{sec:fourfonts}
555 \begin{itemize}
556
557 \item There are four available knitting fonts. They are selected with
558 the commands \verb|\knitgrid|, \verb|\knitnogrid|, \verb|\knitwide|,
559 \verb|\knitmixed|. These commands should be used outside the chart they
560 are to affect. See \autoref{fig:fourfonts} or the end of this section for a discussion of when each
561 font should be used.
562
563 \item In \LaTeX, you can change the sizes of the chart symbols with the
564 usual commands \verb|\small|, \verb|\large|, etc.
565
566 In plain \TeX, use the command \verb|\changeknitsize|, which takes one
567 argument (the desired size). After \verb|\changeknitsize{10pt}| (the
568 default size), five lines of a knitting chart will take up as much
569 vertical space as five lines of 10-point text. This means that chart
570 cells are 12 (not 10) points tall.
571
572 \item The package option \verb|chartsonly| (\LaTeX) or the command
573 \verb|\chartsonly| (plain \TeX) causes charts to be typeset in small PDF
574 files which can be easily included in other documents, or converted to
575 image files for use on a webpage.
576
577 If you would also like to bundle your chart key into a little PDF, you
578 can do it with the environment \verb|smallpage| (\LaTeX) or
579 \verb|\smallpage| and \verb|\endsmallpage| (plain \TeX).
580
581 The charts will automatically be the right width. The pages you generate
582 with \verb|smallpage| will be the natural width of their contents; this
583 is usually \verb|\textwidth| (\LaTeX) or \verb|\hsize| (plain \TeX).
584
585 For some reason, \verb|smallpage| won't work if your small page only has
586 one line. Also, your PDF viewer may cut off a few pixels around the
587 edges.
588
589 This command doesn't work with dvi-\TeX; this is a pdf\/\TeX\ command
590 only.
591
592 \item \texttt{fullpages}. Changing page dimensions mid-document in
593 \LaTeX\ is hard, but a knitting pattern writer might want several pages
594 of instructions with the usual large \LaTeX\ margins followed by several
595 pages of charts with smaller margins. The environment \texttt{fullpages}
596 does this. (Changing margins in plain \TeX\ is easy enough that
597 \texttt{knitting.tex} has no special commands for it.)
598
599 The \textsf{geometry} package now has the ability to change page
600 dimensions mid-document, which affords much more flexibility than the
601 \texttt{fullpages} environment; the \texttt{fullpages} environment is
602 retained only for reasons of backwards compatibility.
603
604 \end{itemize}
605
606 \begin{figure}
607 \caption{Suggested use of the fonts}
608 \label{fig:fourfonts}
609 \medskip
610 \small
611 \begin{tabular}[b]{lcp{220pt}}
612 Font & Example & Suggested use \\
613 \texttt{\char`\\knitgrid} & \knitgrid \textknit{A-Kp-} & Most simple patterns\\
614 \texttt{\char`\\knitwide} & \knitwide \textknit{AKp-} & Colorwork\\
615 \texttt{\char`\\knitmixed} & \knitmixed \textknit{A-Kp-} & Patterns with complicated cables; patterns that use \texttt{\char`\\Knit} and \texttt{\char`\\Purl} to deal with altered stitch counts \\
616 \texttt{\char`\\knitnogrid} & \knitnogrid \textknit{A-Kp-} & Patterns that use empty squares (``no stitch'' symbols) to deal with altered stitch counts\\
617 \end{tabular}
618 \end{figure}
619
620
621 The suggested uses of the four knitting fonts are summarized in \autoref{fig:fourfonts}.
622 I prefer to draw most charts with \texttt{\char`\\knitgrid}. However, there are some situations where each of the other four fonts is more useful.
623
624 The cells in the \texttt{\char`\\knitwide} fonts are the approximate dimensions of a knit stitch, so a colorwork chart done using the \texttt{\char`\\knitwide} font will look more like the finished piece than a colorwork chart done using \texttt{\char`\\knitgrid}.
625 However, if a chart does not display wrong-side rows, the chart will not have the same proportions as the finished result. Also, lace is often blocked severely, and cables pull in. Thus, such charts will not have the same proportions as the finished piece, even if drawn with \texttt{\char`\\knitwide}; \texttt{\char`\\knitgrid} is probably a better choice.
626
627 The \texttt{\char`\\knitgrid} cables look better than the \texttt{\char`\\knitnogrid} cables; however, wide cables, as well as cables involving increases, decreases, ribbing, and so on, can be expressed much more clearly with \texttt{\char`\\knitnogrid} or \texttt{\char`\\knitmixed}.
628
629 Finally, many knitting patterns exist that have more stitches in some rows than in others. This is usually expressed by using special ``no stitch'' symbols:
630
631 \bigskip
632
633 \noindent
634 \begin{minipage}[t]{60pt}
635 \knitnogrid
636 \chart{
637 -.A.-
638 -----
639 -.w.-}
640 \end{minipage}
641 \hfill
642 \begin{minipage}[t]{60pt}
643 \knitmixed
644 \chart{
645 -.A.-
646 -----
647 -.w.-}
648 \end{minipage}
649 \hfill
650 \begin{minipage}[t]{60pt}
651 \knitgrid
652 \chart{
653 -.A.-
654 -----
655 -.w.-}
656 \end{minipage}
657
658 \bigskip
659
660 It is my feeling that the empty gaps of \texttt{\char`\\knitnogrid} are the clearest way to express this, and thus \texttt{\char`\\knitnogrid} should be preferred in charts that involve ``no stitch'' blocks.
661
662 However, in some patterns, we can omit knit or purl symbols to keep the chart the same width. This is best done using \texttt{\char`\\purlbox} or \texttt{\char`\\Purl}:
663
664 \bigskip
665
666 \noindent
667 \begin{minipage}[t]{108pt}
668 \knitnogrid
669 \chart{
670 ====A====
671 \purlbox{4}{3}---\purlbox{4}{3}
672 ====w====}
673 \end{minipage}
674 \hfill
675 \begin{minipage}[t]{108pt}
676 \knitmixed
677 \chart{
678 ====A====
679 \Purl{4}{3}---\Purl{4}{3}
680 ====w====}
681 \end{minipage}
682 \hfill
683 \begin{minipage}[t]{108pt}
684 \knitgrid
685 \chart{
686 ====A====
687 \purlbox{4}{3}---\purlbox{4}{3}
688 ====w====}
689 \end{minipage}
690
691 \bigskip
692
693 You may feel that such things look better if a grid is involved. (I do.) This is a way to avoid ``no stitch'' boxes with \texttt{\char`\\knitgrid} or \texttt{\char`\\knitmixed}; again, the presence of complicated cables probably determines which you should use.
694
695
696 \clearpage\subsection{Repeat outlines}
697 \label{sec:outline}
698
699 As illustrated in \autoref{fig:outlineex}, there are ways to outline part of a knitting chart.
700
701 \begin{figure}
702 \caption{Outline examples}\label{fig:outlineex}
703
704 %\renewcommand \printrightrownumber[1]{\knitleftarrowhead\smash{\rule[-\stitchdp]{1pt}{\stitchht}}{\color{rncolor}\textnormal{#1}}}
705
706 \medskip
707
708 \advance\hsize 60pt
709 \noindent \hskip -30pt
710 \begin{minipage}[b]{3.2in}
711 \obeylines
712 \rlap{\texttt{\char`\\definecolor\char`\{knitlinecolor\char`\}\char`\{rgb\char`\}\char`\{0,0.5,0.8\char`\}}}
713 \verb?\chart[right]{?
714 \verb? ---|---|- ?
715 \verb? -\overline{--|---|-}?
716 \verb?~\={2}~\={2}~ \\ -|---|--- ?
717 \verb?~\={2}~\={2}~ \\ ---|---|- ?
718 \verb?\vspace{12pt}?
719 \verb? -\cableleft{--\!}{--}--?
720 \verb? \-{7} \\ ---\!---\!-?
721 \verb? -\overline*{--\!---\!-}?
722 \verb?~\_\_~\_\_~ \\ -\!---\!---?
723 \verb?~\_\_~\_\_~ \\ ---\!---\!-?
724 \vspace{0pt}
725 \verb?}?
726 \end{minipage}%
727 \hfill
728 \begin{minipage}[b]{105pt}
729 \knitnogrid
730 \definecolor{knitlinecolor}{rgb}{0,0.5,0.8}
731 \chart[right]{
732 ---|---|-
733 -\overline{--|---|-}
734 ~\={2}~\={2}~ \\ -|---|---
735 ~\={2}~\={2}~ \\ ---|---|-
736 \vspace{12pt}
737 -\cableleft{--\!}{--}--
738 \-{7} \\ ---\!---\!-
739 -\overline*{--\!---\!-}
740 ~\_\_~\_\_~ \\ -\!---\!---
741 ~\_\_~\_\_~ \\ ---\!---\!-
742 \vspace{12pt}
743 }
744 \chart{}
745 \vspace{0pt}
746 \end{minipage}%
747 \hfill
748 \begin{minipage}[b]{110pt}
749 \knitgrid
750 \definecolor{knitlinecolor}{rgb}{0,0.5,0.8}
751 \chart[right]{
752 \\ ---|---|-
753 -\overline{--|---|-}
754 ~\={2}~\={2}~ \\ -|---|---
755 ~\={2}~\={2}~ \\ ---|---|-
756 \vspace{12pt}
757 \vspace{12pt}
758 \-{7} \\ ---\!---\!-
759 -\overline*{--\!---\!-}
760 ~\_\_~\_\_~ \\ -\!---\!---
761 ~\_\_~\_\_~ \\ ---\!---\!-
762 \vspace{12pt}
763 }
764 \vspace{0pt}
765 \end{minipage}
766 \end{figure}
767
768
769 \begin{itemize}
770
771 \item[$\star$] \verb|\overline| and \verb|\underline| take one argument and typeset it, then put a colored bar over or under it. This is designed to provide a way to outline vertical pattern repeats.
772
773 These commands have starred and unstarred forms. \verb|\overline| spreads the chart rows to make room for the line; it should be used for lines that go all the way across the chart. \verb|\overline*| does not (the lines overlap the chart a bit) and so should be used for lines that go only partway across the chart.
774
775 \item[$\star$] A line that goes across the chart can be specified with \verb|\-|, which takes an argument (the width of the overlining in stitches). This has starred forms and unstarred forms, like \verb|\overline|.
776
777 \item[$\star$] The character \texttt{|} and the command \verb?\|? produce a vertical line suitable for outlining horizontal pattern repeats. The command \verb?\!? produces a slightly different vertical line: like \verb|\overline*|, it will overlap the adjacent cells to avoid disrupting the alignment of columns. Thus, \texttt{|} and \verb?\|? should be used with \verb|\overline|, while \verb|\!| should be used with \verb|\overline*|.
778
779 \item[$\star$] You may prefer to specify horizontal lines on their own, without interleaving them with the chart symbols using \verb|\overline|. This may be done, but implementation is complicated.
780
781 You can get short horizontal lines to go with \verb?\!? by using \verb|\_|; it should be positioned using tildes~\texttt{\char`\~}.
782
783 If you want to use short horizontal lines between two \verb?\|?s, you should use the command \verb|\=|, which like \verb|\-| takes an argument. (This will look wrong if you use it at the edge of a chart; it's better to use \verb|\overline| or \verb|\underline|.)
784
785 \end{itemize}
786
787 \clearpage
788
789 \subsection{Colors and miscellaneous commands}
790 \label{sec:color}
791
792 \textsf{knitting} uses several colors and shades of gray to draw charts. You can customize these.
793
794 The \LaTeX\ package \texttt{knitting.sty} loads the \textsf{color} package and uses it to define colors; so the color of purl stitches is accessed via \verb|\color{purlgray}|. If you want a different purl color, you can use \textsf{color}'s \verb|\definecolor| syntax to change \verb|{purlgray}|. This is especially useful if you want to write two-color colorwork charts.
795
796 \texttt{knitting.tex} defines \verb|\purlgray| itself, using syntax that works for pdf\/\TeX\ and \textsf{dvips}, but possibly not other drivers. If you insist on using plain \TeX\ and another driver, you are assumed to know enough to edit \texttt{knitting.tex} to compensate. Redefining colors in plain \TeX\ is complicated and driver-dependent; read \texttt{knitting.tex} itself to get an idea of the color definition syntax.
797
798 \begin{itemize}
799
800 \item \verb|purlgray| is the color of the purl background.
801
802 \item \texttt{gridcolor} is the color of the grid lines in the grid fonts.
803
804 \item \texttt{knitlinecolor} controls the lines produced by \verb?\!?,~\verb?|?, \verb|\=|, \verb|\_|, \verb|\-|, \verb|\overline|, and \verb|\underline|.
805
806 \item \texttt{rncolor} is used by \verb|\printrownumber| and \texttt{\char`\\print\-stitch\-count} so that the row numbers and stitch counts cannot be mistaken for parts of the chart proper. The color \texttt{rnarrowcolor} is used for just the small arrows in left and right row numbers. See \autoref{sec:rowcount} and \autoref{sec:counting}.
807
808 \end{itemize}
809
810 There are also some commands you might want to use:
811
812 \begin{itemize}
813
814 \item \verb|\purlpass|, \verb|\gridpass|, \verb|\mainpass|. \verb|\chart| and \verb|\textknit| compile their argument twice: once in gray, for the purl background, and then once in black for the foreground. They then put them on top of each other. (The grid fonts do a third pass, in the middle, for just the grid; this lets us have grid lines that are gray rather than black.) \verb|\purlpass| takes one mandatory argument (something to do only during the purl pass) and one optional first argument (something to do during the other two passes.) These let you produce a variety of effects:
815 \begin{quote}
816 \verb|\purlpass{\color{blue}} pK| \textknit{\purlpass{\color{blue}} pK}
817 \end{quote}
818
819 \item \verb|\knitlinewd|, \verb|\gridwidth|, \verb|\stitchwd|, \verb|\stitchht|, and \verb|\stitchdp| store most of the dimensional information about the knitting fonts.\footnote{Grid cells are designed to be 12pt (or 16.3pt) by 12pt, and extend slightly below the baseline. In \LaTeX, \texttt{\char`\\ stitchht} is 12pt. In plain \TeX, \texttt{\char`\\ stitchht} is 12pt$-$\texttt{\char`\\ stitchdp}. This is because the plain \TeX\ \texttt{\char`\\ raise} macro and the \LaTeX\ \texttt{\char`\\ raisebox} macro work differently.}
820
821 It is inadvisable to change any of these (except \verb|\knitlinewd|); a \the\gridwidth\ grid is built into the fonts, and changing \verb|\gridwidth| won't change it, just mess up any code that relies on \verb|\gridwidth|.
822
823 You can change \verb|\knitlinewd| with \verb|\setlength|; however, \verb|\knitlinewd| is defined by \textsf{knitting} in a complicated way so as to change gracefully with changing knit sizes, and so it is probably best to say \verb|\newdimen| \verb|\knitlinewd| (not \verb|\newlength|\allowbreak\verb|{\knitlinewd}|) first.
824
825 If you use one of these parameters outside of a \verb|\chart| or \verb|\textknit|, you may get error messages about undefined fonts. To fix them, use \verb|\knitgrid|, \verb|\knitnogrid| or \verb|\knitwide| again.
826
827 \item The boolean variables \verb|\ifgrid|, \verb|\ifknitsymbol| and \verb|\ifchartsonly| are standard \TeX\ conditionals: they may be used as
828 \begin{center}\verb|\ifgrid| Grid code \verb|\else| Nongrid code \verb|\fi|
829 \end{center}
830
831 They are useful if you haven't decided yet how you want to format your document, or if you want to compile it several times with slightly different results. (\verb|\ifgrid| distinguishes between \verb|\knitnogrid| and the other three options; \verb|\ifknitsymbol| distinguishes between \verb|\knitnogrid|\slash\verb|\knitmixed| and \verb|\knitgrid|\slash\verb|\knitwide|.)
832
833 \item In \LaTeX, you get sans serif text (the font inside the knit boxes) and roman text (the row number/stitch count font) with the usual commands \verb|\textsf| and \verb|\textnormal|. In plain \TeX, you can get these fonts with \verb|\knitsf| and \verb|\knitrm|.
834
835 \end{itemize}
836
837 \subsection{Spaces in the input}
838 \label{sec:spacein}
839
840 A normal space in the source code in a knitting chart, like a space in math mode, is ignored.
841 In a knitting chart, unlike in normal text, you want to prescribe all your line breaks. For convenience, knitting charts have the macro \verb|\obeylines| built in, so that a single $\langle$return$\rangle$ produces a new paragraph (and therefore a new line), like a double $\langle$return$\rangle$ usually does.
842
843 If you want two or more lines in the source code to produce one line on the chart, end all but the last with the comment character~\verb|%|.
844
845 Unfortunately, the trick I use to make $\langle$return$\rangle$s trigger new lines is delicate; specifically, if you put your chart inside another command, it stops working. (It works fine inside environments.) (Similarly, \verb?|? and \verb?#? are redefined inside knitting charts, so that \verb?|? produces a colored bar \textknit{\|} and \verb?#? produces a symbol \textknit{\#}. If your chart ends up inside a command, \verb?|? will produce a plain black bar and \verb?#? will produce an error; use \verb?\|? and \verb?\#? instead.)
846
847 So if you want to embed your chart inside another command, you have to end each line with a \verb|\par|, \verb|\\|, or a double $\langle$return$\rangle$ (blank line).
848
849 \let \saveknitlinewd \knitlinewd
850
851 \begin{figure}[h]
852 \caption{The effects of embedding charts in commands and environments}
853 \par\bigskip\par
854 \begin{minipage}[b]{2.5in}
855 \begin{verbatim}
856 \newdimen\knitlinewd
857 \setlength{\knitlinewd}{4pt}
858 \parbox{77pt}{
859 \chart{
860 tt|
861 AA\|%
862 --\\
863 ==|==\\}
864 }
865 \end{verbatim}
866 \end{minipage}%
867 \hskip -108pt
868 \begin{minipage}[b]{80pt}
869 \newdimen\knitlinewd
870 \setlength{\knitlinewd}{4pt}
871 \parbox{80pt}{
872 \chart{
873 tt|
874 AA\|%
875 --\\
876 ==|==\\}}
877 \vspace{24pt}
878 \end{minipage}%
879 \hskip 12pt
880 \begin{minipage}[b]{2.5in}
881 \begin{verbatim}
882 \newdimen\knitlinewd
883 \setlength{\knitlinewd}{4pt}
884 \begin{center}
885 \chart{
886 tt|
887 AA\|%
888 --\\
889 ==|==\\}
890 \end{center}
891 \end{verbatim}
892 \end{minipage}%
893 \hskip -84pt
894 \begin{minipage}[b]{55pt}
895 \newdimen\knitlinewd
896 \setlength{\knitlinewd}{4pt}
897 \begin{center}
898 \chart{
899 tt|
900 AA\|%
901 --\\
902 ==|==\\}
903 \end{center}
904 \vspace{24pt}
905 \end{minipage}
906 \end{figure}
907
908 \let \knitlinewd \saveknitlinewd
909
910
911
912 \section{Ligatures and cables}
913 \label{sec:cables}
914
915 \TeX\ has a built-in ligature mechanism that lets it get {?`fire--fly?} instead of {?{}`f{}ire-{}-f{}ly?} when you type \texttt{?{}`fire--fly?}. \textsf{knitting} uses this for wide horizontal sequences such as \textknit{???}. The ligature mechanism also lets you generate the reverse of \textknit{"}: \texttt{-"}, \texttt{="} and \texttt{""} produce \textknit{-"}, \textknit{="}, and \textknit{""}, respectively.
916
917 However, the ligature mechanism really comes into its own when making cable symbols.
918
919 \subsection{Symbolic cables}
920 \knitnogrid
921
922 In the fonts which represent ``knit 1'' by a vertical bar symbol (\verb|\knitnogrid|\slash\verb|\knitmixed|), cables look like this: \textknit{kkKK} or {\knitmixed\textknit{kkKK}}. The symbols are a stylized representation of what you must do to produce the cables.
923
924 The keys \texttt{k},~\texttt{p}, \texttt{K}, and \texttt{P} produce raised or lowered knit and purl symbols, and the ligature mechanism adds in the underbars or slant connectors automatically.
925
926 So:
927 \begin{quote}
928 \noindent\hfil\parbox{108pt}{
929 \tt kkKK\\
930 KKpp\\
931 kpkpKPKP}
932 \parbox{108pt}{\chart{
933 kkKK\\
934 KKpp\\
935 kpkpKPKP}}
936 \end{quote}
937
938 Some allowance for peculiar cables has been made. You can get a front increase or decrease with \texttt{N}~or \texttt{D}, or a back increase or decrease with \texttt{n}, \texttt{d}, \texttt{e}, or~\texttt{o}:
939 \texttt{nedoND} \textknit{nedoND}.
940
941 All of the symbols present in the font can be used in cables with the help of \verb|\cableleft| and \verb|\cableright|: \verb|\cableleft{AOA}{=*=}| \textknit{\cableleft{AOA}{=*=}}.
942
943 If you have a lot of cables involving the same obscure symbol, you may wish to use the commands \verb|\cableforeground| and \verb|\cablebackground| instead:
944
945 \begin{center}
946 \begin{minipage}[b]{224pt}
947 \obeylines
948 \verb?\renewcommand\${\cableforeground{b}}?
949 \verb?\renewcommand\#{\cablebackground{b}}?
950 \verb?\chart{?
951 \verb? -\$\$\#\#-?
952 \verb? -\$\$kk- ?
953 \verb? \$\#--\#\$}?
954 \end{minipage}
955 \quad
956 \begin{minipage}[b]{108pt}
957 \renewcommand\${\cableforeground{b}}
958 \renewcommand\#{\cablebackground{b}}
959 \chart{
960 -\$\$\#\#-
961 -\$\$kk-
962 \$\#--\#\$
963 }
964 \end{minipage}
965 \end{center}
966
967 Be aware that the implementation of \verb|\cablebackground| is such that only cable connectors are drawn in the main pass; the symbols are drawn during the purl pass, and so \verb|\cablebackground| interacts in unexpected ways with color effects and with \verb|\purlpass|.
968
969 Explaining to \textsf{knitting} when one cable starts and another ends can be hard: \texttt{pKKKKp} probably means \textknit{pKK KKp}, but it could mean \textknit{pK KKKp} or \textknit{pKKK Kp}, and the ligature mechanism isn't smart enough to default to \textknit{pKK KKp}, let alone read your mind. So you have to tell it what you want.
970
971 There are two ways to do this. You can put a space in: \texttt{ppKK KKpp}. You can also use the characters \texttt{c},~\texttt{g}, \texttt{C}, and~\texttt{G}: these behave just like \texttt{k},~\texttt{p}, \texttt{K}, and~\texttt{P}, except that they are only allowed to show up in the left part of a cable.
972
973 Some limited debugging mechanisms are available. A sequence of background cables \texttt{kkp} which is not paired with a sequence of foreground stitches is not a cable; it is an orphaned half-cable. If for some reason you want an orphaned half-cable \textknit{\cableright{==}{}}, use \verb|\cableleft| or \verb|\cableright| with an empty argument.
974
975 Orphaned half-cables produced by other methods (unaccompanied \texttt{pp}) are probably due to a typographical error which must be fixed. So they are made obvious. If you have an orphaned half-cable somewhere, the last square will be shaded: \texttt{ppKKKKpp} produces \textknit{ppKKKKpp} since the terminal \texttt{p}s are not part of a full cable.
976
977 So:
978 \begin{center}
979 \begin{minipage}[b]{108pt}
980 \obeylines\parindent=0pt\tt
981 =DKp,,pKD DKp,,pKD=
982 ===----====----===
983 ===KKkk====KKkk===
984 ===----====----===
985 =ppKKCCppggKKCCpp=
986 =--====----====--=
987 =--====kkKK====--=
988 =--====----====--=
989 =KKepgeKKCCepgeKK=
990 ,==----=,,=----==,
991 \end{minipage}
992 \quad
993 \begin{minipage}[t]{224pt}
994 \chart{
995 =DKp,,gKD DCp,,gKD=
996 ===----====----===
997 ===KKkk====KKkk===
998 ===----====----===
999 =ppKKCCppggKKCCpp=
1000 =--====----====--=
1001 =--====kkKK====--=
1002 =--====----====--=
1003 =KKepgeKKCCepgeKK=
1004 ,==----=,,=----==,
1005 }
1006 \end{minipage}
1007 \end{center}
1008
1009 \subsection{Stylized cables}
1010 \knitgrid
1011
1012 In the fonts which represent ``knit 1'' by an empty box (\verb|\knitgrid|\slash\verb|\knitwide|), cables look like this: \textknit{kkKK}. The symbols are a stylized sketch of how the cables actually look.
1013
1014 The letters \texttt{kpcgKPCG} work for simple cables as in the non-grid
1015 font. These cables are fairly limited. You can cross 1, 2, or 3 stitches
1016 over 1, 2, or 3 stitches, going left or right. The letters
1017 \texttt{kpcgKPCG} will let you draw purl-over-purl, knit-over-purl, or
1018 knit-over-knit cables.
1019
1020 Twelve special cable symbols are also possible:
1021 \begin{center}
1022 \textknit{kpK~Kpk~kkpKK~KKpkk~kkppKK~KKppkk}\\
1023 \textknit{kpD~Kpd~kkpKD~KKpkd~kkppKD~KKppkd}\\
1024 \end{center}
1025 You get these by putting \texttt{p}s (not \texttt{g}s) between the \texttt{k}s and \texttt{K}s.\footnote{{The rules for these cables are actually more complicated. The only way to get \knitnogrid\textknit{kkpKK}, the nogrid equivalent of \knitgrid\textknit{kkpKK}, is by typing \texttt{kkpKK} or some equivalent with \texttt{c}s and~\texttt{g}s. In the grid font, you can't use \texttt{g} for the middle purl stitch. More importantly, the fonts don't check to make sure you typed exactly \texttt{kkpKK}. The only grid cable that can start with \texttt{kkp} is \textknit{kkp}; so \texttt{kkp} followed by any number of \texttt{K}s will produce \textknit{kkpKKKKK}.}}
1026
1027 In the wide-cell grid font, for technical reasons no symbols more than five cells wide are available; so while \knitwide\textknit{pK} is available, a wider version of \knitgrid\textknit{kkppKK} is not.
1028
1029 The keys \texttt{N},~\texttt{n}, \texttt{e}, \texttt{o}, \texttt{d} and~\texttt{D} have a different function here.
1030
1031 If a knit-over-knit cable ends with a \texttt{d} or \texttt{D} instead of \texttt{k} or \texttt{K}, the result will have a solid white background instead of a gray one. The letters \texttt{n}, \texttt{N}, \texttt{e} and \texttt{o} produce symbols that are hybrids of twist and cable symbols.\footnote{A \texttt{k}, \texttt{p}, \texttt{K}, or \texttt{P} after a \texttt{n}, \texttt{e}, \texttt{o}, \texttt{d}, \texttt{N}, or \texttt{D} starts a new cable; you don't need to use \texttt{C}, \texttt{G}, \texttt{c}, \texttt{g} or spaces to separate them.}
1032 \begin{center}
1033 \begin{minipage}[b]{108pt}
1034 \obeylines\parindent=0pt\tt
1035 kkDD~kkNN~ppNN
1036 KKdd~KKnn~KKoo
1037 \end{minipage}
1038 \quad
1039 \begin{minipage}[t]{224pt}
1040 \chart{
1041 kkDD~kkNN~ppNN
1042 KKdd~KKnn~KKoo
1043 }
1044 \end{minipage}
1045 \end{center}
1046 \texttt{e} and \texttt{o} have the same effect.
1047
1048 Again, orphaned half-cables are indicated with diagonal hash marks \textknit{kk}.
1049
1050 Some special effects are possible. You can get fancy with the colors of these symbols:\footnote{If you use \texttt{\char`\\colorbox} with \texttt{\char`\\textknit} insteat of \texttt{\char`\\chart}, you will need to say \texttt{\char`\\setlength\allowbreak\char`\{\char`\\fboxsep\char`\}\char`\{0pt\char`\}} at some point to make this work; this statement is built into \texttt{\char`\\chart}.}
1051
1052 \bigskip
1053
1054 \noindent{\setlength{\fboxsep}{0pt}
1055 \verb|\colorbox{lightblue}{A}|
1056 \hfill\textknit{`\colorbox{lightblue}{A}`}}
1057
1058 \smallskip
1059
1060 \noindent{\setlength{\fboxsep}{0pt}
1061 \verb|\purlpass[Kk]{\colorbox{lightblue}{\color{blue}kK}}|
1062 \hfill\textknit{\purlpass[Kk]{\colorbox{lightblue}{\color{blue}kK}}}}
1063
1064 \bigskip
1065
1066 You can also indicate unusual cables by superimposing other symbols: \nopagebreak
1067
1068 \bigskip
1069
1070 \noindent\hspace{-10pt}\begin{minipage}[t]{310pt}
1071 \verb?\mainpass{\rlap{\knitbox{D}{4}}} kkKK?\par
1072 \verb?\mainpass{\rlap{\knitbox{m\vspace{2pt}}{1}}} ppKK?
1073 \end{minipage}
1074 \hfill
1075 \begin{minipage}[t]{48pt}
1076 \textknit{\mainpass{\rlap{\knitbox{D}{4}}} kkKK}\par
1077 \textknit{\mainpass{\rlap{\knitbox{m\vspace{2pt}}{1}}}%
1078 ppKK}
1079 \end{minipage}
1080
1081 \bigskip
1082
1083 This is enough for most cable patterns.
1084
1085
1086 \section{Counting rows}
1087 \label{sec:rowcount}
1088
1089 This section describes how to get and modify the little red numbers shown here.
1090
1091 \par\bigskip\par
1092 \begin{minipage}[b]{3.2in}
1093 \obeylines
1094 \verb?\chart{?
1095 \verb? \rnleft ======?
1096 \verb? \rnleft ======\addtocounter{rownumber}{-1}?
1097 \verb? \rnleft ======?
1098 \verb? \addtocounter{rownumber}{-5}}?
1099 \end{minipage}%
1100 \hfill
1101 \begin{minipage}[b]{1.33in}
1102 \knitgrid
1103 \chart{
1104 \rnleft======
1105 \rnleft======\addtocounter{rownumber}{-1}
1106 \rnleft======
1107 \addtocounter{rownumber}{-5}
1108 ``\nonumber}
1109 \end{minipage}
1110 \par\bigskip\par
1111 \begin{minipage}[b]{3.2in}
1112 \obeylines
1113 \verb?\chart[right]{?
1114 \verb? ======?
1115 \verb? ====== \nonumber ?
1116 \verb? ======?
1117 \verb? ======?
1118 \verb? \numberrow{6}{2}{2}}?
1119 \end{minipage}%
1120 \hfill
1121 \begin{minipage}[b]{1.33in}
1122 \knitgrid
1123 \hskip\stitchwd\chart[right]{
1124 ======
1125 ====== \nonumber
1126 ======
1127 ======
1128 \numberrow{6}{2}{2}
1129 }
1130 \end{minipage}
1131
1132 \bigskip
1133
1134 \begin{itemize}
1135
1136 \item[$\star$] \verb|\rn| prints out the value of the counter
1137 \verb|rownumber|, then decreases it by the value of the counter
1138 \texttt{rownumberskip}.
1139 For better results, use \verb|\rnleft| on the left edge and \verb|\rnright| on
1140 the right edge.
1141
1142 If you want to skip a few row numbers, you can say
1143 \verb|\addtocounter|\allowbreak\verb|{rownumber}{-3}| (\LaTeX) or \verb|\global|
1144 \verb|\advance| \verb|\rownumber| \verb|by -3| (plain \TeX).
1145
1146 \verb|\chart| will usually automatically arrange things so that the
1147 last \verb|\rn| produces a~1. If you want numbers in different charts
1148 to be numbered consecutively (e.g., if they are pieces of one big
1149 chart), you can turn this behavior off with \verb|\resetrnfalse| and
1150 back on with \verb|\resetrntrue|. You can then reset the row numbers
1151 with \verb|\setcounter{rownumber}{20}|; all future charts will count
1152 down from there.
1153
1154 This may be necessary if you have very long charts, since charts do not break across pages. (You may need to put a \verb|\par\nointerlineskip\par| between the pieces of charts.)
1155
1156 \item \verb|\chart| has an optional first argument that places row numbers automatically. It should be one of the seven words \texttt{left}, \texttt{right}, \texttt{oddleft}, \texttt{oddright}, \texttt{evenleft}, \texttt{evenright}, or \texttt{both}. This will automatically place numbers down the left edge, the right edge, or put the odd numbers on one side and the even numbers on the other side.
1157
1158 If you want to show only even or only odd numbers, you can do it with the commands \verb|\rnoddonly| or \verb|\rnevenonly|, and can restore normal behavior with the command \verb|\rnnormal|. Alternatively, you can redefine \verb|\printrightrownumber| to only print if the counter \texttt{rownumber} is odd; effects like this are why the \texttt{[both]} option exists.
1159
1160 I suggest using \verb|\setcounter{rownumberskip}{2}| \verb|\chart[right]| for charts which show only right-side rows. For charts which show all rows, I suggest using \verb|[right]| for charts which are meant to be worked in the round, \verb|[oddright]| or \verb|[oddleft]| for charts which are meant to be worked flat (back and forth), and \verb|\rnevenonly| or \verb|\rnoddonly| with \verb|[right]| for charts which may be used either flat or in the round.
1161
1162 \item[$\star$] Inside an auto-numbered chart, \verb|\nonumber| skips the next row number.
1163
1164 \item[$\star$] To number the stitches (by producing a \emph{row} of stitch numbers), you can use the command \verb|\numberrow|. It takes three arguments: the first number to be printed, the countdown (how often to print intermediate numbers), and the last number to be printed.
1165
1166 \item[$\star$] If you don't like any of my automatic countdown options, you can use \verb|\rnbox{8}|, \verb|\rnboxleft{12}|, \verb|\rnboxright{3}| to do your own row-number boxes.
1167
1168 \item Two commands exist to let you get \TeX\ to count stitches for you: \texttt{\char`\\stitch\-count\-chart} and \verb|\countstitches|. The command \texttt{\char`\\ adjust\-stitch\-count} is also useful here. See \autoref{sec:counting} for more details.
1169
1170 \end{itemize}
1171
1172 You can adjust the appearance of the row numbers in a few ways. \texttt{\char`\\ rn} puts the number
1173 in a box of width \texttt{\char`\\ rownumberwd}; you can change the
1174 width by saying
1175 \texttt{\char`\\renewcommand\allowbreak
1176 \char`\{\char`\\rownumberwd\char`\}\char`\{1em\char`\}}.
1177 You can change the appearance of the rownumbers by renewing the commands \texttt{\char`\\ printrownumber}, \texttt{\char`\\ printleftrownumber} and \texttt{\char`\\ printrightrownumber}; the default values (in \LaTeX) are
1178 \begin{quote}
1179 \verb|{{\color{rncolor}\textnormal{#1}}}|,\\
1180 \verb|{\knitleftarrowhead{\color{rncolor}\textnormal{#1}}}| and\\
1181 \verb|{{\color{rncolor}\textnormal{#1}}\knitrightarrowhead}|.
1182 \end{quote}
1183
1184 \verb|\printrownumber| controls the appearance of both \verb|\rn| and \verb|\rnbox|. You can also change the appearance of \verb|\rn|, but not \verb|\rnbox|, by redefining \verb|\therownumber|. \verb|\roman{rownumber}| (\LaTeX) or \verb|\romannumeral| \verb|\rownumber| (plain \TeX), for example, will number rows with Roman numerals.
1185
1186 \section{Counting stitches}
1187 \label{sec:counting}
1188
1189 \setcounter{rownumberskip}{1}
1190
1191 When knitting a complicated pattern, it can be helpful if the chart indicates the expected stitch count after each row. When writing a complicated chart, and especially when designing a new stitch pattern, it can be \emph{very} helpful to have some way of checking to see that each row uses exactly as many stitches as the previous row generated. \textsf{knitting} provides a mechanism for counting stitches and for comparing them from row to row.
1192
1193 If used inside a knitting chart, the command \verb|\countstitches| takes one argument and sets the counters \texttt{stitchcountout} and \texttt{stitchcountin} to reflect how many stitches that sequence of stitches would produce or consume, assuming that all the symbols have the meanings given in \textsf{knitkey.tex}.
1194
1195 So, for example:
1196
1197 \bigskip
1198
1199 \noindent\begin{minipage}[t]{224pt}
1200 \obeylines\parindent=0pt\tt
1201 \verb?\chart{\countstitches{->-} ->-}?
1202 \verb?stitchcountout: \thestitchcountout?
1203 \verb?stitchcountin: \thestitchcountin?
1204 \end{minipage}
1205 \quad
1206 \begin{minipage}[t]{108pt} \obeylines
1207 \chart{\countstitches{->-}{->-}}
1208 stitchcountout: \thestitchcountout
1209 stitchcountin: \thestitchcountin
1210 \end{minipage}
1211
1212 \bigskip
1213
1214 This can be used to automatically label each row with its stitch count.
1215
1216 \bigskip
1217
1218 \noindent\begin{minipage}[b]{350pt}
1219 \obeylines\parindent=0pt\tt
1220 \verb?\newcommand{\mystitchcount}[1]{\countstitches{#1}#1?
1221 \verb? \mainpass{{\color{rncolor}%?
1222 \verb? \textnormal{ (\thestitchcountout\ sts)}}}}?
1223 \verb?\chart{?
1224 \verb? \mystitchcount{~-A-~}?
1225 \verb? \mystitchcount{-----}?
1226 \verb? \mystitchcount{~-w-~}}?
1227 \end{minipage}
1228 \hskip -108pt
1229 \begin{minipage}[b]{108pt}
1230 \newcommand{\mystitchcount}[1]{\countstitches{#1}#1
1231 \mainpass{{\color{rncolor}%
1232 \textnormal{ (\thestitchcountout\ sts)}}}}
1233 \chart{
1234 \mystitchcount{~-A-~}
1235 \mystitchcount{-----}
1236 \mystitchcount{~-w-~}}
1237 \end{minipage}
1238
1239 \bigskip
1240
1241 (A more complicated example is in \texttt{knitexamples.tex}. Repeated patterns affect stitch count in strange ways; that example should show you how to cope.)
1242
1243 You can adjust the stitch count using the command \verb|\adjuststitchcount|. It takes a mandatory argument (how many stitches to add) and an optional argument (a different number of stitches to add to the incount.)
1244
1245 By using the command \verb|\stitchcountwarningbar|, we can check to see that stitch counts are consistent from row to row:
1246
1247 \bigskip
1248
1249 \noindent\begin{minipage}[b]{\textwidth}
1250 \obeylines\parindent=0pt\tt
1251 \verb?\newcommand{\mystitchcount}[1]{\countstitches{#1}#1%?
1252 \verb? \textnormal{\color{rncolor}?
1253 \verb? \mainpass{ (\thestitchcountout\ sts)\stitchcountwarningbar}}?
1254 \end{minipage}
1255
1256 \noindent\begin{minipage}[b]{350pt}
1257 \obeylines\parindent=0pt\tt
1258 \verb?\chart{?
1259 \verb? \setcounter{stitchcountin}{-100}?
1260 \verb? \mystitchcount{~-A-~}?
1261 \verb? \mystitchcount{-----}?
1262 \verb? \mystitchcount{-->--}?
1263 \verb? \mystitchcount{-----}?
1264 \verb? \mystitchcount{~-w-~}}?
1265 \end{minipage}
1266 \hskip -108pt
1267 \begin{minipage}[b]{108pt}
1268 \newcommand{\mystitchcount}[1]{%
1269 \countstitches{#1}#1%
1270 \textnormal{\color{rncolor}
1271 \mainpass{ (\thestitchcountout\ sts)\stitchcountwarningbar}}}
1272 \chart{
1273 \setcounter{stitchcountin}{-100}
1274 \mystitchcount{~-\>3-~}
1275 \mystitchcount{-----}
1276 \mystitchcount{-->--}
1277 \mystitchcount{-----}
1278 \mystitchcount{~-w-~}}
1279 \end{minipage}
1280
1281 \bigskip
1282
1283 The heavy bar beside Row 2 indicates that Row~3 uses six stitches, but Row~2 produces only five. \verb|\stitchcountwarningbar| is built using the same code as \TeX's usual overfull rules; thus, it will only appear (in \LaTeX) if the \texttt{draft} document option is enabled.
1284
1285 The initial \verb?\setcounter{stitchcountin}{-100}? prevents a warning bar from showing up on the very first row. A \verb?\setcounter{stitchcountin}{3}? would work in this case as well, since the top row produces 3 stitches.
1286
1287 All of this gives you a lot of control over the stitch-counting mechanism in your chart. However, it requires a lot of work to set up. \textsf{knitting} has a quick command for generating charts with stitch counts:
1288
1289 \bigskip
1290
1291 \noindent\begin{minipage}[b]{300pt}
1292 \obeylines\parindent=0pt\tt
1293 \verb?\rnoddonly?
1294 \verb?\stitchcountchart[right]{?
1295 \verb? -O-----O-?
1296 \verb? ~-O---O-?
1297 \verb? ~~-O-O-?
1298 \verb? ~~~---?
1299 \verb? }?
1300 \end{minipage}
1301 \hskip -108pt
1302 \begin{minipage}[b]{158pt}
1303 \rnoddonly
1304 \stitchcountchart[right]{
1305 -O-----O-
1306 ~-O---O-
1307 ~~-O-O-
1308 ~~~---
1309 }
1310 \par\strut
1311 \end{minipage}
1312 \bigskip
1313
1314 You can customize this with the optional argument (which places row numbers as usual), the command \texttt{\char`\\ knitdebug} (which shows the stitch counts both before and after knitting the row), and by redefining the commands \texttt{\char`\\ printleftstitchcount} and \texttt{\char`\\ printrightstitchcount}. The default (\LaTeX) values are
1315 \begin{quote}
1316 \verb?\newcommand{\printleftstitchcount}{{\color{rncolor}%?\\
1317 \verb? \textnormal{(\thestitchcountout\ sts) }}}?\\
1318 \verb?\newcommand{\printrightstitchcount}{}?
1319 \end{quote}
1320 \texttt{\char`\\ knitdebug} redefines \texttt{\char`\\ printleftstitchcount} to
1321 \begin{quote}
1322 \verb?\renewcommand \printleftstitchcount{{\color{rncolor}%?\\
1323 \verb? \textnormal{(\thestitchcountout\ out, ?\\
1324 \verb? \thestitchcountin\ in) }}}?\\
1325 \end{quote}
1326
1327 \bigskip
1328
1329 \noindent\begin{minipage}[b]{250pt}
1330 \obeylines\parindent=0pt\tt
1331 \verb?\rnoddonly?
1332 \verb?\knitdebug?
1333 \verb?\stitchcountchart[right]{?
1334 \verb? -O-----O-?
1335 \verb? ~-O---O-?
1336 \verb? ~~-O-O-?
1337 \verb? ~~~---?
1338 \verb? }?
1339 \end{minipage}
1340 \hskip -108pt
1341 \begin{minipage}[b]{208pt}
1342 \rnoddonly
1343 \knitdebug
1344 \stitchcountchart[right]{
1345 -O-----O-
1346 ~-O---O-
1347 ~~-O-O-
1348 ~~~---
1349 }
1350 \par\strut
1351 \end{minipage}
1352 \bigskip
1353
1354
1355
1356 The commands \verb|\narrowincrease| and so on, when used with the stitch-counting mechanism, do require that their arguments be numbers: if your chart involves the symbol \textknit{\narrowincrease{Z}}, that symbol cannot be counted.
1357
1358 The commands \verb|\Knit|, \verb|\Purl|, \verb|\knitbox| and \verb|\purlbox| by default are assumed to be as many stitches wide as they take up stitches on the chart: so \verb|\knitbox{A}{2}| is assumed to be two stitches wide.
1359
1360 This means that \verb|\Knit{4}{3}| is assumed to be three, not four, stitches wide. You can change this behavior by redefining the commands \verb|\Knitstitchcount|, \texttt{\char`\\Purl\-stitch\-count}, \verb|\knitboxstitchcount|, \verb|\purlboxstitchcount|:
1361 \begin{quote}
1362 \verb|\renewcommand{\Knitstitchcount}[2]{#1}|
1363 \end{quote}
1364 Redefining \verb|\Knitstitchcount| does mean that you must give \verb|\Knit| a number as its first argument.
1365
1366 Similarly, \verb|\widesymbol| normally is assumed to be as many stitches as its contents: \textknit{\widesymbol{w}{3}} represents one in-stitch and three out-stitches, just like \textknit{w}. If you prefer for \textknit{\widesymbol{*}{3}} to represent three stitches, redefine \verb|widesymbolspacer|:
1367 \begin{quote}
1368 \verb|\renewcommand{\widesymbolspacer}[2]{\hskip #2\stitchwd}|
1369 \end{quote}
1370 The arguments of \verb|\widesymbolspacer| are the two arguments of \verb|\widesymbol|; the default value is just
1371 \begin{quote}
1372 \verb|\newcommand{\widesymbolspacer}[2]{#1}|.
1373 \end{quote}
1374
1375 There is a way to deal with a series of short rows: put the rows inside the command \verb|\shortrows|, or use the command \verb|\nostitchcount| to omit a stitch count.
1376
1377 \bigskip
1378
1379 \noindent\begin{minipage}[b]{300pt}
1380 \obeylines\parindent=0pt\tt
1381 \verb?\rnevenonly?
1382 \verb?\stitchcountchart[right]{?
1383 \verb? \nostitchcount-------?
1384 \verb? -------?
1385 \verb? -------?
1386 \verb? \shortrows{~~~~---?
1387 \verb? ~~~"---}?
1388 \verb? -------?
1389 \verb? \shortrows{-----?
1390 \verb? ~~---"?
1391 \verb? ~"-----}?
1392 \verb? -------?
1393 \verb? }?
1394 \end{minipage}
1395 \hskip -108pt
1396 \begin{minipage}[b]{158pt}
1397 \rnevenonly
1398 \stitchcountchart[right]{
1399 \nostitchcount-------
1400 -------
1401 -------
1402 \shortrows{
1403 ~~~~---
1404 ~~~"---}
1405 -------
1406 \shortrows{
1407 -----
1408 ~~---"
1409 ~"-----}
1410 -------
1411 }
1412 \par\strut
1413 \end{minipage}
1414 \bigskip
1415
1416
1417
1418
1419 \addtocontents{toc}{\SkipTocEntry}\subsection*{Warnings} The stitch-counting machinery cannot, of course, actually know what meanings you assign to symbols. It is designed for the meanings in \textsf{knitkey.tex}. If you deviate from these, it will get the wrong answer.
1420
1421 Also, \verb|\stitchcountchart| is delicate; it must not be used inside commands, the closing~\verb|}| must be on its own line, and it often has trouble if strange things are put at the start of a line. (You can fix this by starting the line with a \verb|\noindent| or \verb|\leavevmode| or \verb|\mbox{}|.)
1422
1423 \section{Revision history}
1424
1425 \addtocontents{toc}{\SkipTocEntry}\subsection*{August 2010}
1426
1427 I've added the symbols \textknit{(}, \textknit{)}, \textknit{6}, \textknit{7}, \textknit{8}, and~\textknit{9} to the fonts for the benefit of people who want to use the symbols suggested by the Craft Yarn Council of America, and updated \texttt{knitkey.tex} to include these symbols (and a few others that can be generated by judicious use of \verb|\knitbox| and \verb|\purlpass|).
1428
1429 I've added the commands \texttt{\char`\\ print\-rightrownumber}, \texttt{\char`\\ printleftrownumber} and \texttt{\char`\\ print\-row\-number} to make row numbers easier to customize. I've redefined the left and right row number macros to include little arrows.
1430
1431 I've added the starred forms of \verb|\overline| and \verb|\underline| and the optional argument to \verb|\Knit|, \verb|\Purl|, \verb|\knitbox| and \verb|\purlbox| to offset the labels, and have rewritten those commands to use \verb|\knitboxbackground| and \verb|\purlboxbackground| in order to make them easier to customize.
1432
1433 \catcode`\_=12
1434
1435 I've added the stitch-counting mechanism. This has entailed minor revisions to a number of existing commands, writing the stitch-counting macros themselves, and also creating the supporting fonts \texttt{knitn_sc_in}, \texttt{knitn_sc_out}, \texttt{knitg_sc_in}, \texttt{knitg_sc_out}, \texttt{knitw_sc_in}, and \texttt{knitw_sc_out}.
1436
1437 \addtocontents{toc}{\SkipTocEntry}\subsection*{\today}
1438
1439 The fonts \verb|knitw_sc_in| and \verb|knitw_sc_out| have been removed, because I realized that \verb|knitg_sc_in| and \verb|knitg_sc_out| could be used instead.
1440
1441 The commands \verb?\|? and \verb?\!? now work with \verb|\textknit|.
1442
1443 The following have been added:
1444
1445 \begin{itemize}
1446 \item The characters \textknit{0}, \textknit{\&} and \textknit{\#}.
1447
1448 \item The commands
1449 \\
1450 \verb|\Knitstitchcount|, \verb|\Purlstitchcount|, \\\verb|\knitboxstitchcount|, \verb|\purlboxstitchcount|;
1451 \\
1452 \verb|\cableforeground|, \verb|\cablebackground|;
1453 \\\verb|\widesymbol|.
1454
1455 \item The \verb|\knitmixed| fonts.
1456
1457 \item Support for counting stitches in short rows.
1458
1459 \item Hash marks to show errors in cables.
1460
1461 \item Some tweaks to the appearance of cables in the grid font.
1462 \end{itemize}
1463
1464 \section{List of files that are considered part of this package}
1465 \label{sec:manifest}
1466
1467 This package should have come with all the following files, organized into the directories listed.
1468
1469 \medskip
1470
1471 \begingroup \ttfamily
1472 \noindent README
1473
1474 \noindent knitting/docs
1475 \begin{itemize}
1476 \item knitexamples.pdf
1477 \item knitexamples.tex
1478 \item knitkey.pdf
1479 \item knitkey.tex
1480 \item knitting-doc.pdf
1481 \item knitting-doc.tex
1482 \end{itemize}
1483
1484 \noindent knitting/fonts/afm
1485 \begin{itemize}
1486 \item knitg_sc_in.afm
1487 \item knitg_sc_out.afm
1488 \item knitgg.afm
1489 \item knitgn.afm
1490 \item knitgp.afm
1491 \item knitmg.afm
1492 \item knitml.afm
1493 \item knitmn.afm
1494 \item knitmp.afm
1495 \item knitmr.afm
1496 \item knitn_sc_in.afm
1497 \item knitn_sc_out.afm
1498 \item knitnl.afm
1499 \item knitnn.afm
1500 \item knitnp.afm
1501 \item knitnr.afm
1502 \item knitwg.afm
1503 \item knitwn.afm
1504 \item knitwp.afm
1505 \end{itemize}
1506
1507 \noindent knitting/fonts/map
1508 \begin{itemize}
1509 \item knitfont.map
1510 \end{itemize}
1511
1512 \noindent knitting/fonts/source
1513 \begin{itemize}
1514 \item knit_grid_cables.mf
1515 \item knit_nogrid_cables.mf
1516 \item knit_symbols.mf
1517 \item knitg_sc_in.mf
1518 \item knitg_sc_out.mf
1519 \item knitgg.mf
1520 \item knitgn.mf
1521 \item knitgp.mf
1522 \item knitmg.mf
1523 \item knitml.mf
1524 \item knitmn.mf
1525 \item knitmp.mf
1526 \item knitmr.mf
1527 \item knitn_sc_in.mf
1528 \item knitn_sc_out.mf
1529 \item knitnl.mf
1530 \item knitnn.mf
1531 \item knitnp.mf
1532 \item knitnr.mf
1533 \item knitwg.mf
1534 \item knitwn.mf
1535 \item knitwp.mf
1536 \end{itemize}
1537
1538 \noindent knitting/fonts/tfm
1539 \begin{itemize}
1540 \item knitg_sc_in.tfm
1541 \item knitg_sc_out.tfm
1542 \item knitgg.tfm
1543 \item knitgn.tfm
1544 \item knitgp.tfm
1545 \item knitmg.tfm
1546 \item knitml.tfm
1547 \item knitmn.tfm
1548 \item knitmp.tfm
1549 \item knitmr.tfm
1550 \item knitn_sc_in.tfm
1551 \item knitn_sc_out.tfm
1552 \item knitnl.tfm
1553 \item knitnn.tfm
1554 \item knitnp.tfm
1555 \item knitnr.tfm
1556 \item knitwg.tfm
1557 \item knitwn.tfm
1558 \item knitwp.tfm
1559 \end{itemize}
1560
1561 \noindent knitting/fonts/type1
1562 \begin{itemize}
1563 \item knitg_sc_in.pfb
1564 \item knitg_sc_out.pfb
1565 \item knitgg.pfb
1566 \item knitgn.pfb
1567 \item knitgp.pfb
1568 \item knitmg.pfb
1569 \item knitml.pfb
1570 \item knitmn.pfb
1571 \item knitmp.pfb
1572 \item knitmr.pfb
1573 \item knitn_sc_in.pfb
1574 \item knitn_sc_out.pfb
1575 \item knitnl.pfb
1576 \item knitnn.pfb
1577 \item knitnp.pfb
1578 \item knitnr.pfb
1579 \item knitwg.pfb
1580 \item knitwn.pfb
1581 \item knitwp.pfb
1582 \end{itemize}
1583
1584 \noindent knitting/tex/latex
1585 \begin{itemize}
1586 \item knitting.sty
1587 \item uknit.fd
1588 \end{itemize}
1589 \noindent knitting/tex/plain
1590 \begin{itemize}
1591 \item knitting.tex
1592 \end{itemize}
1593
1594 \endgroup
1595
1596 \end{document}
1597