|  |     
    You need to design some tags. Most of the information you need is
    in the Tag Designer's Guide, which is currently in a draft review
    stage. (There is a pointer to this somewhere earlier in this NOTES
    file.)
    
    The following will give you the idea. Note I don't guarantee that
    it's fully debugged, nor do I guarantee support for it. I did it
    merely because I was interested to see how many of the concepts
    needed to do this sort of thing are documented. In fact, the only
    information used in the following that is not in the current draft
    of the designer's guide is the reference to <_pagecap_prefix>, an
    internal tag (which will be documented).
    <set>(retain_spacing\false)
<comment>******************************
* File: AXIOM.GDX
*
* Definitions for automatically numbered Axioms
*
* This file must be included via /SYMBOLS on the command line. It
* must not be included via <INCLUDE> or /INCLUDE
*
* All names used internally in these definitions are prefixed with 
* 'lcl_' to ensure that there will be no conflict with SDML internal
* names.
******************************<endcomment>
<define>(AXIOM\|<eol>
   <comment>(* Increment counter *)<eol>
  <COUNTER>(LCL_AXIOM_NUMBER\+1)<eol>
   <comment>(* Text 'Axiom' followed by chapter/appendix number/letter.
               If there is no chapter or appendix, only the current
               number is output. *)
  <p>Axiom <ifdef>(_pagecap_prefix\|<_pagecap_prefix>.&\)<eol>
       <counter>(lcl_axiom_number)<eol>
       tietie<comment>(Leaves 2 fixed spaces; preserve CTRL/X characters)<EOL>
        <comment>(* Arg 1 is the text specified in the argument to the
                    <AXIOM> tag. *)<eol>
      <EMPHASIS>($1)&)
<comment>(* To Reset the numbers at the beginning of each chapter,
            you need to copy the <chapter> tag and add the change. *)
<copy_tag>(CHAPTER\lcl_chapter_for_axioms)
<define>(CHAPTER\|<eol>
  <comment>(* Pass 2, invoke copied chapter tag with its arguments, then
              reset the axiom counter  *)<eol>
  
    <lcl_chapter_for_axioms>($1\$2)<eol>
    <counter>(lcl_axiom_number\=0)&\\\\\|
  
  <comment>(* Pass 1, just invoke copied appendix tag. *)<eol>
    <lcl_chapter_for_axioms>($1\$2)&)
<comment>(* Do the same for <APPENDIX> *)
                                                                          
<copy_tag>(APPENDIX\lcl_appendix_for_axioms)
<define>(APPENDIX\|<eol>
  <comment>(* Pass 2 *)<eol>
    <lcl_appendix_for_axioms>($1\$2)<eol>
    <counter>(lcl_axiom_number\=0)&\\\\\|
  
  <comment>(* Pass 1 *)<eol>
    <lcl_appendix_for_axioms>($1\$2)&)
<set>(retain_spacing/true)
 | 
|  |     Patti's tag definition for <axiom>(text) takes only one argument,
    which is the theorem text.  If you have a lot of theorems and you
    want to discuss them, then you will want to add a theorem symbol
    as the second argument and be able to make reference to it in the
    discussion:
    
     <axiom>(All axioms are dull\all_dull)
    
    ... as shown in <reference>(all_dull). ...
    
    That part is left as an exercise for the reader of the Tag
    Designer's Manual...          ;-)
 | 
|  |     The <AXIOM> definition that Patti supplied in .1 requires that the
    axiom counter be reset at the beginning of each chapter or appendix.
    This is done by redefining the <CHAPTER> and <APPENDIX> tags as
    follows:
	<copy_tag>(APPENDIX\lcl_appendix_for_axioms)
	<define>(APPENDIX\|<eol>
	  <comment>(* Pass 2 *)<eol>
	    <lcl_appendix_for_axioms>($1\$2)<eol>
	    <counter>(lcl_axiom_number\=0)&\\\\\|
	  
	  <comment>(* Pass 1 *)<eol>
	    <lcl_appendix_for_axioms>($1\$2)&)
    Unfortunately, this definition has a fatal flaw -- it requires that
    every use of the <APPENDIX> tag include a symbol name (optional 2nd
    parameter).  Otherwise, pass 1 of tag processing complains that "" is
    not a valid symbol name, the same error that the following tag
    generates:
	<HEAD2>(This is a heading\)
    After a number of *hours* of experimentation with various combinations
    of the following constructs, I was not able to get a redefinition that
    had a optional 2nd parameter: 
	<COMPARE>
	<COMPARE_NUMERIC>
	<IFVAL>
	$#, $2
    As best I understand it, using these tags and arguments requires the
    "|" and "&" quoting characters, resulting in $1 and $2 not being
    expanded.  Thus, <DEFINE_SYMBOL> winds up complaining that "$2" is not
    a valid symbol name (which is true).
    -- Ward
 |