Debian Codegraph @

texmf-dist/tex/latex/knittingpattern/knittingpattern.cls

raw
1 \NeedsTeXFormat{LaTeX2e}
2 \ProvidesClass{knittingpattern}[2009/11/13 Formatting for knitting patterns]
3
4 %% knittingpattern.cls, version 1
5 %% Copyright 2010 Hugh Griffiths
6 %
7 % This work may be distributed and/or modified under the conditions
8 % of the LaTeX Project Public License, either version 1.3 of this
9 % license or (at your option) any later version. The latest version
10 % of this license is in http://www.latex-project.org/lppl.txt and
11 % version 1.3 or later is part of all distributions of LaTeX version
12 % 2005/12/01 or later.
13 %
14 % This work has the LPPL maintenance status `maintained'.
15 %
16 % The Current Maintainer of this work is Hugh Griffiths.
17 %
18 % This work consists of the files knittingpattern.cls, template.tex, template.pdf, introduction.tex and introduction.pdf
19
20 \LoadClass{article}
21
22 \RequirePackage{graphicx, float, fancyhdr, longtable, calc}
23 \RequirePackage[table]{xcolor}
24
25 % This section is from Manas Tungare's ``lesspaper.sty'', which he has
26 % generously donated to the public domain.
27 \setlength{\textwidth}{7.5in}
28 \setlength{\textheight}{9.5in}
29 \setlength{\evensidemargin}{-0.5in}
30 \setlength{\oddsidemargin}{-0.5in}
31 \setlength{\topmargin}{-0.5in}
32 \setlength{\voffset}{-0.5in}
33
34 \newcommand{\intro}[3][.25]{\begin{tabular}{m{\textwidth - 4\tabcolsep
35 - #1\textwidth}m{#1\textwidth}}
36 #2&\fbox{\includegraphics[width=#1\textwidth]{#3}}
37 \end{tabular}}
38
39 \newcommand{\note}[5][.9]{\begin{center}
40 \fcolorbox{#2}{#3}{\parbox{#1\textwidth}{\underline{\Large{#4}} \\ #5 }
41 }
42 \end{center}
43 }
44
45 \newcommand{\diagram}[2][.5]{\begin{center}
46 \fbox{\includegraphics[width=#1\textwidth]{#2}}
47 \end{center}
48 }
49
50 \newenvironment{pattern}[3][.05]{\begin{center}
51 \rowcolors{1}{#2}{#3}
52 \begin{longtable}{p{\textwidth-#1\textwidth- 4\tabcolsep} p{#1\textwidth}}}{\end{longtable}\end{center}}
53
54 \newcommand{\important}[4][.9]{\begin{center}\fcolorbox{#2}{#3}{\parbox{#1\textwidth}{#4}}\end{center}}
55
56 \newcommand{\biog}[3][.25]{\begin{table}[b]\begin{tabular}{m{#1\textwidth}m{\textwidth-#1\textwidth-4\tabcolsep}}
57 \fbox{\includegraphics[width=#1\textwidth]{#2}}& #3
58 \end{tabular} \end{table}}
59
60 \newcommand{\cpyrght}[1]{
61 \pagestyle{fancy}
62 \fancyhead{}
63 \fancyfoot{}
64 \renewcommand{\footrulewidth}{.4pt}
65 \renewcommand{\headrulewidth}{0pt}
66 \fancyfoot[R]{#1}
67 \thispagestyle{fancy}
68 }
69
70 \setlength{\fboxrule}{2pt}
71 \setlength{\tabcolsep}{0.025\textwidth}
72