diff --git a/books/bookvol5.pamphlet b/books/bookvol5.pamphlet
index 879cb40..57b68fa 100644
--- a/books/bookvol5.pamphlet
+++ b/books/bookvol5.pamphlet
@@ -49939,6 +49939,153 @@ This needs to work off the internal exposure list, not the file.
\end{chunk}
\chapter{HyperDoc Basic Command support}
+
+\section{Hyperdoc macro handling and util.ht}
+
+All of the macros used in hyperdoc are in this hash table.
+User-defined macros are read from the file {\bf doc/util.ht}
+
+\defdollar{htMacroTable}
+\begin{chunk}{initvars}
+(defvar |$htMacroTable| (make-hash-table :test #'equal))
+
+\end{chunk}
+
+These are the primitive hyperdoc commands. They are directly
+implemented. The {\bf buildHtMacroTable} function adds these
+to the \verb|$htMacroTable| at startup.
+
+\defdollar{primitiveHtCommands}
+\begin{chunk}{initvars}
+(defvar |$primitiveHtCommands|
+ '(("\\ContinueButton" . 1)
+ ("\\andexample" . 1)
+ ("\\autobutt" . 0)
+ ("\\autobuttons" . 0)
+ ("\\begin" . 1)
+ ("\\beginscroll" . 0)
+ ("\\bound" . 1)
+ ("\\fbox" . 1)
+ ("\\centerline" . 1)
+ ("\\downlink" . 2)
+ ("\\em" . 0)
+ ("\\end" . 1)
+ ("\\endscroll" . 0)
+ ("\\example" . 1)
+ ("\\free" . 1)
+ ("\\graphpaste" . 1)
+ ("\\helppage" . 1)
+ ("\\htbmdir" . 0)
+ ("\\htbmfile" . 1)
+ ("\\indent" . 1)
+ ("\\inputbitmap" . 1)
+ ("\\inputstring" . 3)
+ ("\\item" . 0)
+ ("\\keyword" . 1)
+ ("\\link" . 2)
+ ("\\lispdownlink" . 2)
+ ("\\lispmemolink" . 2)
+ ("\\lispwindowlink" . 2)
+ ("\\menudownlink" . 2)
+ ("\\menuitemstyle" . 1)
+ ("\\menulink" . 2)
+ ("\\menulispdownlink" . 2)
+ ("\\menulispmemolink" . 2)
+ ("\\menulispwindowlink" . 2)
+ ("\\menumemolink" . 2)
+ ("\\menuwindowlink" . 2)
+ ("\\newline" . 0)
+ ("\\radioboxes" . 3)
+ ("\\space" . 1)
+ ("\\spadcommand" . 1)
+ ("\\stringvalue" . 1)
+ ("\\tab" . 1)
+ ("\\table" . 1)
+ ("\\vspace" . 1)
+ ("\\windowlink" . 2)))
+
+\end{chunk}
+
+\defun{buildHtMacroTable}{Build the table of hyperdoc macros}
+Hash user-defined macros from {\bf doc/util.ht} into {\bf htMacroTable}.
+Hash primitive hyperdoc macros into {\bf htMacroTable}.
+\seebook{buildHtMacroTable}{util.ht}{7.1}
+\calls{buildHtMacroTable}{getHtMacroItem}
+\calls{buildHtMacroTable}{sayBrightly}
+\calls{buildHtMacroTable}{concat}
+\calls{buildHtMacroTable}{getEnv}
+\calls{buildHtMacroTable}{hput}
+\usesdollar{buildHtMacroTable}{htMacroTable}
+\usesdollar{buildHtMacroTable}{primitiveHtCommands}
+\begin{chunk}{defun buildHtMacroTable}
+(defun |buildHtMacroTable| ()
+ (let (fn instream)
+ (declare (special |$htMacroTable| |$primitiveHtCommands|))
+ (setq fn (concat (|getEnv| "AXIOM") "/doc/util.ht"))
+ (cond
+ ((probe-file fn)
+ (with-open-file (instream fn)
+ (loop
+ for line = (read-line instream nil :eof)
+ until (eq line :eof)
+ do
+ (when
+ (mulitple-value-bind (command numOfArgs) (|getHtMacroItem| line)
+ (hput |$htMacroTable| command numOfArgs))))
+ (dolist (pair |$primitiveHtCommands|)
+ (hput |$htMacroTable| (car pair) (cdr pair)))))
+ (t (|sayBrightly| "Warning: macro table not found")))
+ |$htMacroTable|))
+
+\end{chunk}
+
+\defun{getHtMacroItem}{Get new command name and number of args}
+This processes {\bf newcommand} lines read from {\bf doc/util.ht}
+An example newcommand looks like
+\begin{verbatim}
+ \newcommand{\menulink}[2] {\menudownlink{#1}{#2}}
+\end{verbatim}
+This function returns a pair whose CAR is the new command name
+and whose CDR is the number of arguments. If there are zero arguments
+the brackets and number will not appear.
+
+However brackets can appear in the new command so we need to fix
+the original code to handle this new case. We set up a wall
+starting after the first closing brace.
+\begin{verbatim}
+ \newcommand{\beginmenu} {\beginitems[\MenuDotBitmap]}
+\end{verbatim}
+
+\seebook{getHtMacroItem}{util.ht}{7.1}
+
+\sig{getHtMacroItem}{String}{Values (String NonNegativeInteger)}
+\begin{chunk}{defun getHtMacroItem}
+(defun |getHtMacroItem| (line)
+ (let (k command m i j wall digitString)
+ (when (|stringPrefix?| "\\newcommand{" line)
+ (setq k (position #\} line :start 11))
+ (setq wall (position #\{ line :start k)) ; wall off the body of command
+ (setq command (substring line 12 (- k 12)))
+ (setq m (length line))
+ (setq i (position #\[ line :start k))
+ (if (and i (< i m) (< i wall))
+ (progn ; brackets. parse number of args
+ (setq j (position #\] line :start (+ i 1)))
+ (setq digitString (substring line (+ i 1) (- (- j i) 1)))
+ (when (every #'digitp digitString)
+ (values command (parse-integer digitString))))
+ (values command 0))))) ; no brackets
+
+\end{chunk}
+
+We populate the htMacroTable at load time.
+\begin{chunk}{postvars}
+(eval-when (eval load)
+ (|buildHtMacroTable|))
+
+\end{chunk}
+
+\section{Functions creating pages}
Most of the functions create a new page with a call to the function
{\tt htMakePage}. This function takes an association list which has
several possible keys.
diff --git a/books/bookvol9.pamphlet b/books/bookvol9.pamphlet
index 03da229..f4a7555 100644
--- a/books/bookvol9.pamphlet
+++ b/books/bookvol9.pamphlet
@@ -20925,6 +20925,44 @@ Note that {\tt u} should start with an open brace.
\end{chunk}
+\defun{spadSysChoose}{spadSysChoose}
+\calls{spadSysChoose}{lassoc}
+\calls{spadSysChoose}{spadSysBranch}
+\begin{chunk}{defun spadSysChoose}
+(defun |spadSysChoose| (tree form) ; tree is ((word . tree) ..)
+ (let (lookupOn newTree)
+ (cond
+ ((null form) t)
+ ((null tree) nil)
+ (t
+ (if (and (consp form) (consp (qcdr form)) (eq (qcddr form) nil))
+ (setq lookupOn (qcar form))
+ (setq lookupOn form))
+ (when (setq newTree (lassoc lookupOn tree))
+ (|spadSysBranch| newTree (cadr form)))))))
+
+\end{chunk}
+
+\defun{spadSysBranch}{spadSysBranch}
+\calls{spadSysBranch}{spadSysChoose}
+\calls{spadSysBranch}{member}
+\calls{spadSysBranch}{systemError}
+\begin{chunk}{defun spadSysBranch}
+(defun |spadSysBranch| (tree arg) ; tree is (msg kind TREEorSomethingElse ...)
+ (let (kind)
+ (cond
+ ((null arg) t)
+ (t
+ (setq kind (elt tree 2))
+ (cond
+ ((eq kind 'tree) (|spadSysChoose| (elt tree 4) arg))
+ ((eq kind 'literals) (|member| arg (ELT tree 4)))
+ ((eq kind 'integer) (integerp arg))
+ ((eq kind 'function) (atom arg))
+ (t (|systemError| "unknown tree branch")))))))
+
+\end{chunk}
+
\defun{checkTexht}{checkTexht}
\calls{checkTexht}{ifcdr}
\calls{checkTexht}{ifcar}
@@ -26775,6 +26813,7 @@ The current input line.
\getchunk{defun spad}
\getchunk{defun spadCompileOrSetq}
\getchunk{defun spad-fixed-arg}
+\getchunk{defun spadSysBranch}
\getchunk{defun splitEncodedFunctionName}
\getchunk{defun stack-clear}
\getchunk{defun stack-load}
diff --git a/books/bookvolbib.pamphlet b/books/bookvolbib.pamphlet
index 803dabc..2e50797 100644
--- a/books/bookvolbib.pamphlet
+++ b/books/bookvolbib.pamphlet
@@ -15789,6 +15789,70 @@ Math. Tables Aids Comput. 10 91--96. (1956)
\end{chunk}
+\index{Fateman, Richard J.}
+\index{Martin, W.A.}
+\begin{chunk}{axiom.bib}
+@misc{Martxx,
+ author = "Martin, W.A. and Fateman, R.J.",
+ title = "The Macsyma System",
+ url = "http://groups.csail.mit.edu/mac/classes/symbolic/spring13/readings/simplification/martin-fateman-macsyma.pdf",
+ paper = "Martxx.pdf",
+ abstract = "
+ MACSYMA is a system for symbolic manipulation of algebraic expressions
+ which is being developed at Project MAC, M.I.T. This paper discusses
+ its philosophy, goals, and current achievements.
+
+ Drawing on the past work of Maring, Moses, and Engelman, it extends
+ the capabilities of automated algebraic manipulation systems in
+ several areas, including
+
+ a) limit calculations
+ b) symbolic integration
+ c) solution of equations
+ d) canonical simplification
+ e) user-level pattern matching
+ f) user-specified expression manipulation
+ g) programming and bookkeeping assistance
+
+ MACSYMA makes extensive use of the power of its rational function
+ subsystem. The facilities derived from this are discussed in
+ considerable detail.
+
+ An appendix briefly notes some highlights of the overall system."
+
+}
+
+\end{chunk}
+
+\index{Andrews, George E.}
+\index{Knopfmacher, Arnold}
+\index{Paule, Peter}
+\index{Zimmermann, Burkhard}
+\begin{chunk}{axiom.bib}
+@misc{Andr00,
+ author = "Andrews, George E. and Knopfmacher, Arnold and Paule, Peter
+ and Zimmermann, Burkhard",
+ title = "Engel Expansions of q-Series by Computer Algebra",
+ year = "2000",
+ url = "http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.32.207",
+ paper = "Andr00.pdf",
+ abstract = "
+ The $q$-Engle Expansion is an algorithm that leads to unique series
+ expansions of $q$-series. Various examples related to classical
+ partition theorems, including the Rogers-Ramanujan identities together
+ with the elegant generalization found by Garrett, Ismail and Stanton,
+ have been described recently. The object of this paper is to present
+ the computer algebra package Engel, written in Mathematics, that has
+ already played a signiicant role in this work. The package now is made
+ freely available via the web and should help to intensify research in
+ this new branch of $q$-series theory. Among various illustrative
+ examples we present a new infinite Rogers-Ramanujan type family that
+ has been discovered by using the package."
+
+}
+
+\end{chunk}
+
\eject
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\chapter{Bibliography}
diff --git a/changelog b/changelog
index 53e37d8..26940f0 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,11 @@
+20141226 tpd src/axiom-website/patches.html 20141226.02.tpd.patch
+20141226 tpd books/bookvolbib add Martxx and Andr00
+20141226 tpd src/axiom-website/patches.html 20141226.01.tpd.patch
+20141226 tpd books/bookvol5 absorb buildHtMacroTable and getHtMacroItem
+20141226 tpd books/bookvol9 absorb spadSysChoose, spadSysBranch
+20141226 tpd src/interp/Makefile remove htcheck.lisp
+20141226 tpd src/interp/br-con.lisp rewrite READLINE calls from htcheck
+20141226 tpd src/interp/htcheck.lisp absorbed and removed
20141225 tpd src/axiom-website/patches.html 20141225.05.tpd.patch
20141225 tpd books/bookvol5 remove unused functions
20141225 tpd src/axiom-website/patches.html 20141225.04.tpd.patch
diff --git a/patch b/patch
index 563ef84..583604a 100644
--- a/patch
+++ b/patch
@@ -1,3 +1,14 @@
-books/bookvol5 remove unused functions
+books/bookvolbib add Martxx and Andr00
+
+ author = "Martin, W.A. and Fateman, R.J.",
+ title = "The Macsyma System",
+
+ author = "Andrews, George E. and Knopfmacher, Arnold and Paule, Peter
+ and Zimmermann, Burkhard",
++ title = "Engel Expansions of q-Series by Computer Algebra",
+
+
+
+
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index 7dfe3e5..d2bf172 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -4846,6 +4846,10 @@ books/bookvol9 simplify logic in compDefineCapsuleFunction
src/interp/br-con.lisp remove unused function
20141225.05.tpd.patch
books/bookvol5 remove unused functions
+20141226.01.tpd.patch
+src/interp/htcheck.lisp absorbed and removed
+20141226.02.tpd.patch
+books/bookvolbib add Martxx and Andr00