Commit ed8d8676 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Documentation, test

Added "Getting Started" chapter to the documentation. Generated
LaTeX/PDF form of Sphinx documentation. Added definition so that
(asdf:test-system :antik) will work, and tests both ANTIK and GRID
packages.
parent a3142410
Search.setIndex({envversion:46,filenames:["elemmath","intro","packages","root","utility"],objects:{},objnames:{},objtypes:{},terms:{"default":0,"new":2,"return":4,"switch":1,aco:0,addit:[0,2],after:2,all:[2,4],alreadi:2,also:[1,2],answer:4,appli:4,arbitrari:0,arg:0,argument:0,arrai:2,asdf:2,asin:0,atan:0,avail:4,bar:1,base:[1,2],befin:2,befor:4,best:1,between:1,both:1,calcul:1,call:[0,1],can:[1,2],chang:1,charact:4,chosen:2,combin:1,common:[1,2,4],compar:1,comput:1,content:[3,4],conveni:2,convienc:2,cosh:0,creat:1,data:[1,2],decomposit:1,defin:2,definit:[2,4],den:0,design:1,develop:1,differen:1,dimens:2,discard:4,divis:0,divisor:0,each:2,easi:1,easili:1,element:4,encount:4,engin:1,enough:0,eof:4,eql:4,equival:0,exampl:1,except:2,exist:2,exp:0,expon:0,expt:0,facilit:1,featur:2,fill:4,floor:0,foo:1,foreign:[1,2],form:1,foundat:1,gener:[0,2],gnu:1,grid:[0,2],gsl:1,gsll:[1,2],index:3,initi:2,interchang:1,interfac:1,interoper:1,itself:4,kei:4,librari:1,like:1,lisp:[1,2],list:[2,4],load:2,mai:0,mainli:4,make:[1,2],matter:1,mean:1,minusp:0,mix:1,modul:3,more:1,most:2,multipl:0,name:[1,2],nicknam:2,nil:4,non:1,notabl:1,num:0,number:0,numer:1,object:1,onli:[1,4],option:[0,2],other:[0,1],packag:1,page:3,pass:1,permit:1,physic:2,plusp:0,post:4,prefix:1,problem:1,procedur:1,properli:2,provid:[0,1,4],quicklisp:2,reach:4,refer:2,regular:0,relat:2,rest:0,result:1,root:0,round:0,same:[1,2,4],satisfi:4,scienc:2,scientif:1,search:3,select:1,sever:2,shadow:2,should:[1,2,4],signum:0,simpl:1,sin:0,sinh:0,solv:1,some:2,someth:0,specifi:4,sqrt:0,squar:0,stop:4,stream:4,string:4,subtract:0,sure:2,symbol:2,system:1,tan:0,tanh:0,termin:4,test:4,than:0,thei:0,thi:1,two:2,updat:2,user:[1,2,4],util:3,valu:4,well:4,when:[0,4],whether:1,which:[2,4],whole:1,wish:1,without:1,zero:0,zerop:0},titles:["Elementary Mathematical Functions","Introduction to Antik","Systems and Packages","Welcome to Antik’s documentation!","Utility"],titleterms:{"function":0,antik:[1,3],document:3,elementari:0,indic:3,introduct:1,mathemat:0,packag:2,system:2,tabl:3,util:4,welcom:3}})
\ No newline at end of file
Search.setIndex({envversion:46,filenames:["elemmath","intro","packages","root","starting","utility"],objects:{},objnames:{},objtypes:{},terms:{"default":[0,4],"float":4,"new":2,"return":5,"switch":1,"true":4,aco:0,addit:[0,2],advis:4,after:2,all:[2,5],alreadi:2,also:[1,2,4],answer:5,appli:5,arbitrari:0,arg:0,argument:0,arrai:2,asdf:[2,4],asin:0,assert:4,atan:0,avail:5,bar:1,base:[1,2],befin:2,befor:5,begin:4,best:1,between:1,both:1,calcul:1,call:[0,1],can:[1,2,4],chang:1,charact:5,chosen:2,combin:1,common:[1,2,5],compar:1,comput:1,content:[3,5],conveni:[2,4],convienc:2,correctli:4,cosh:0,could:4,creat:1,current:4,data:[1,2],date:4,decomposit:1,defin:[2,4],definit:[2,4,5],den:0,design:1,detail:4,develop:1,differ:4,differen:1,dimens:[2,4],discard:5,divis:0,divisor:0,doubl:4,each:2,easi:1,easier:4,easili:1,element:5,enabl:4,encount:5,engin:1,enough:0,eof:5,eql:5,equival:0,error:4,exampl:[1,4],except:2,execut:4,exist:2,exp:0,expon:[0,4],expt:0,facilit:1,fail:4,featur:2,file:4,fill:5,first:4,floor:0,follow:4,foo:1,foreign:[1,2],form:[1,4],foundat:1,gener:[0,2],get:3,given:4,gnu:1,grid:[0,2,4],gsl:1,gsll:[1,2],index:3,initi:2,input:4,instal:4,interchang:1,interfac:1,interoper:1,interpret:4,itself:5,kei:5,leav:4,librari:1,like:1,line:4,lisp:[1,2,4],list:[2,5],liter:4,load:[2,4],macro:4,mai:[0,4],mainli:5,make:[1,2,4],manual:4,marker:4,matter:1,mean:1,minusp:0,miss:4,mix:1,modul:3,more:[1,4],most:2,multipl:0,name:[1,2,4],nicknam:2,nil:[4,5],non:1,normal:4,notabl:1,num:0,number:0,numer:1,object:1,onc:4,onli:[1,5],option:[0,2,4],other:[0,1],packag:1,page:3,pass:[1,4],permit:1,physic:[2,4],plusp:0,point:4,post:5,prefix:1,problem:1,procedur:1,prompt:4,properli:2,provid:[0,1,4,5],quantiti:4,quicklisp:[2,4],quickload:4,quot:4,reach:5,read:4,reader:4,readtabl:4,reassur:4,refer:2,regress:4,regular:0,relat:2,repl:4,rest:0,result:1,root:0,round:0,run:4,same:[1,2,5],satisfi:5,scienc:2,scientif:1,search:3,second:4,see:4,select:1,set:4,sever:2,shadow:2,should:[1,2,5],signum:0,simpl:1,sin:0,sinh:0,solv:1,some:2,someth:0,sourc:4,specifi:[4,5],sqrt:0,squar:0,start:3,stop:5,stream:5,string:5,subtract:0,summari:4,sure:2,symbol:2,system:1,tan:0,tanh:0,termin:5,test:[4,5],than:0,thei:0,thi:[1,4],three:4,time:4,total:4,two:2,type:4,unit:4,updat:2,user:[1,2,4,5],util:3,valu:5,well:5,when:[0,5],whether:1,which:[2,4,5],whole:1,wish:1,without:[1,4],work:4,your:4,zero:0,zerop:0},titles:["Elementary Mathematical Functions","Introduction to Antik","Systems and Packages","Antik","Getting Started","Utility"],titleterms:{"function":0,antik:[1,3],elementari:0,get:4,indic:3,introduct:1,mathemat:0,packag:2,start:4,system:2,tabl:3,util:5}})
\ No newline at end of file
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Getting Started &mdash; Antik 0 documentation</title>
<link rel="stylesheet" href="_static/classic.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="_static/jquery.js"></script>
<script type="text/javascript" src="_static/underscore.js"></script>
<script type="text/javascript" src="_static/doctools.js"></script>
<script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="top" title="Antik 0 documentation" href="root.html" />
<link rel="next" title="Systems and Packages" href="packages.html" />
<link rel="prev" title="Introduction to Antik" href="intro.html" />
</head>
<body role="document">
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="packages.html" title="Systems and Packages"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction to Antik"
accesskey="P">previous</a> |</li>
<li class="nav-item nav-item-0"><a href="root.html">Antik 0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body" role="main">
<div class="section" id="getting-started">
<h1>Getting Started<a class="headerlink" href="#getting-started" title="Permalink to this headline"></a></h1>
<p>Antik is normally installed using <a class="reference external" href="http://quicklisp.org/">Quicklisp</a>. Once Antik is loaded, it is advisable to set the default package to <code class="docutils literal"><span class="pre">ANTIK-USER</span></code> which is provided to make using Antik easier; see <a class="reference internal" href="packages.html#systems-packages"><span>Systems and Packages</span></a> for more details. Reader macros are defined by Antik for convenience in specifying physical dimension quantities, dates and times, and grids. These can be enabled with <code class="docutils literal"><span class="pre">set-reader</span></code>. This also sets the default floating point read type to <code class="docutils literal"><span class="pre">double-float</span></code>:</p>
<div class="highlight-lisp"><div class="highlight"><pre><span class="p">(</span><span class="nv">ql:quickload</span> <span class="ss">:antik</span><span class="p">)</span>
<span class="p">(</span><span class="nb">in-package</span> <span class="ss">:antik-user</span><span class="p">)</span>
<span class="p">(</span><span class="nv">set-reader</span><span class="p">)</span>
</pre></div>
</div>
<p>As a reassurance that the system is installed and working correctly, run the defined regression tests:</p>
<div class="highlight-lisp"><div class="highlight"><pre><span class="nb">&gt;</span> <span class="p">(</span><span class="nv">asdf:test-system</span> <span class="ss">:antik</span><span class="p">)</span>
<span class="nv">Unit</span> <span class="nv">Test</span> <span class="nv">Summary</span>
<span class="nv">| 93 assertions total</span>
<span class="nv"> |</span> <span class="mi">93</span> <span class="nv">passed</span>
<span class="nv">| 0 failed</span>
<span class="nv"> |</span> <span class="mi">0</span> <span class="nv">execution</span> <span class="nv">errors</span>
<span class="nv">| 0 missing tests</span>
<span class="nv"> Unit Test Summary</span>
<span class="nv"> |</span> <span class="mi">88</span> <span class="nv">assertions</span> <span class="nv">total</span>
<span class="nv">| 88 passed</span>
<span class="nv"> |</span> <span class="mi">0</span> <span class="nv">failed</span>
<span class="nv">| 0 execution errors</span>
<span class="nv"> |</span> <span class="mi">0</span> <span class="nv">missing</span> <span class="nv">tests</span>
<span class="no">T</span>
</pre></div>
</div>
<p>The first tests definitions in the <code class="docutils literal"><span class="pre">ANTIK</span></code> package and the second in the <code class="docutils literal"><span class="pre">GRID</span></code> package. In examples given in this manual, the <code class="docutils literal"><span class="pre">&gt;</span></code> at the begining of the line is the Lisp <a class="reference external" href="https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop">REPL</a> prompt, indicated the user-typed input follows. Your prompt may differ; for example, it could be the name of the current package, e.g. <code class="docutils literal"><span class="pre">ANTIK-USER&gt;</span></code>.</p>
<dl class="function">
<dt id="function:antik:set-reader">
<em class="property">function </em> (<code class="descname">set-reader</code> <em class="lambda_keyword text-muted">&amp;optional</em> (<em>readtable</em> <em>t</em>) (<em>default-float</em> (<em>quote</em> <em>double-float</em>)))<a class="headerlink" href="#function:antik:set-reader" title="Permalink to this definition"></a></dt>
<dd><p>If readtable is true, set the reader to enable the three Antik reader macros <code class="docutils literal"><span class="pre">#_</span></code> (physical dimension quantity), <code class="docutils literal"><span class="pre">#d</span></code> (date/time), <code class="docutils literal"><span class="pre">#m</span></code> (grid). Set the reader to interpret float literals without an exponent marker to be the type specified. If <code class="docutils literal"><span class="pre">NIL</span></code>, leave as-is.</p>
</dd></dl>
<dl class="macro">
<dt id="macro:antik:set-reader-in-file">
<em class="property">macro </em> (<code class="descname">set-reader-in-file</code> <em class="lambda_keyword text-muted">&amp;optional</em> (<em>readtable</em> <em>t</em>) (<em>default-float</em> (<em>quote</em> <em>double-float</em>)))<a class="headerlink" href="#macro:antik:set-reader-in-file" title="Permalink to this definition"></a></dt>
<dd><p>If readtable is true, set the reader to enable the three Antik reader macros <code class="docutils literal"><span class="pre">#_</span></code> (physical dimension quantity), <code class="docutils literal"><span class="pre">#d</span></code> (date/time), <code class="docutils literal"><span class="pre">#m</span></code> (grid). Set the reader to interpret float literals without an exponent marker to be the type specified. If <code class="docutils literal"><span class="pre">NIL</span></code>, leave as-is. Use this form in Lisp source files.</p>
</dd></dl>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
<div class="sphinxsidebarwrapper">
<h4>Previous topic</h4>
<p class="topless"><a href="intro.html"
title="previous chapter">Introduction to Antik</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="packages.html"
title="next chapter">Systems and Packages</a></p>
<div role="note" aria-label="source link">
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="_sources/starting.txt"
rel="nofollow">Show Source</a></li>
</ul>
</div>
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<form class="search" action="search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="packages.html" title="Systems and Packages"
>next</a> |</li>
<li class="right" >
<a href="intro.html" title="Introduction to Antik"
>previous</a> |</li>
<li class="nav-item nav-item-0"><a href="root.html">Antik 0 documentation</a> &raquo;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
&copy; Copyright 2015, Liam M. Healy.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.3.1.
</div>
</body>
</html>
\ No newline at end of file
\begin{theindex}
\def\bigletter#1{{\Large\sffamily#1}\nopagebreak\vspace{1mm}}
\bigletter {Symbols}
\item * (Lisp function), \hyperpage{10}
\item + (Lisp function), \hyperpage{9}
\item - (Lisp function), \hyperpage{10}
\item / (Lisp function), \hyperpage{10}
\item = (Lisp function), \hyperpage{9}
\item \textgreater{} (Lisp function), \hyperpage{9}
\item \textgreater{}= (Lisp function), \hyperpage{9}
\item \textless{} (Lisp function), \hyperpage{9}
\item \textless{}= (Lisp function), \hyperpage{9}
\indexspace
\bigletter A
\item abs (Lisp function), \hyperpage{9}
\item acos (Lisp function), \hyperpage{9}
\item all-same (Lisp function), \hyperpage{11}
\item asin (Lisp function), \hyperpage{9}
\item atan (Lisp function), \hyperpage{9}
\indexspace
\bigletter C
\item cos (Lisp function), \hyperpage{9}
\item cosh (Lisp function), \hyperpage{9}
\indexspace
\bigletter E
\item exp (Lisp function), \hyperpage{9}
\item expt (Lisp function), \hyperpage{9}
\indexspace
\bigletter F
\item floor (Lisp function), \hyperpage{9}
\indexspace
\bigletter M
\item make-user-package (Lisp function), \hyperpage{7}
\item minusp (Lisp function), \hyperpage{9}
\indexspace
\bigletter P
\item plusp (Lisp function), \hyperpage{9}
\indexspace
\bigletter R
\item round (Lisp function), \hyperpage{9}
\indexspace
\bigletter S
\item set-reader (Lisp function), \hyperpage{5}
\item set-reader-in-file (Lisp macro), \hyperpage{5}
\item signum (Lisp function), \hyperpage{9}
\item sin (Lisp function), \hyperpage{9}
\item sinh (Lisp function), \hyperpage{9}
\item sqrt (Lisp function), \hyperpage{9}
\item stream-to-string (Lisp function), \hyperpage{11}
\indexspace
\bigletter T
\item tan (Lisp function), \hyperpage{9}
\item tanh (Lisp function), \hyperpage{9}
\indexspace
\bigletter Z
\item zerop (Lisp function), \hyperpage{9}
\end{theindex}
This diff is collapsed.
# Makefile for Sphinx LaTeX output
ALLDOCS = $(basename $(wildcard *.tex))
ALLPDF = $(addsuffix .pdf,$(ALLDOCS))
ALLDVI = $(addsuffix .dvi,$(ALLDOCS))
# Prefix for archive names
ARCHIVEPRREFIX =
# Additional LaTeX options
LATEXOPTS =
LATEX = latex
PDFLATEX = pdflatex
MAKEINDEX = makeindex
all: $(ALLPDF)
all-pdf: $(ALLPDF)
all-dvi: $(ALLDVI)
all-ps: all-dvi
for f in *.dvi; do dvips $$f; done
all-pdf-ja:
for f in *.pdf *.png *.gif *.jpg *.jpeg; do extractbb $$f; done
for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
-for f in *.idx; do mendex -U -f -d "`basename $$f .idx`.dic" -s python.ist $$f; done
for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
for f in *.tex; do platex -kanji=utf8 $(LATEXOPTS) $$f; done
for f in *.dvi; do dvipdfmx $$f; done
zip: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
zip -q -r -9 $(ARCHIVEPREFIX)docs-$(FMT).zip $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
tar: all-$(FMT)
mkdir $(ARCHIVEPREFIX)docs-$(FMT)
cp $(ALLPDF) $(ARCHIVEPREFIX)docs-$(FMT)
tar cf $(ARCHIVEPREFIX)docs-$(FMT).tar $(ARCHIVEPREFIX)docs-$(FMT)
rm -r $(ARCHIVEPREFIX)docs-$(FMT)
bz2: tar
bzip2 -9 -k $(ARCHIVEPREFIX)docs-$(FMT).tar
# The number of LaTeX runs is quite conservative, but I don't expect it
# to get run often, so the little extra time won't hurt.
%.dvi: %.tex
$(LATEX) $(LATEXOPTS) '$<'
$(LATEX) $(LATEXOPTS) '$<'
$(LATEX) $(LATEXOPTS) '$<'
-$(MAKEINDEX) -s python.ist '$(basename $<).idx'
$(LATEX) $(LATEXOPTS) '$<'
$(LATEX) $(LATEXOPTS) '$<'
%.pdf: %.tex
$(PDFLATEX) $(LATEXOPTS) '$<'
$(PDFLATEX) $(LATEXOPTS) '$<'
$(PDFLATEX) $(LATEXOPTS) '$<'
-$(MAKEINDEX) -s python.ist '$(basename $<).idx'
$(PDFLATEX) $(LATEXOPTS) '$<'
$(PDFLATEX) $(LATEXOPTS) '$<'
clean:
rm -f *.dvi *.log *.ind *.aux *.toc *.syn *.idx *.out *.ilg *.pla
.PHONY: all all-pdf all-dvi all-ps clean
.PHONY: all-pdf-ja
%%% Copyright Ulf A. Lindgren
%%%
%%% Note Premission is granted to modify this file under
%%% the condition that it is saved using another
%%% file and package name.
%%%
%%% Revision 1.1 (1997)
%%%
%%% Jan. 8th Modified package name base date option
%%% Jan. 22th Modified FmN and FmTi for error in book.cls
%%% \MakeUppercase{#}->{\MakeUppercase#}
%%% Apr. 6th Modified Lenny option to prevent undesired
%%% skip of line.
%%% Nov. 8th Fixed \@chapapp for AMS
%%%
%%% Revision 1.2 (1998)
%%%
%%% Feb. 11th Fixed appendix problem related to Bjarne
%%% Aug. 11th Fixed problem related to 11pt and 12pt
%%% suggested by Tomas Lundberg. THANKS!
%%%
%%% Revision 1.3 (2004)
%%% Sep. 20th problem with frontmatter, mainmatter and
%%% backmatter, pointed out by Lapo Mori
%%%
%%% Revision 1.31 (2004)
%%% Sep. 21th problem with the Rejne definition streched text
%%% caused ugly gaps in the vrule aligned with the title
%%% text. Kindly pointed out to me by Hendri Adriaens
%%%
%%% Revision 1.32 (2005)
%%% Jun. 23th compatibility problem with the KOMA class 'scrbook.cls'
%%% a remedy is a redefinition of '\@schapter' in
%%% line with that used in KOMA. The problem was pointed
%%% out to me by Mikkel Holm Olsen
%%%
%%% Revision 1.33 (2005)
%%% Aug. 9th misspelled ``TWELV'' corrected, the error was pointed
%%% out to me by George Pearson
%%%
%%% Revision 1.34 (2007)
%%% Added an alternative to Lenny provided by Peter
%%% Osborne (2005-11-28)
%%% Corrected front, main and back matter, based on input
%%% from Bas van Gils (2006-04-24)
%%% Jul. 30th Added Bjornstrup option provided by Jean-Marc
%%% Francois (2007-01-05).
%%% Reverted to \MakeUppercase{#} see rev 1.1, solved
%%% problem with MakeUppercase and MakeLowercase pointed
%%% out by Marco Feuerstein (2007-06-06)
%%% Last modified Jul. 2007
\NeedsTeXFormat{LaTeX2e}[1995/12/01]
\ProvidesPackage{fncychap}
[2007/07/30 v1.34
LaTeX package (Revised chapters)]
%%%% For conditional inclusion of color
\newif\ifusecolor
\usecolorfalse
%%%% DEFINITION OF Chapapp variables
\newcommand{\CNV}{\huge\bfseries}
\newcommand{\ChNameVar}[1]{\renewcommand{\CNV}{#1}}
%%%% DEFINITION OF TheChapter variables
\newcommand{\CNoV}{\huge\bfseries}
\newcommand{\ChNumVar}[1]{\renewcommand{\CNoV}{#1}}
\newif\ifUCN
\UCNfalse
\newif\ifLCN
\LCNfalse
\def\ChNameLowerCase{\LCNtrue\UCNfalse}
\def\ChNameUpperCase{\UCNtrue\LCNfalse}
\def\ChNameAsIs{\UCNfalse\LCNfalse}
%%%%% Fix for AMSBook 971008
\@ifundefined{@chapapp}{\let\@chapapp\chaptername}{}
%%%%% Fix for Bjarne and appendix 980211
\newif\ifinapp
\inappfalse
\renewcommand\appendix{\par
\setcounter{chapter}{0}%
\setcounter{section}{0}%
\inapptrue%
\renewcommand\@chapapp{\appendixname}%
\renewcommand\thechapter{\@Alph\c@chapter}}
%%%%% Fix for frontmatter, mainmatter, and backmatter 040920
\@ifundefined{@mainmatter}{\newif\if@mainmatter \@mainmattertrue}{}
%%%%%
\newcommand{\FmN}[1]{%
\ifUCN
{\MakeUppercase{#1}}\LCNfalse
\else
\ifLCN
{\MakeLowercase{#1}}\UCNfalse
\else #1
\fi
\fi}
%%%% DEFINITION OF Title variables
\newcommand{\CTV}{\Huge\bfseries}
\newcommand{\ChTitleVar}[1]{\renewcommand{\CTV}{#1}}
%%%% DEFINITION OF the basic rule width
\newlength{\RW}
\setlength{\RW}{1pt}
\newcommand{\ChRuleWidth}[1]{\setlength{\RW}{#1}}
\newif\ifUCT
\UCTfalse
\newif\ifLCT
\LCTfalse
\def\ChTitleLowerCase{\LCTtrue\UCTfalse}
\def\ChTitleUpperCase{\UCTtrue\LCTfalse}
\def\ChTitleAsIs{\UCTfalse\LCTfalse}
\newcommand{\FmTi}[1]{%
\ifUCT
{\MakeUppercase{#1}}\LCTfalse
\else
\ifLCT
{\MakeLowercase{#1}}\UCTfalse
\else {#1}
\fi
\fi}
\newlength{\mylen}
\newlength{\myhi}
\newlength{\px}
\newlength{\py}
\newlength{\pyy}
\newlength{\pxx}
\def\mghrulefill#1{\leavevmode\leaders\hrule\@height #1\hfill\kern\z@}
\newcommand{\DOCH}{%
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip 20\p@
}
\newcommand{\DOTI}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
\newcommand{\DOTIS}[1]{%
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@
}
%%%%%% SONNY DEF
\DeclareOption{Sonny}{%
\ChNameVar{\Large\sf}
\ChNumVar{\Huge}
\ChTitleVar{\Large\sf}
\ChRuleWidth{0.5pt}
\ChNameUpperCase
\renewcommand{\DOCH}{%
\raggedleft
\CNV\FmN{\@chapapp}\space \CNoV\thechapter
\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTI}[1]{%
\CTV\raggedleft\mghrulefill{\RW}\par\nobreak
\vskip 5\p@
\CTV\FmTi{#1}\par\nobreak
\mghrulefill{\RW}\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTIS}[1]{%
\CTV\raggedleft\mghrulefill{\RW}\par\nobreak
\vskip 5\p@
\CTV\FmTi{#1}\par\nobreak
\mghrulefill{\RW}\par\nobreak
\vskip 40\p@}
}
%%%%%% LENNY DEF
\DeclareOption{Lenny}{%
\ChNameVar{\fontsize{14}{16}\usefont{OT1}{phv}{m}{n}\selectfont}
\ChNumVar{\fontsize{60}{62}\usefont{OT1}{ptm}{m}{n}\selectfont}
\ChTitleVar{\Huge\bfseries\rm}
\ChRuleWidth{1pt}
\renewcommand{\DOCH}{%
\settowidth{\px}{\CNV\FmN{\@chapapp}}
\addtolength{\px}{2pt}
\settoheight{\py}{\CNV\FmN{\@chapapp}}
\addtolength{\py}{1pt}
\settowidth{\mylen}{\CNV\FmN{\@chapapp}\space\CNoV\thechapter}
\addtolength{\mylen}{1pt}
\settowidth{\pxx}{\CNoV\thechapter}
\addtolength{\pxx}{-1pt}
\settoheight{\pyy}{\CNoV\thechapter}
\addtolength{\pyy}{-2pt}
\setlength{\myhi}{\pyy}
\addtolength{\myhi}{-1\py}
\par
\parbox[b]{\textwidth}{%
\rule[\py]{\RW}{\myhi}%
\hskip -\RW%
\rule[\pyy]{\px}{\RW}%
\hskip -\px%
\raggedright%
\CNV\FmN{\@chapapp}\space\CNoV\thechapter%
\hskip1pt%
\mghrulefill{\RW}%
\rule{\RW}{\pyy}\par\nobreak%
\vskip -\baselineskip%
\vskip -\pyy%
\hskip \mylen%
\mghrulefill{\RW}\par\nobreak%
\vskip \pyy}%
\vskip 20\p@}
\renewcommand{\DOTI}[1]{%
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
\renewcommand{\DOTIS}[1]{%
\raggedright
\CTV\FmTi{#1}\par\nobreak
\vskip 40\p@}
}
%%%%%% Peter Osbornes' version of LENNY DEF
\DeclareOption{PetersLenny}{%
% five new lengths
\newlength{\bl} % bottom left : orig \space
\setlength{\bl}{6pt}
\newcommand{\BL}[1]{\setlength{\bl}{#1}}
\newlength{\br} % bottom right : orig 1pt
\setlength{\br}{1pt}
\newcommand{\BR}[1]{\setlength{\br}{#1}}
\newlength{\tl} % top left : orig 2pt
\setlength{\tl}{2pt}
\newcommand{\TL}[1]{\setlength{\tl}{#1}}
\newlength{\trr} % top right :orig 1pt
\setlength{\trr}{1pt}
\newcommand{\TR}[1]{\setlength{\trr}{#1}}
\newlength{\blrule} % top right :orig 1pt
\setlength{\trr}{0pt}
\newcommand{\BLrule}[1]{\setlength{\blrule}{#1}}