--- a/doc/html/pyke_syntax/krb_syntax/compound_premise.html
+++ b/doc/html/pyke_syntax/krb_syntax/compound_premise.html
@@ -81,18 +81,18 @@
                 <div class="document" id="compound-premise-syntax">
 <h1 class="title">Compound Premise Syntax</h1>
 <p>There are three kinds of compound premises.  These can be used in both
-<a class="reference" href="fc_rule.html">forward-chaining rules</a> and <a class="reference" href="bc_rule.html">backward-chaining rules</a>, but the nested
+<a class="reference external" href="fc_rule.html">forward-chaining rules</a> and <a class="reference external" href="bc_rule.html">backward-chaining rules</a>, but the nested
 premises within each of these are restricted to the kind of premises legal
-for that kind of rule: <a class="reference" href="fc_rule.html#foreach-clause">fc_premise</a> for forward-chaining rules, and
-<a class="reference" href="bc_rule.html#when-clause">bc_premise</a> for backward-chaining rules.</p>
+for that kind of rule: <a class="reference external" href="fc_rule.html#foreach-clause">fc_premise</a> for forward-chaining rules, and
+<a class="reference external" href="bc_rule.html#when-clause">bc_premise</a> for backward-chaining rules.</p>
 <pre class="literal-block">
 compound_premise ::= first_premise
                    | forall_premise
                    | notany_premise
 </pre>
-<div class="section">
-<h2><a id="first-premise" name="first-premise">First Premise</a></h2>
-<p>The <tt class="docutils literal"><span class="pre">first</span></tt> premise is used to prevent <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a> from finding subsequent
+<div class="section" id="first-premise">
+<h2>First Premise</h2>
+<p>The <tt class="docutils literal"><span class="pre">first</span></tt> premise is used to prevent <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a> from finding subsequent
 solutions to a set of premises.  The <tt class="docutils literal"><span class="pre">first</span></tt> premise always fails on
 backtracking (but does do backtracking <em>within</em> the nested premises).</p>
 <pre class="literal-block">
@@ -104,11 +104,11 @@
 </pre>
 <p>The <tt class="docutils literal"><span class="pre">!</span></tt> option can only be used in backward-chaining rules.</p>
 <p>When used within backward-chaining rules, the nested premises may include any
-type of <a class="reference" href="bc_rule.html#plan-spec">plan_spec</a>.</p>
-</div>
-<div class="section">
-<h2><a id="forall-premise" name="forall-premise">Forall Premise</a></h2>
-<p>The <tt class="docutils literal"><span class="pre">forall</span></tt> premise forces <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a> within the nested premises to
+type of <a class="reference external" href="bc_rule.html#plan-spec">plan_spec</a>.</p>
+</div>
+<div class="section" id="forall-premise">
+<h2>Forall Premise</h2>
+<p>The <tt class="docutils literal"><span class="pre">forall</span></tt> premise forces <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a> within the nested premises to
 process all of the possible solutions found before the <tt class="docutils literal"><span class="pre">forall</span></tt> succeeds.
 After the first success, the <tt class="docutils literal"><span class="pre">forall</span></tt> fails on backtracking.</p>
 <pre class="literal-block">
@@ -129,44 +129,44 @@
 require Y&quot;.</p>
 <p>The <tt class="docutils literal"><span class="pre">forall</span></tt> always succeeds if the <tt class="docutils literal"><span class="pre">require</span></tt> clause is omitted (even if
 no solutions are found to the nested premises).  This can be used in
-conjunction with <a class="reference" href="python_premise.html#python-statements">python_statements</a> to gather a list of results.</p>
-<p>See <a class="reference" href="#notes-on-forall-and-notany-premises">Notes on Forall and Notany Premises</a> and <a class="reference" href="../../examples.html">Examples</a>, below.</p>
-</div>
-<div class="section">
-<h2><a id="notany-premise" name="notany-premise">Notany Premise</a></h2>
+conjunction with <a class="reference external" href="python_premise.html#python-statements">python_statements</a> to gather a list of results.</p>
+<p>See <a class="reference internal" href="#notes-on-forall-and-notany-premises">Notes on Forall and Notany Premises</a> and <a class="reference external" href="../../examples.html">Examples</a>, below.</p>
+</div>
+<div class="section" id="notany-premise">
+<h2>Notany Premise</h2>
 <p>The <tt class="docutils literal"><span class="pre">notany</span></tt> premise only succeeds if no solution can be found to the nested
-premises.  <tt class="docutils literal"><span class="pre">Notany</span></tt> always fails on <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>.</p>
+premises.  <tt class="docutils literal"><span class="pre">Notany</span></tt> always fails on <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>.</p>
 <pre class="literal-block">
 notany_premise ::= 'notany' NL
                      INDENT
                         {premise NL}
                      DEINDENT
 </pre>
-<p>See <a class="reference" href="#notes-on-forall-and-notany-premises">Notes on Forall and Notany Premises</a> and <a class="reference" href="../../examples.html">Examples</a>, below.</p>
-</div>
-<div class="section">
-<h2><a id="notes-on-forall-and-notany-premises" name="notes-on-forall-and-notany-premises">Notes on Forall and Notany Premises</a></h2>
+<p>See <a class="reference internal" href="#notes-on-forall-and-notany-premises">Notes on Forall and Notany Premises</a> and <a class="reference external" href="../../examples.html">Examples</a>, below.</p>
+</div>
+<div class="section" id="notes-on-forall-and-notany-premises">
+<h2>Notes on Forall and Notany Premises</h2>
 <ol class="arabic simple">
-<li>All <a class="reference" href="pattern.html#pattern-variable">pattern variable</a> bindings made during the execution of a <tt class="docutils literal"><span class="pre">forall</span></tt>
+<li>All <a class="reference external" href="pattern.html#pattern-variable">pattern variable</a> bindings made during the execution of a <tt class="docutils literal"><span class="pre">forall</span></tt>
 or <tt class="docutils literal"><span class="pre">notany</span></tt> premise are undone before the premises following the
 <tt class="docutils literal"><span class="pre">forall</span></tt> or <tt class="docutils literal"><span class="pre">notany</span></tt> are run.
 Thus, <tt class="docutils literal"><span class="pre">forall</span></tt> and <tt class="docutils literal"><span class="pre">notany</span></tt> can be used to test
 values produced by prior premises; but to generate values for subsequent
 premises the values must be captured in Python variables within the
 <tt class="docutils literal"><span class="pre">forall</span></tt> or <tt class="docutils literal"><span class="pre">notany</span></tt> clause before the <cite>pattern variables</cite> are unbound
-(see <a class="reference" href="#computing-a-value-for-each-generated-value">Computing a Value for Each Generated Value</a>, below).</li>
-<li>When used within <a class="reference" href="bc_rule.html">backward-chaining rules</a>, the only <a class="reference" href="bc_rule.html#plan-spec">plan_spec</a> allowed in
+(see <a class="reference internal" href="#computing-a-value-for-each-generated-value">Computing a Value for Each Generated Value</a>, below).</li>
+<li>When used within <a class="reference external" href="bc_rule.html">backward-chaining rules</a>, the only <a class="reference external" href="bc_rule.html#plan-spec">plan_spec</a> allowed in
 nested premises is the <tt class="docutils literal"><span class="pre">as</span></tt> clause.</li>
 </ol>
 </div>
-<div class="section">
-<h2><a id="examples" name="examples">Examples</a></h2>
+<div class="section" id="examples">
+<h2>Examples</h2>
 <ul class="simple">
-<li><a class="reference" href="#finding-the-first-solution-from-a-set-of-values">Finding the First Solution From a Set of Values</a></li>
-<li><a class="reference" href="#testing-every-generated-value">Testing Every Generated Value</a></li>
-<li><a class="reference" href="#computing-a-value-for-each-generated-value">Computing a Value for Each Generated Value</a></li>
-<li><a class="reference" href="#iterating-on-tuples">Iterating on Tuples</a></li>
-<li><a class="reference" href="#computing-values-for-all-generated-values-that-pass-a-test">Computing Values for All Generated Values that Pass a Test</a></li>
+<li><a class="reference internal" href="#finding-the-first-solution-from-a-set-of-values">Finding the First Solution From a Set of Values</a></li>
+<li><a class="reference internal" href="#testing-every-generated-value">Testing Every Generated Value</a></li>
+<li><a class="reference internal" href="#computing-a-value-for-each-generated-value">Computing a Value for Each Generated Value</a></li>
+<li><a class="reference internal" href="#iterating-on-tuples">Iterating on Tuples</a></li>
+<li><a class="reference internal" href="#computing-values-for-all-generated-values-that-pass-a-test">Computing Values for All Generated Values that Pass a Test</a></li>
 </ul>
 <p>These examples use the following subgoals:</p>
 <ul class="simple">
@@ -175,8 +175,8 @@
 <li><tt class="docutils literal"><span class="pre">test_x($x)</span></tt> does some test on <tt class="docutils literal"><span class="pre">$x</span></tt></li>
 <li><tt class="docutils literal"><span class="pre">compute_y($x,</span> <span class="pre">$y)</span></tt> takes <tt class="docutils literal"><span class="pre">$x</span></tt> as input and computes a <tt class="docutils literal"><span class="pre">$y</span></tt> value</li>
 </ul>
-<div class="section">
-<h3><a id="finding-the-first-solution-from-a-set-of-values" name="finding-the-first-solution-from-a-set-of-values">Finding the First Solution From a Set of Values</a></h3>
+<div class="section" id="finding-the-first-solution-from-a-set-of-values">
+<h3>Finding the First Solution From a Set of Values</h3>
 <p>If you want the first <tt class="docutils literal"><span class="pre">$x</span></tt> that passes the <tt class="docutils literal"><span class="pre">test_x($x)</span></tt> test, you have two
 options:</p>
 <pre class="literal-block">
@@ -192,11 +192,11 @@
 ...
 </pre>
 <p>The difference is that the first example will find other <tt class="docutils literal"><span class="pre">$x</span></tt> values that
-pass <tt class="docutils literal"><span class="pre">test_x($x)</span></tt> on <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>, while the second example will stop after
+pass <tt class="docutils literal"><span class="pre">test_x($x)</span></tt> on <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>, while the second example will stop after
 the first value is found and fail on backtracking.</p>
 </div>
-<div class="section">
-<h3><a id="testing-every-generated-value" name="testing-every-generated-value">Testing Every Generated Value</a></h3>
+<div class="section" id="testing-every-generated-value">
+<h3>Testing Every Generated Value</h3>
 <p>There are two general cases.  You might want to verify that <tt class="docutils literal"><span class="pre">test_x($x)</span></tt>
 <em>succeeds</em> for all generated <tt class="docutils literal"><span class="pre">$x</span></tt> values:</p>
 <pre class="literal-block">
@@ -228,8 +228,8 @@
     test_x($x)
 </pre>
 </div>
-<div class="section">
-<h3><a id="computing-a-value-for-each-generated-value" name="computing-a-value-for-each-generated-value">Computing a Value for Each Generated Value</a></h3>
+<div class="section" id="computing-a-value-for-each-generated-value">
+<h3>Computing a Value for Each Generated Value</h3>
 <p>If you want a tuple of computed <tt class="docutils literal"><span class="pre">$y</span></tt> values for all of the <tt class="docutils literal"><span class="pre">$x</span></tt> values:</p>
 <pre class="literal-block">
 python y_list = []
@@ -252,7 +252,7 @@
 $y_list = tuple(y_list)
 </pre>
 <p>But note that if <tt class="docutils literal"><span class="pre">compute_y</span></tt> computes multiple solutions for a single
-<tt class="docutils literal"><span class="pre">$x</span></tt> value on <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>, you would end up including all of these
+<tt class="docutils literal"><span class="pre">$x</span></tt> value on <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>, you would end up including all of these
 solutions in your <tt class="docutils literal"><span class="pre">$y_list</span></tt>.  To only get the first computed value for each
 <tt class="docutils literal"><span class="pre">$x</span></tt> value:</p>
 <pre class="literal-block">
@@ -265,8 +265,8 @@
 $y_list = tuple(y_list)
 </pre>
 </div>
-<div class="section">
-<h3><a id="iterating-on-tuples" name="iterating-on-tuples">Iterating on Tuples</a></h3>
+<div class="section" id="iterating-on-tuples">
+<h3>Iterating on Tuples</h3>
 <p>A simple common case of <tt class="docutils literal"><span class="pre">generate_x</span></tt> is when you are computing values for
 each element of a tuple:</p>
 <pre class="literal-block">
@@ -298,7 +298,7 @@
 <p class="first admonition-title">Important</p>
 <p>Note that there is an important difference between these two examples if
 <tt class="docutils literal"><span class="pre">compute_y</span></tt> may find alternate <tt class="docutils literal"><span class="pre">$y</span></tt> values for any given <tt class="docutils literal"><span class="pre">$x</span></tt> value
-on <a class="reference" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>.</p>
+on <a class="reference external" href="../../logic_programming/rules/index.html#backtracking">backtracking</a>.</p>
 <p>The first example will only generate one <tt class="docutils literal"><span class="pre">$y_list</span></tt>.  If that <tt class="docutils literal"><span class="pre">$y_list</span></tt>
 doesn't work for subsequent premises, the <tt class="docutils literal"><span class="pre">forall</span></tt> fails on backtracking,
 so no overall solution will be found.</p>
@@ -308,8 +308,8 @@
 premises so that an overall solution <em>is</em> found.</p>
 </div>
 </div>
-<div class="section">
-<h3><a id="computing-values-for-all-generated-values-that-pass-a-test" name="computing-values-for-all-generated-values-that-pass-a-test">Computing Values for All Generated Values that Pass a Test</a></h3>
+<div class="section" id="computing-values-for-all-generated-values-that-pass-a-test">
+<h3>Computing Values for All Generated Values that Pass a Test</h3>
 <p>Finally, if you want to gather only the computed <tt class="docutils literal"><span class="pre">$y</span></tt> values for <tt class="docutils literal"><span class="pre">$x</span></tt>
 values that pass <tt class="docutils literal"><span class="pre">test_x($x)</span></tt>:</p>
 <pre class="literal-block">