summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/fonts/knitting/knitexamples.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/doc/fonts/knitting/knitexamples.tex')
-rw-r--r--Master/texmf-dist/doc/fonts/knitting/knitexamples.tex77
1 files changed, 43 insertions, 34 deletions
diff --git a/Master/texmf-dist/doc/fonts/knitting/knitexamples.tex b/Master/texmf-dist/doc/fonts/knitting/knitexamples.tex
index 6b98fcfbae8..e9e4e3ea223 100644
--- a/Master/texmf-dist/doc/fonts/knitting/knitexamples.tex
+++ b/Master/texmf-dist/doc/fonts/knitting/knitexamples.tex
@@ -24,9 +24,9 @@
% The complete list of files considered part of this work is in
% the file `knitting-doc.pdf' and its source code `knitting-doc.tex'.
%
-% Date: 2010/08/29
+% Date: 2019/04/03
%
-% Version: 2
+% Version: 3
\documentclass[draft]{article}
@@ -191,38 +191,47 @@
\definecolor{lightgreen}{rgb}{0.5,1,0.5}
\definecolor{yellow}{rgb}{1,1,0.35}
-\catcode `\^=\active
-% Since we aren't using math, we turn ^ into an active character
-\renewcommand{^}{\noindent{\purlpass{\color{lightgreen}}=}}
-% And then we can define it like a command
-% The \noindent is there to keep the row numbering working.
-
-\chart[right]{{
-\purlpass{\color{blue}} % = produces blue
--|--------------|
--|=--=--=--=--=-|
-=|--=--=-=--=--=|
-^|^=^^=^^^=^^=^^|
-^|=^^=^^=^^=^^=^|
-\purlpass{\color{green}} % = produces green
-=|^^=^^=^=^^=^^=|
-^|^=^^=^^^=^^=^^|
-\renewcommand{^}{\noindent{\purlpass{\color{yellow}}=}}
-% ^ produces yellow
-^|=^^=^^=^^=^^=^|
-=|^^=^^=^=^^=^^=|
-^|=^^=^^=^^=^^=^|
-\renewcommand{^}{\noindent{\purlpass{\color{lightgreen}}=}}
-% ^ produces light green
-^|^=^^=^^^=^^=^^|
-=|^^=^^=^=^^=^^=|
-\purlpass{\color{blue}} % = produces blue
-^|=^^=^^=^^=^^=^|
-^|^=^^=^^^=^^=^^|
-=|--=--=-=--=--=|
--|=--=--=--=--=-|
--|--------------|
-}}
+
+% Enclosing the \catcode `\^=\active and the chart in braces
+% means that ^ will go back to its usual math meaning after the chart
+{
+ %We turn ^ into an active character
+ \catcode `\^=\active
+ % And then we can define it like a command
+ \renewcommand{^}{\noindent{\purlpass{\color{lightgreen}}\purlbackground{-}}}
+
+ \chart[right]{
+ \purlpass{\color{blue}}
+ % = produces blue
+ -|--------------|
+ -|=--=--=--=--=-|
+ =|--=--=-=--=--=|
+ ^|^=^^=^^^=^^=^^|
+ ^|=^^=^^=^^=^^=^|
+ \purlpass{\color{green}}
+ % = produces green
+ =|^^=^^=^=^^=^^=|
+ ^|^=^^=^^^=^^=^^|
+ \renewcommand{^}{\noindent{\purlpass{\color{yellow}}\purlbackground{-}}}
+ % ^ produces yellow
+ ^|=^^=^^=^^=^^=^|
+ =|^^=^^=^=^^=^^=|
+ ^|=^^=^^=^^=^^=^|
+ \renewcommand{^}{\noindent{\purlpass{\color{lightgreen}}\purlbackground{-}}}
+ % ^ produces light green
+ ^|^=^^=^^^=^^=^^|
+ =|^^=^^=^=^^=^^=|
+ \purlpass{\color{blue}}
+ % = produces blue
+ ^|=^^=^^=^^=^^=^|
+ ^|^=^^=^^^=^^=^^|
+ =|--=--=-=--=--=|
+ -|=--=--=--=--=-|
+ -|--------------|
+ }
+}
+
+\ifchartsonly \else Repeats \fi
\renewcommand{\printrightrownumber}[1]{%
\knitleftarrowhead