MAJOR=4
MINOR=27
DEVNAME=tty27
  A   3ˆl–Ãa¾”jC]Š}Aà¸Å£�þ^ŽQ¬ÛÍ�²:Ûm4ð?ŸÜ„e·™kÛ_ˆI|¥�+$¾ÇÚ ?÷     3% knitting.sty
%
% Provides commands useful for writing knitting patterns in LaTeX,
% including commands to typeset knit charts, and to switch to larger
% pages mid-document.
%
% author: Ariel Barton
%
% Copyright Ariel Barton, 2010
%
% 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 the license is in
%    http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of
% LaTeX version 2003/06/01 or later.
%
% This work has the LPPL maintenance status "author-maintained".
%
% The complete list of files considered part of this work is in
% the file `knitting-doc.pdf' and its source code `knitting-doc.tex'.
%
% Version: 3

\ProvidesPackage{knitting}[2019/04/03]

%\pdfmapfile{+knitfont.map}

%
% Boolean variables
%

\newif \ifchartsonly \chartsonlyfalse
\newif \ifgrid
\newif \ifknitsymbol
\newif \ifresetrn \resetrntrue
\newif \ifleftrn@knit
\newif \ifshowrn@knit \showrn@knittrue
\newif \ifpdf@knit
\newif \ifcountingout@knit
\newif \ifCountStsThisRow@knit \CountStsThisRow@knittrue
\pdf@knittrue
\ifx \pdfoutput \undefined \pdf@knitfalse \fi
\ifx \pdfoutput \relax     \pdf@knitfalse \fi

%
% Color commands
%

\RequirePackage{color}

\definecolor{purlgray}{gray}{0.65}
\definecolor{knitlinecolor}{rgb}{0.7,0,0}
\definecolor{gridcolor}{gray}{0.3}
\definecolor{forecolor}{gray}{0}
\definecolor{rncolor}{rgb}{0.6,0,0}
\definecolor{rnarrowcolor}{rgb}{0.45,0,0}

%
% LaTeX-only material (options and fullpages)
%

\DeclareOption{chartsonly}{\chartsonlytrue}

\ProcessOptions

% Every dimension I could think of affecting the
% main page body. It's an environment instead of a command since I want
% a way to switch back to normal pages. Dimensions I don't change are
% \marginparsep,\marginparwidth,\marginparpush,\paperheight,\paperwidth

\newenvironment{fullpages}{
    \clearpage
    \pagestyle{plain}
    \setlength{\hoffset}{0pt}
    \setlength{\voffset}{0pt}
    \setlength{\oddsidemargin}{0pt}
    \setlength{\evensidemargin}{0pt}
    \setlength{\topmargin}{0pt}
    \setlength{\headheight}{0pt}
    \setlength{\headsep}{0pt}
    \setlength{\textheight}{\paperheight}
        \addtolength{\textheight}{-\footskip}
        \addtolength{\textheight}{-2in}
    \setlength{\textwidth}{\paperwidth}
        \addtolength{\textwidth}{-2in}
    % This next bit is borrowed from Peter Wilson's chngpage.sty
    % package. I didn't want to just \usepackage{chngpage} because it
    % behaves like \addtolength and I wanted \setlength, and loading the
    % whole package for one eight-line snippet of code just seemed
    % needlessly complicated.
    \setlength{\@colht}{\textheight}\setlength{\@colroom}{\textheight}%
    \setlength{\vsize}{\textheight}\setlength{\columnwidth}{\textwidth}%
    \if@twocolumn%
        \advance\columnwidth-\columnsep \divide\columnwidth\tw@%
        \@firstcolumntrue%
    \fi%
    \setlength{\hsize}{\columnwidth}%
    \setlength{\linewidth}{\hsize}%
    }
    {\clearpage}

%
% Dimensions
%

\newlength \leftgap@knit
\newlength \bgshift@knit
\newlength \chartwidth@knit
\newlength \stitchcountwidth@knit
\newlength \rnleftwd@knit
\newlength \rnrightwd@knit

\newbox\bgbox@knit
\newbox\fgbox@knit
\newbox\ggbox@knit

\newcounter{rownumber}
\newcounter{tempcount@knit}
\newcounter{rownumberskip} \c@rownumberskip = 1
\newcounter{stitchcountin}
\newcounter{stitchcountinprev}
\newcounter{stitchcountout}
\newcounter{shortrowstsin@knit}
\newcounter{shortrowstsout@knit}

\newcommand \passnum@knit{2}
\newcommand \stitchwd{\fontdimen6\csname U/knit/\series@knit/n/\f@size\endcsname}
\newcommand \stitchwd@count@knit{\fontdimen6\csname U/knit/\series@knit/out/\f@size\endcsname}
\newcommand \stitchdp{\fontdimen8\csname U/knit/\series@knit/n/\f@size\endcsname}
\newcommand \stitchht{\fontdimen9\csname U/knit/\series@knit/n/\f@size\endcsname}
\newcommand \g