Skip to content
Browse files

Initial revision

  • Loading branch information...
0 parents commit 32567d843c4f6be31453904b60e7863b9e889d25 tavis_rudd committed
Showing with 11,082 additions and 0 deletions.
  1. +82 −0 CHANGES
  2. +6 −0 MANIFEST.in
  3. +54 −0 TODO
  4. +5 −0 bin/cheetah-compile
  5. +35 −0 docs/src/Makefile
  6. +42 −0 docs/src/TDL.aux
  7. +348 −0 docs/src/TDL.tex
  8. +27 −0 docs/src/TemplateObjects.aux
  9. +22 −0 docs/src/TemplateObjects.tex
  10. +30 −0 docs/src/customizing.aux
  11. +22 −0 docs/src/customizing.tex
  12. +5 −0 docs/src/errorMessages.tex
  13. +25 −0 docs/src/examples.aux
  14. +26 −0 docs/src/examples.tex
  15. +27 −0 docs/src/gettingStarted.aux
  16. +94 −0 docs/src/gettingStarted.tex
  17. +367 −0 docs/src/gfdl.tex
  18. +46 −0 docs/src/introduction.aux
  19. +213 −0 docs/src/introduction.tex
  20. +31 −0 docs/src/macros.aux
  21. +18 −0 docs/src/macros.tex
  22. +4 −0 docs/src/modusers_guide.ind
  23. +196 −0 docs/src/moreverb.sty
  24. +9 −0 docs/src/users_guide.aux
  25. +110 −0 docs/src/users_guide.how
  26. +4 −0 docs/src/users_guide.ind
  27. +606 −0 docs/src/users_guide.l2h
  28. +93 −0 docs/src/users_guide.log
  29. BIN docs/src/users_guide.pdf
  30. +38 −0 docs/src/users_guide.tex
  31. +74 −0 docs/src/users_guide.toc
  32. +34 −0 docs/src/webware.aux
  33. +144 −0 docs/src/webware.tex
  34. +427 −0 examples/webware_examples/cheetahSite/SiteTemplate.tmpl
  35. BIN examples/webware_examples/cheetahSite/banner copy.jpg
  36. BIN examples/webware_examples/cheetahSite/banner2.jpg
  37. BIN examples/webware_examples/cheetahSite/banner3.jpg
  38. BIN examples/webware_examples/cheetahSite/banner_cheetah.jpg
  39. BIN examples/webware_examples/cheetahSite/banner_text.gif
  40. BIN examples/webware_examples/cheetahSite/cheetah-face-black-medium.jpg
  41. BIN examples/webware_examples/cheetahSite/cheetah-face-black.jpg
  42. BIN examples/webware_examples/cheetahSite/cheetah-face-black.psd
  43. BIN examples/webware_examples/cheetahSite/cheetah-face-original.jpg
  44. BIN examples/webware_examples/cheetahSite/cheetah-face.jpg
  45. BIN examples/webware_examples/cheetahSite/cheetah-face_medium.jpg
  46. +93 −0 examples/webware_examples/cheetahSite/contribute.tmpl
  47. +33 −0 examples/webware_examples/cheetahSite/download.tmpl
  48. +248 −0 examples/webware_examples/cheetahSite/index.html
  49. +82 −0 examples/webware_examples/cheetahSite/index.tmpl
  50. +1,668 −0 examples/webware_examples/cheetahSite/learn.html
  51. +43 −0 examples/webware_examples/cheetahSite/learn.tmpl
  52. BIN examples/webware_examples/cheetahSite/sourceforge_logo.gif
  53. BIN examples/webware_examples/cheetahSite/spacer.gif
  54. +8 −0 examples/webware_examples/hello_world.py
  55. +459 −0 examples/webware_examples/webwareSite/WebwareSiteTemplate.tmpl
  56. +29 −0 examples/webware_examples/webwareSite/communicate.tmpl
  57. +29 −0 examples/webware_examples/webwareSite/contribute.tmpl
  58. +29 −0 examples/webware_examples/webwareSite/download.tmpl
  59. +138 −0 examples/webware_examples/webwareSite/index.tmpl
  60. +33 −0 examples/webware_examples/webwareSite/learn.tmpl
  61. BIN examples/webware_examples/webwareSite/onion_blue_on_white.gif
  62. BIN examples/webware_examples/webwareSite/onion_blue_on_white_large.gif
  63. BIN examples/webware_examples/webwareSite/sourceforge_logo.gif
  64. BIN examples/webware_examples/webwareSite/spacer.gif
  65. BIN examples/webware_examples/webwareSite/webWare.gif
  66. BIN examples/webware_examples/webwareSite/webWare_blueBG.gif
  67. BIN examples/webware_examples/webwareSite/webWare_subtitle.gif
  68. BIN examples/webware_examples/webwareSite/webonions.gif
  69. BIN examples/webware_examples/webwareSite/webware_logo.gif
  70. BIN examples/webware_examples/webwareSite/webware_slogan_bw.gif
  71. BIN examples/webware_examples/webwareSite/webware_subtitle_black.gif
  72. BIN examples/webware_examples/webwareSite/webware_subtitle_inner_frame.gif
  73. BIN examples/webware_examples/webwareSite/webware_title_bw.gif
  74. BIN examples/webware_examples/webwareSite/webware_title_red-white.gif
  75. BIN examples/webware_examples/webwareSite/webware_title_red-white_fat.gif
  76. +84 −0 setup.py
  77. +17 −0 setup_all.py
  78. +851 −0 src/CodeGenerator.py
  79. +201 −0 src/Compiler.py
  80. +39 −0 src/Components.py
  81. +248 −0 src/Delimeters.py
  82. +265 −0 src/ErrorHandlers.py
  83. +58 −0 src/Macros/HTML.py
  84. +31 −0 src/Macros/__init__.py
  85. +295 −0 src/NameMapper.py
  86. +226 −0 src/Plugins/Debugger.py
  87. +113 −0 src/Plugins/PSP.py
  88. +5 −0 src/Plugins/__init__.py
  89. +62 −0 src/Servlet.py
  90. +76 −0 src/SettingsManager.py
  91. +681 −0 src/Template.py
  92. +204 −0 src/Templates/SkeletonPage.py
  93. +1 −0 src/Templates/__init__.py
  94. +553 −0 src/Tests.py
  95. +89 −0 src/Utilities.py
  96. +59 −0 src/Validators.py
  97. +1 −0 src/Version.py
  98. +56 −0 src/__init__.py
  99. +711 −0 src/unittest_local_copy.py
82 CHANGES
@@ -0,0 +1,82 @@
+Please initial your changes
+================================================================================
+0.9.7 (not released yet)
+ - moved some stuff from __init__.py into CHANGES and TODO
+ - added a new command 'sdist_docs' to setup.py which rebuilds the docs
+ when making a source distribution
+ - changed the name of the ./Cheetah dir to ./src
+
+0.9.6 (June 12, 2001)
+ - fixed a bug in NameMapper that was preventing 'obj.__class__.__name__' from mapping (TR)
+
+0.9.5 (June 10, 2001)
+ - implemented the #cache directive - see the mailing list (TR)
+ - reworked the handling of cached $placeholders and set $var to mean NO_CACHE,
+ $*var to mean STATIC_CACHE, and $*15*var to mean TIMED_REFRESH_CACHE (TR)
+ - renamed Template._getValueForName as Template.mapName (TR)
+
+0.9.4 (June 9, 2001)
+ - created a SettingsManager base class to handle settings for the Template class (TR)
+ - moved the HTML docs icons into the same dir as the HTML (TR)
+
+0.9.3
+ - updated the User's Guide Makefile. Builds HTML, PDF, and PS in the ./docs dir now. (TR)
+ - changed the refs to 'Tavis Rudd' in the docs to 'The Cheetah Development Team' (TR)
+ - added a few bits to the docs (TR)
+ - did some internal renaming so 'nameMapperTags' are referred as 'placeholderTags' (TR)
+ - added the #slurp directive (TR)
+
+0.9.2
+ - got the PSP plugin working again. It still need test cases. (TR)
+
+0.9.1
+ - Changed the name of the package to 'Cheetah' from TemplateServer (TR)
+ - Changed the name of the Server module and its TemplateServer class to 'Template' (TR)
+ - Changed the name of the 'TScompile' script to 'cheetah-compile' (TR)
+ - updated the docs (TR)
+
+0.9.0
+ - changed the names and behaviour of the #parse and #include directives (TR)
+ see the docs for more. (TR)
+ - changed #verbatim to #raw (TR)
+ - fixed a bug in Tests.py that caused an error on the first run. (TR)
+ - more docs (TR + MO)
+ ! all tests pass with Python 2.1 and 2.0 (TR)
+
+0.8.4
+ - changed the #directive end tags to #end if instead of #/if and #end (TR)
+ macro instead of #/macro (TR)
+ - more work on the User's Guide (TR)
+ - fixed a bug in TScompile (TR)
+
+0.8.3
+ - fixed a problem with the regexs that caused $vars and #directives at the (TR)
+ very beginning of the template string not to match in Python 2.0 (TR)
+ - removed some Test cases that made invalid assumptions about the order (TR)
+ of items in dictionaries. (TR)
+
+0.8.2
+ - finished half of the User's Guide (TR)
+ - fixed several small bugs (TR)
+ - added the #comment directive and removed the old <# multiline comment tag #> (TR)
+ - changed the explicit directive closure to /# from ;# (TR)
+
+
+0.7.6
+ - several small bug fixes (TR)
+ - reimplemented the #block directive to avoid maximum recursion depth errors (TR)
+ with large blocks. (TR)
+ - created many new test cases in the regression testing suite (TR)
+ - added an example site to the examples/ directory (TR)
+ - started the User's Guide (TR)
+
+0.7.5
+ - implemented the command-line compiler (TR)
+
+0.7.3-4
+ - implemented the regression testing suite (TR)
+ - fixed a number of small bugs (TR)
+
+0.7.2
+ - implemented the #longMacro directive (TR)
+
6 MANIFEST.in
@@ -0,0 +1,6 @@
+include *.py TODO CHANGES README examples third_party_packages docs
+recursive-include bin *
+recursive-include docs *
+recursive-include PlateKit *.py
+recursive-include examples *
+recursive-include third_party_packages *
54 TODO
@@ -0,0 +1,54 @@
+Cheetah TODO list
+
+When a task is completed please change its - to an ! and move it to the bottom
+of the list.
+
+Specification
+================================================================================
+- firm up the list of features/syntax that are not subject to change
+- firm up the NamedValueAccess syntax (along with new test cases)
+
+Implementation
+================================================================================
+- design and implement the new parser we've been discussing
+- reimplement the #include directive so it monitors for changes to
+ the included files
+- redesign and implement the Servlet Factory for Webware so the #extend directive
+ will work with .tmpl files as well as .py files
+- make sure that all the #directives that have start and end tags are
+ implemented in such a way that they won't cause 'maximum recursion' limit
+ errors if their content block is long. Simple regexes won't cut it in these
+ cases.
+
+Test Suite
+================================================================================
+- write script that will run the test cases with both Python 2.0 and 2.1
+- independent suite of test cases for NameMapper
+- test cases for the PSP plugin
+- test cases for the SkeletonPage framework
+
+Documentation
+================================================================================
+- add the list of what's stable and what's not to the 'How Mature is Cheetah'
+ section
+- finish all the empty sections
+- flesh out the 'Quick Tutorial' in the 'Getting Started' section
+- add the glossary
+- add an 'Information for Developers' Section
+- add examples to the Examples section
+
+Website
+================================================================================
+- automate the documentation update (including regenerating the learn.html page)
+- add links to the CVS + some instructions
+- See if we can get WebKit working on Sourceforge...
+
+Examples
+================================================================================
+- create some non-html code generation examples
+
+Packaging
+================================================================================
+- Consider moving SettingsManager.py and NameMapper.py into the
+ third_party_packages dir and making setup_all.py the main install script
+! make 'setup.py sdist_docs' generate the update docs by executing the Makefile
5 bin/cheetah-compile
@@ -0,0 +1,5 @@
+#! /usr/bin/env python
+
+from Cheetah.Compiler import MainProgram
+
+MainProgram().run()
35 docs/src/Makefile
@@ -0,0 +1,35 @@
+DOCNAME=users_guide
+PYTHONSRC=/home/tavis/tmp/Python-2.1
+MKHOWTO=$(PYTHONSRC)/Doc/tools/mkhowto
+MAIN_TEX_FILE= users_guide.tex
+
+all: pdf ps html text htmlMultiPage
+
+pdf:
+ $(MKHOWTO) --pdf $(MAIN_TEX_FILE)
+ mv $(DOCNAME).pdf ../
+
+ps:
+ $(MKHOWTO) --ps $(MAIN_TEX_FILE)
+ mv $(DOCNAME).ps ../
+html:
+ -rm -rf $(DOCNAME)
+ $(MKHOWTO) --html --split 1 --iconserver . $(MAIN_TEX_FILE)
+ -rm -R ../$(DOCNAME)_html
+ mv $(DOCNAME) ../$(DOCNAME)_html
+
+htmlMultiPage:
+ -rm -rf $(DOCNAME)
+ $(MKHOWTO) --html --iconserver . $(MAIN_TEX_FILE)
+ -rm -R ../$(DOCNAME)_html_multipage
+ mv $(DOCNAME) ../$(DOCNAME)_html_multipage
+
+text:
+ $(MKHOWTO) --text $(MAIN_TEX_FILE)
+ mv $(DOCNAME).txt ../
+
+clean:
+ -rm -rf $(DOCNAME)
+ -rm *.aux *.l2h *~
+ -rm -rf ../html
+
42 docs/src/TDL.aux
@@ -0,0 +1,42 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {4}The Template Definition Language}{8}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.1}Placeholder tags}{8}}
+\@writefile{toc}{\contentsline {subsubsection}{Rules for placeholder names}{8}}
+\@writefile{toc}{\contentsline {subsubsection}{The searchList}{9}}
+\@writefile{toc}{\contentsline {subsubsection}{Placeholder values}{9}}
+\@writefile{toc}{\contentsline {subsubsection}{Placeholders with no value defined}{10}}
+\@writefile{toc}{\contentsline {subsubsection}{Dotted notation}{10}}
+\@writefile{toc}{\contentsline {subsubsection}{Caching}{10}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.2}Directive tags}{11}}
+\@writefile{toc}{\contentsline {subsubsection}{Escaping directives}{11}}
+\@writefile{toc}{\contentsline {subsubsection}{Tag closures: explicit and implicit}{11}}
+\@writefile{toc}{\contentsline {subsubsection}{Whitespace handling}{11}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.3}Comment directives}{11}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.4}\#raw directives}{12}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.5}\#include directives}{12}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.6}\#cache directives}{13}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.7}Display logic directives}{13}}
+\@writefile{toc}{\contentsline {subsubsection}{Conditional blocks}{13}}
+\@writefile{toc}{\contentsline {subsubsection}{For loops}{13}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {4.8}\#block directives}{13}}
+\@writefile{toc}{\contentsline {subsubsection}{\#redefine directives}{13}}
+\@setckpt{TDL}{
+\setcounter{page}{14}
+\setcounter{equation}{0}
+\setcounter{enumi}{2}
+\setcounter{enumii}{6}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{1}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{4}
+\setcounter{subsection}{8}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
348 docs/src/TDL.tex
@@ -0,0 +1,348 @@
+\section{The Template Definition Language}
+
+{\bf Template definitions} are text strings, or files, that have been marked up
+with Cheetah tags for special processing. Cheetah has 2 types of tags:
+
+\begin{enumerate}
+\item {\bf placeholders}: for marking areas of the template that should be
+ replaced with something.
+
+ Placeholders begin with a dollar sign (\code{\$varName}).
+
+\item {\bf directives}: for everything else:
+ \begin{enumerate} % level 2
+ \item {\bf raw text} for marking verbatim blocks should not be parsed for
+ Cheetah tags.
+ \item {\bf comments} that should not appear in the output
+ \item {\bf includes} to include external text. The text can be included
+ verbatim or with parsing for Cheetah tags.
+ \item {\bf display logic} such as {\bf conditional blocks} (if-blocks) and
+ {\bf for loops}
+ \item {\bf blocks}, which are named sections of a template that can be
+ redefined (overridden) in a subclass or by template users
+ \item etc.
+ \end{enumerate} % level 2
+
+ Directives begin with a hash character (\#).
+
+\end{enumerate}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Placeholder tags}
+Cheetah uses placeholder tags in the form \code{\$varName} to mark out
+areas of the template definition that should be replaced with something. Placeholders are
+equivalent to {\bf fields} on a form. Placeholders can be replaced with plain
+content or variables, objects and function output from Python.
+
+The example below demonstrates the use of placeholders in an HTML document.
+
+\begin{verbatim}
+<HTML>
+<HEAD><TITLE>$title</TITLE></HEAD>
+<BODY>
+$contents
+</BODY>
+</HTML>
+\end{verbatim}
+
+When this template is filled in, the placeholders \code{\$title} and
+\code{\$content} will be replaced with the values of the variables \code{title}
+and \code{content}.
+
+\subsubsection{Rules for placeholder names}
+\begin{itemize}
+
+\item Cheetah ignores all dollar signs (\code{\$}) that are not followed
+ by a letter or an underscore. As a corollary, dollar amounts
+ (\code{\$2.50})are not placeholders but are instead output literally as
+ they should be. Cheetah also ignores any placeholder escaped by a
+ backslash (\code{$\backslash$\$placeholderName}).
+
+\item The first character of a placeholder name must be either an underscore or
+ a letter. Valid characters for the rest of the name are underscores,
+ letters, numbers and periods. These names are valid: \code{\$a},
+ \code{\$_}, \code{\$var}, \code{\$_var}, \code{\$var1}, \code{\$_1var},
+ \code{\$var2_}, \code{\$dict.key}, \code{\$list.item},
+ \code{\$object.method}. These names are not: \code{\$1}, \code{\$var@2},
+ \code{\$\^var}.
+
+\item names are case-sensitive. \code{\$var} does not equal \code{\$Var}
+ or \code{\$vAr} or \code{\$VAR}.
+
+\item Trailing periods are ignored. Cheetah will recognize that
+ placeholder name in \code{\$varName.} is \code{varName} and the period will
+ be left alone in the filled template output.
+
+\item Placeholders can also be written in the form \code{\$\{placeholderName\}}.
+ This is useful for cases where there is no whitespace between the
+ placeholder and surrounding text (\code{surrounding\$\{embeddedVar\}text}).
+\end{itemize}
+
+\subsubsection{The searchList}
+A {\bf namespace} is a Python dictionary that links names to values. Each
+template definition that has been loaded into a \code{Template} objet is
+associated with an ordered list of namespaces in which values for placeholder
+variable names can be stored. This list is called the {\bf searchList}.
+
+The searchList can contain one or more namespaces. In most cases only one
+namespace will be in the searchList unless you explicitly load extra ones. When
+Cheetah fills in \code{\$content} in previous example it searchs
+sequentially through the searchList until it finds a value for \code{\$content}.
+Thus, if three namespaces are loaded and two of them contain a value for
+\code{\$content}, the value for \code{content} from the namespace that is
+closest to the start of the searchList will be returned.
+
+If you add a Python object to the searchList, its attributes and methods will be
+accessible as placeholder names. For example, \code{myObject} contains
+\code{myAttrib} and \code{myMethod}. If \code{myObject} is added to the
+searchList, \code{\$myAttrib} and \code{\$myMethod} can be used as placeholder
+names.
+
+The default namespace in every searchList is the \code{Template} object itself.
+This means that any attributes or methods that are added to classes that inherit
+from \code{Template} can be accessed in templates via \code{\$placeholders}. New
+namespaces can be added to the searchList at any time using the
+\code{Template.addToSearchList()} method. See section \ref{webware} for more
+information on how to use namespaces and the searchList.
+
+\subsubsection{Placeholder values}
+
+Placeholder names can map to Python text strings, numbers, dictionaries, lists
+(arrays), functions, objects, or even nested Cheetah templates. If the value is
+not a String, Cheetah will call \code{str()} on it to obtain a string
+representation that can be inserted into the template. But if the value is a
+callable object (e.g., a function or a method), Cheetah will first call it and
+then call \code{str()} on the result. You may include or omit the () after
+callable placeholders: Cheetah will call it (without arguments) in either case.
+
+
+\begin{verbatim}
+<HTML>
+<HEAD><TITLE>$title</TITLE></HEAD>
+<BODY>
+
+$aString ## these names are chosen to indicate what
+$aNumber ## type of value they map to. They could be
+$aList ## any valid placeholder name.
+$aDictionary
+$aFunction
+$anObject
+
+</BODY>
+</HTML>
+\end{verbatim}
+
+Note that you don't need to include () after \code{\$aFunction}. Cheetah
+will recognize callable variables like functions and methods, call them and
+interpolate their return value in the filled template output.
+
+You cannot pass arguments to a function or method called this way. (Actually,
+you can, but this feature may be removed soon, because it introduces too much
+complexity that is better done in Python outside the template.) The function or
+method must either accept no arguments, or all its arguments must have default
+values. Macro calls (see the Macros section) can accept arguments, but we
+aren't talking about macros here.
+
+Templates can be nested. It is valid to embed a placeholder name that maps to
+another \code{Template} object. The filled output of the nested template will be
+interpolated into the top-level template's output. There is no limit on the
+depth of template nesting.
+
+\subsubsection{Placeholders with no value defined}
+If there is no value defined in the searchList for a placeholder name,
+Cheetah will search for an leading underscore version of the name. For
+example, if it can't find \code{\$varName} it will attempt to find
+\code{\$_varName}. If that fails, Cheetah will include the placeholder
+tag verbatim in the filled template output.
+
+This behaviour can be customized and a default value can be set for names
+that are not found. See section \ref{customizing} for more details.
+
+\subsubsection{Dotted notation}
+Placeholder names can also use {\bf dotted notation} to access entries in
+dictionaries, items in lists, and the attributes and methods of objects.
+Cheetah uses a consistent dotted notation syntax to access the contents
+of all types of containers. This is unlike Python, C++, Java, and other
+languages where dotted notation can only be used to access the attributes and
+methods of objects. \footnote{Cheetah uses a Python module called
+ NameMapper to handle this style of dotted notation. NameMapper is distributed
+ as part of the Cheetah package and can be used as a stand-alone tool.
+ NameMapper was inspired by Chuck Esterbrook's NamedValueAccess module.}
+
+\begin{verbatim}
+$aDictionary.keyName ## must be a valid key of the dictionary
+$aList.3 ## must be a valid index (0-based like in Python)
+$anObject.attributeName ## must be a valid attribute name
+$anObject.method ## must be a valid method name,
+ ## leave off the parentheses on method()
+\end{verbatim}
+
+
+Dotted notation can be used on nested containers of any depth.
+\begin{verbatim}
+$dict1.dict2.dict3.keyName ## nested dictionaries
+$anObject.nestedDict.keyName ## if the object contains a dictionary
+\end{verbatim}
+
+
+\subsubsection{Caching}
+
+By default the value of each \code{\$placeholder} is updated for each request.
+If you want to statically cache the value of the \code{\$placeholder} upon
+startup, add an asterisk after the \$ sign. \code{\$var} becomes \code{\$*var}.
+See the section on the \code{\#cache} directive below for more information.
+
+If you only need to update the value of the \code{\$placeholders} at specific time intervals use
+this form: \code{\$variable} becomes \code{\$*15*variable} , where 15 is the time interval in
+minutes. The time interval can also be specified in fractions of a minute such
+as \code{\$*0.5*variable}.
+
+\begin{verbatim}
+<HTML>
+<HEAD><TITLE>$title</TITLE></HEAD>
+<BODY>
+
+$var ## dynamic - will be reinterpolated for each request
+$*var2 ## static - will be interpolated only once at start-up
+$*5*var3 ## timed refresh - will be updated every 5 minutes.
+
+</BODY>
+</HTML>
+\end{verbatim}
+
+%Note that Cheetah will automatically detect nested \code{Template} objects
+%and these
+%% @@finish this off
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Directive tags}
+Directives tags are used for all functionality that cannot be handled with
+simple placeholders and are enclosed in \code{\#} and \code{/\#}.
+Cheetah does not use HTML/XML style tags because they would be hard to
+distinguish from real HTML tags and would not be visible in rendered HTML when
+something goes wrong.
+
+Some directives consist of a single tag while others have {\bf start} and
+{\bf end} tags that surround a chunk of text. End tags are written in the form
+\code{\#end nameOfTheDirective/\#}.
+
+\subsubsection{Escaping directives}
+Directives can be escaped by placing a backslash ($\backslash$) before them.
+Escaped directives will be printed verbatim.
+
+\subsubsection{Tag closures: explicit and implicit}
+Directive tags can closed explicitly with \code{/\#} or implicitly with the end
+of the line if you're feeling lazy.
+\begin{verbatim}
+#block /#
+Text in the contents area of the
+block directive
+#end block /#
+\end{verbatim}
+or
+\begin{verbatim}
+#block
+Text in the contents area of the
+block directive
+#end block
+\end{verbatim}
+
+\subsubsection{Whitespace handling}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Comment directives}
+
+Comment directives are used to mark notes, explanations, and decorative text
+that should not appear in the output. There are two forms of the comment
+directive: single-line and multi-line.
+
+All text in a template definition that lies between 2 hash characters
+(\code{\#\#}) and the end of the line is treated as a single-line comment and
+will not show up in the output, unless the 2 hash characters are escaped with a
+backslash.
+\begin{verbatim}
+<HTML>
+<HEAD><TITLE>$title</TITLE></HEAD>
+<BODY>
+##==================================== a decorative comment
+$contents ## an end-of-line comment
+##====================================
+</BODY>
+</HTML>
+\end{verbatim}
+
+Any text between \code{\#*} and \code{*\#} will be treated as a multi-line
+comment.
+\begin{verbatim}
+<HTML>
+<HEAD><TITLE>$title</TITLE></HEAD>
+<BODY>
+#*
+ Here is some multiline
+ comment text
+*#
+##==================================== a decorative comment
+$contents ## an end-of-line comment
+##====================================
+</BODY>
+</HTML>
+\end{verbatim}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\#raw directives}
+Any section of a template definition that is delimeted by \code{\#raw} and
+\code{\#end raw} will be printed verbatim without any parsing of
+\$placeholders or other directives. This can be very useful for debugging or
+writing Cheetah examples and tutorials.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\#include directives}
+
+\code{\#include} directives are used to include text from outside the template
+definition. The text can come from \code{\$placeholder} variables or from
+external files. The example below demonstrates use with \code{\$placeholder}
+variables.
+
+\begin{verbatim}
+#include $myParseText
+\end{verbatim}
+
+This example demonstrates its use with external files.
+\begin{verbatim}
+#include "includeFileName.txt"
+\end{verbatim}
+
+By default, included text will be parsed for Cheetah tags. The keyword
+{\bf raw} can be used to mark the text for verbatim inclusion without any tag
+parsing.
+
+\begin{verbatim}
+#include raw $myParseText
+#include raw "includeFileName.txt"
+\end{verbatim}
+
+\code{Template} uses its .getFileContents(fileName) method to locate the file to
+be included. This method can be overriden in subclasses if you want to modify
+or extend its behaviour. It is possible to implement the logic for getting
+remote files such as \code{http://myserver.com/file.txt}.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\#cache directives}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Display logic directives}
+
+\subsubsection{Conditional blocks}
+
+\subsubsection{For loops}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{\#block directives}
+
+\subsubsection{\#redefine directives}
+
+
27 docs/src/TemplateObjects.aux
@@ -0,0 +1,27 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {3}Template Objects}{7}}
+\newlabel{TSobjects}{{3}{7}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}The Template class}{7}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Constructing Template objects}{7}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Using Template objects}{7}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {3.4}Modifying Template objects}{7}}
+\@setckpt{TemplateObjects}{
+\setcounter{page}{8}
+\setcounter{equation}{0}
+\setcounter{enumi}{4}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{3}
+\setcounter{subsection}{4}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
22 docs/src/TemplateObjects.tex
@@ -0,0 +1,22 @@
+\section{Template Objects}
+\label{TSobjects}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{The Template class}
+The Template class is the heart of Cheetah. It parses and compiles
+Template Definitions into python code and serves the filled template output to
+any client that requests it.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Constructing Template objects}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Using Template objects}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Modifying Template objects}
+
+
+
30 docs/src/customizing.aux
@@ -0,0 +1,30 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {7}Customizing and extending Cheetah}{18}}
+\newlabel{customizing}{{7}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.1}Custom handling of unknown placeholder names}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.2}Plugins}{18}}
+\@writefile{toc}{\contentsline {subsubsection}{The PSP plugin}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.3}Custom variable-tags}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.4}Custom directives}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.5}Custom error handlers}{18}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {7.6}Safe delegation}{18}}
+\@setckpt{customizing}{
+\setcounter{page}{19}
+\setcounter{equation}{0}
+\setcounter{enumi}{2}
+\setcounter{enumii}{6}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{1}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{7}
+\setcounter{subsection}{6}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
22 docs/src/customizing.tex
@@ -0,0 +1,22 @@
+\section{Customizing and extending Cheetah}
+\label{customizing}
+
+\subsection{Custom handling of unknown placeholder names}
+%% handlers
+%% default vars
+
+\subsection{Plugins}
+\subsubsection{The PSP plugin}
+
+\subsection{Custom variable-tags}
+
+\subsection{Custom directives}
+
+\subsection{Custom error handlers}
+
+\subsection{Safe delegation}
+Safe Delegation, as provided by Zope and Allaire's Spectra, is not a core aim of
+Cheetah. However, several hooks were built into Cheetah so that Safe
+Delegation can be implemented at a later date.
+
+
5 docs/src/errorMessages.tex
@@ -0,0 +1,5 @@
+\section{Error Messages}
+
+\subsection{Errors during compilation}
+
+\subsection{Run-time errors}
25 docs/src/examples.aux
@@ -0,0 +1,25 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {8}Examples}{19}}
+\newlabel{examples}{{8}{19}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.1}Syntax examples}{19}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {8.2}Webware Examples}{19}}
+\@setckpt{examples}{
+\setcounter{page}{20}
+\setcounter{equation}{0}
+\setcounter{enumi}{2}
+\setcounter{enumii}{6}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{1}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{8}
+\setcounter{subsection}{2}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
26 docs/src/examples.tex
@@ -0,0 +1,26 @@
+\section{Examples}
+\label{examples}
+
+The Cheetah distribution comes with an 'examples' directory. Browse the
+files in this directory and its subdirectories for examples of how
+Cheetah can be used.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Syntax examples}
+Cheetah's \code{Tests} module contains a large number of test cases
+that can double as examples of how the Template Definition Language works.
+To view these cases go to the base directory of your Cheetah distribution
+and open the file Cheetah/Tests.py in a text editor.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Webware Examples}
+The 'examples' directory has a subdirectory called 'webware_examples'. It
+contains example servlets that use Webware.
+
+A subdirectory titled 'webwareSite' contains a complete website example. This
+site is my proposal for the new Webware website. The site demonstrates the
+advanced Cheetah features such as the \code{\#data} and \code{\#redefine}
+directives. It also demonstrates how the TScompile program can be used to
+generate Webware .py servlet files from .tmpl Template Definition files.
+
27 docs/src/gettingStarted.aux
@@ -0,0 +1,27 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {2}Getting Started}{5}}
+\newlabel{gettingStarted}{{2}{5}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Requirements}{5}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Installation}{5}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Testing your installation}{5}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Quickstart tutorial}{5}}
+\@setckpt{gettingStarted}{
+\setcounter{page}{7}
+\setcounter{equation}{0}
+\setcounter{enumi}{4}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{2}
+\setcounter{subsection}{4}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
94 docs/src/gettingStarted.tex
@@ -0,0 +1,94 @@
+\section{Getting Started}
+\label{gettingStarted}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Requirements}
+Cheetah requires Python release 2.0 or greater and should run on any
+operating system that Python 2.0 runs on.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Installation}
+
+To install Cheetah for a single user:
+\begin{enumerate}
+\item copy the 'src' sub-directory to a directory called 'Cheetah' that is in the
+ user's PYTHON_PATH
+
+\end{enumerate}
+
+To install Cheetah for system-wide use:
+\begin{enumerate}
+\item on POSIX systems (AIX, Solaris, Linux, IRIX, etc.) become the 'root' user
+ and run: python ./setup.py install
+
+\item On non-POSIX systems, such as Windows NT, login as an administrator and
+ type this at the command-line: python setup.py install
+\end{enumerate}
+
+
+On POSIX systems, the system-wide installation will also install the Cheetah's
+command-line compiler program, TScompile, to a system-wide executable path such as
+/usr/local/bin.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Testing your installation}
+You can run the test suite to insure that your installation is correct by
+following these steps:
+\begin{enumerate}
+\item CD into the directory ./Cheetah
+\item type: \code{python Tests.py}
+\end{enumerate}
+
+If any of the tests fail please send a message to the email list with a copy of
+the test output and the following details about your installation:
+
+\begin{enumerate}
+\item your version of Cheetah
+\item your version of Python
+\item your operating system
+\item whether you have changed anything in the Cheetah installation
+\end{enumerate}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Quickstart tutorial}
+This tutorial briefly introduces the basic usage of Cheetah. See the
+following chapters for more detailed explanations.
+
+{\bf This tutorial will be fleshed out further at later date.}
+
+The core of Cheetah is the \code{Template} class in the \code{Cheetah.Template}
+module. The following example shows how to use the \code{Template} class from an
+interactive Python session. Lines prefixed with \code{>>>} and \code{...} are
+user input. The remaining lines are Python output.
+
+\begin{verbatim}
+>>> from Cheetah.Template import Template
+>>> templateDef = """
+... <HTML>
+... <HEAD><TITLE>$title</TITLE></HEAD>
+... <BODY>
+... $contents
+... </BODY>
+... </HTML>"""
+>>> nameSpace = {'title': 'Hello World Example', 'contents': 'Hello World!'}
+>>> templateObj = Template(templateDef, nameSpace)
+>>> print templateObj
+
+<HTML>
+<HEAD><TITLE>Hello World Example</TITLE></HEAD>
+<BODY>
+Hello World!
+</BODY>
+</HTML>
+>>> print templateObj # templateObj can be printed as many times as you need
+
+<HTML>
+<HEAD><TITLE>Hello World Example</TITLE></HEAD>
+<BODY>
+Hello World!
+</BODY>
+</HTML>
+
+\end{verbatim}
+
+
367 docs/src/gfdl.tex
@@ -0,0 +1,367 @@
+% gfdl.tex
+% This file is a chapter. It must be included in a larger document to work
+% properly.
+
+\section{GNU Free Documentation License}
+
+Version 1.1, March 2000\\
+
+ Copyright $\copyright$ 2000 Free Software Foundation, Inc.\\
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA\\
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+\subsection*{Preamble}
+
+The purpose of this License is to make a manual, textbook, or other
+written document ``free'' in the sense of freedom: to assure everyone
+the effective freedom to copy and redistribute it, with or without
+modifying it, either commercially or noncommercially. Secondarily,
+this License preserves for the author and publisher a way to get
+credit for their work, while not being considered responsible for
+modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+\subsection{Applicability and Definitions}
+
+This License applies to any manual or other work that contains a
+notice placed by the copyright holder saying it can be distributed
+under the terms of this License. The ``Document'', below, refers to any
+such manual or work. Any member of the public is a licensee, and is
+addressed as ``you''.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall subject
+(or to related matters) and contains nothing that could fall directly
+within that overall subject. (For example, if the Document is in part a
+textbook of mathematics, a Secondary Section may not explain any
+mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, whose contents can be viewed and edited directly and
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup has been designed to thwart or discourage
+subsequent modification by readers is not Transparent. A copy that is
+not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, \LaTeX~input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML designed for human modification. Opaque formats include
+PostScript, PDF, proprietary formats that can be read and edited only
+by proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML produced by some word processors for output
+purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+
+\subsection{Verbatim Copying}
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+\subsection{Copying in Quantity}
+
+If you publish printed copies of the Document numbering more than 100,
+and the Document's license notice requires Cover Texts, you must enclose
+the copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a publicly-accessible computer-network location containing a complete
+Transparent copy of the Document, free of added material, which the
+general network-using public has access to download anonymously at no
+charge using public-standard network protocols. If you use the latter
+option, you must take reasonably prudent steps, when you begin
+distribution of Opaque copies in quantity, to ensure that this
+Transparent copy will remain thus accessible at the stated location
+until at least one year after the last time you distribute an Opaque
+copy (directly or through your agents or retailers) of that edition to
+the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+
+\subsection{Modifications}
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+\begin{itemize}
+
+\item Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+\item List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has less than five).
+\item State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+\item Preserve all the copyright notices of the Document.
+\item Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+\item Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+\item Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+\item Include an unaltered copy of this License.
+\item Preserve the section entitled ``History'', and its title, and add to
+ it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section entitled ``History'' in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+\item Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the ``History'' section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+\item In any section entitled ``Acknowledgements'' or ``Dedications'',
+ preserve the section's title, and preserve in the section all the
+ substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+\item Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+\item Delete any section entitled ``Endorsements''. Such a section
+ may not be included in the Modified Version.
+\item Do not retitle any existing section as ``Endorsements''
+ or to conflict in title with any Invariant Section.
+
+\end{itemize}
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties -- for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+\subsection{Combining Documents}
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections entitled ``History''
+in the various original documents, forming one section entitled
+``History''; likewise combine any sections entitled ``Acknowledgements'',
+and any sections entitled ``Dedications''. You must delete all sections
+entitled ``Endorsements.''
+
+
+\subsection{Collections of Documents}
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+
+
+\subsection{Aggregation With Independent Works}
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, does not as a whole count as a Modified Version
+of the Document, provided no compilation copyright is claimed for the
+compilation. Such a compilation is called an ``aggregate'', and this
+License does not apply to the other self-contained works thus compiled
+with the Document, on account of their being thus compiled, if they
+are not themselves derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one quarter
+of the entire aggregate, the Document's Cover Texts may be placed on
+covers that surround only the Document within the aggregate.
+Otherwise they must appear on covers around the whole aggregate.
+
+
+\subsection{Translation}
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License provided that you also include the
+original English version of this License. In case of a disagreement
+between the translation and the original English version of this
+License, the original English version will prevail.
+
+
+\subsection{Termination}
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+
+\subsection{Future Revisions of This Licence}
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+\url{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+
+\subsection*{ADDENDUM: How to use this License for your documents}
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+\begin{quote}
+
+ Copyright $\copyright$ YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.1
+ or any later version published by the Free Software Foundation;
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+ A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+
+\end{quote}
+
+If you have no Invariant Sections, write ``with no Invariant Sections''
+instead of saying which ones are invariant. If you have no
+Front-Cover Texts, write ``no Front-Cover Texts'' instead of
+``Front-Cover Texts being LIST''; likewise for Back-Cover Texts.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
46 docs/src/introduction.aux
@@ -0,0 +1,46 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {1}Introduction}{2}}
+\newlabel{intro}{{1}{2}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}What is Cheetah?}{2}}
+\newlabel{intro.whatIs}{{1.1}{2}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Why is it called Cheetah?}{3}}
+\newlabel{intro.name}{{1.2}{3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.3}Who developed Cheetah?}{3}}
+\newlabel{intro.developers}{{1.3}{3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.4}How mature is Cheetah?}{3}}
+\newlabel{intro.mature}{{1.4}{3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.5}Where can I get releases?}{3}}
+\newlabel{intro.releases}{{1.5}{3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.6}Where can I get news?}{3}}
+\newlabel{intro.news}{{1.6}{3}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.7}How can I contribute?}{3}}
+\newlabel{intro.contribute}{{1.7}{3}}
+\@writefile{toc}{\contentsline {subsubsection}{Bug reports and patches}{4}}
+\@writefile{toc}{\contentsline {subsubsection}{Example sites and tutorials}{4}}
+\@writefile{toc}{\contentsline {subsubsection}{Macro libraries}{4}}
+\@writefile{toc}{\contentsline {subsubsection}{Test cases}{4}}
+\@writefile{toc}{\contentsline {subsubsection}{Publicity}{4}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.8}Acknowledgements}{4}}
+\newlabel{intro.acknowledgments}{{1.8}{4}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {1.9}License}{4}}
+\newlabel{intro.license}{{1.9}{4}}
+\@setckpt{introduction}{
+\setcounter{page}{5}
+\setcounter{equation}{0}
+\setcounter{enumi}{6}
+\setcounter{enumii}{0}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{0}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{1}
+\setcounter{subsection}{9}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
213 docs/src/introduction.tex
@@ -0,0 +1,213 @@
+\section{Introduction}
+\label{intro}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{What is Cheetah?}
+\label{intro.whatIs}
+
+Cheetah is a Python-based template engine and code-generator. It aims:
+
+\begin{itemize}
+\item {\bf to make it easy to separate content, graphic design, and program code.}
+
+ Program code should not pollute HTML and HTML should not pollute program
+ code. Nor should content pollute the structure of complex HTML designs and
+ vice versa.
+
+ There should be no need for a designer to work through a programmer to
+ change a website's design or to use dynamic components that have already
+ been coded. Likewise, content-providers should not have to work through a
+ 'webmaster' to add new content to a site. All members of the team should
+ be able to work independently and in parallel.
+
+ A clean separation makes it easier for a team of content-providers,
+ designers, and programmers to work together without stepping on each
+ other's toes and polluting each other's work. Other advantages include
+ faster development time; HTML and program code that are easier to
+ understand and maintain; content that can be displayed in a variety of
+ non-HTML formats such as PDF; and highly modular, flexible, and reusable
+ site architectures.
+
+\item {\bf to make it easy to integrate content, graphic design, and program code.}
+
+ While it should be easy to develop content, graphic design, and program
+ code separately, it should NOT be difficult to integrate them as part of a
+ website. There should be no difficult hoops to jump through.
+
+ It should be easy:
+ \begin{itemize}
+ \item for programmers to create reusable components and functions that are
+ accessible and understandable to designers.
+ \item for designers to mark out placeholders for content and dynamic components
+ in their templates.
+ \item for designers to soft-code aspects of their design that are either
+ repeated in several places or are subject to change.
+ \item for designers to extend and customize existing templates and thus minimize
+ duplication of effort and code.
+ \item and, of course, for content-providers to use the templates that
+ designers have created.
+ \end{itemize}
+
+
+\item {\bf to provide template designers with a small set of 'Display Logic'
+ programming structures such as conditional blocks and
+ for loops}
+
+ Graphic designers often do tasks that would be easier, faster, and less
+ error prone if they had access to {\bf conditional blocks} and {\bf for
+ loops}. However, a full programming language would be overkill for these
+ simple tasks and most designers don't have the time or desire to learn one.
+
+\item {\bf to be equally well-suited for HTML, SGML, XML, SQL, Postscript, form
+ email, LaTeX, or any other text-based format.}
+
+ Although it was designed with dynamic websites and web applications in mind,
+ Cheetah is not HTML-specific.
+
+\item {\bf to achieve all these aims in a manner that is efficient, flexible, and
+ extendable.}
+
+\end{itemize}
+
+Cheetah achieves these aims by:
+
+\begin{itemize}
+
+\item blending the power and flexibility of Python with the simplicity of a
+ small Template Definition language that non-programmers can understand.
+
+\item giving template designers a simple way of accessing Python variables,
+ objects, and functions in their templates.
+
+\item providing a modular, object-orientated framework that makes it easy to
+ create and maintain large websites.
+
+\item compiling 'Template Definitions' into native Python code at startup.
+ Thereafter this code is executed for each request. This approach is
+ dramatically faster than the string substitution approach used by many
+ templating engines.
+
+\item providing a very simple, yet powerful, caching mechanism that can
+ significantly increase the responsiveness of a dynamic website.
+
+\end{itemize}
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Why is it called Cheetah?}
+\label{intro.name}
+
+Cheetah is fast, flexible, agile and graceful - like its namesake.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Who developed Cheetah?}
+\label{intro.developers}
+
+Cheetah is one of several templating frameworks that grew out of a 'templates'
+thread on the 'Webware For Python' email list. Tavis Rudd, Mike Orr, Chuck
+Esterbrook, Ian Bicking and Tom Schwaller are the core developers.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{How mature is Cheetah?}
+\label{intro.mature}
+
+Cheetah is alpha/beta software as this User's Guide is incomplete and several aspects
+of the design are still subject to change. However, it has been tested
+extensively and has few known issues. We are hoping to release production
+version 1.0 in the summer of 2001.
+
+Here's a summary of known issues and aspects of the design that are in flux.
+\begin{itemize}
+\item The \#include directive is not working with relative path file includes
+ when used with Webware. This should be resolved soon.
+\item The \#include directive might be reworked to monitor for changes in the
+ included file at run-time. It currently does the include once-off at
+ compile-time.
+\item The implementation of \$placeholders(WithArgstrings) needs to be fleshed
+ out to handle nesting.
+\end{itemize}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Where can I get releases?}
+\label{intro.releases}
+
+Cheetah releases can be downloaded from
+\url{http://CheetahTemplate.sourceforge.net}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Where can I get news?}
+\label{intro.news}
+
+News and updates can be obtained from the the Cheetah website:
+\url{http://CheetahTemplate.sourceforge.net}
+
+Cheetah discussions take place on the list
+\email{cheetahtemplate-discuss@lists.sourceforge.net}.
+
+If you encounter difficulties, or are unsure about how to do something,
+please post a detailed message to the list.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{How can I contribute?}
+\label{intro.contribute}
+
+Cheetah is the work of many volunteers. If you use Cheetah please share your
+experiences, tricks, customizations, and frustrations.
+
+\subsubsection{Bug reports and patches}
+
+If you think there is a bug in Cheetah, send a message to the email list
+with the following information:
+
+\begin{enumerate}
+\item a description of what you were trying to do and what happened
+\item all tracebacks and error output
+\item your version of Cheetah
+\item your version of Python
+\item your operating system
+\item whether you have changed anything in the Cheetah installation
+\end{enumerate}
+
+\subsubsection{Example sites and tutorials}
+If you're developing a website with Cheetah, please send a link to the
+email list so we can keep track of Cheetah sites. Also, if you discover
+new and interesting ways to use Cheetah please share your experience and
+write a quick tutorial about your technique.
+
+\subsubsection{Macro libraries}
+We hope to build up a framework of macros libraries (see section
+\ref{macros.libraries}) to distribute with Cheetah and would appreciate
+any contributions.
+
+\subsubsection{Test cases}
+Cheetah is packaged with a regression testing suite that is run with each
+new release to ensure that everything is working as expected and that recent
+changes haven't broken anything. The test cases are in the Cheetah.Tests
+module. If you find a reproduceable bug please consider writing a test case
+that will pass only when the bug is fixed. Send any new test cases to the email
+list with the subject-line ``new test case for Cheetah.''
+
+\subsubsection{Publicity}
+Help spread the word ... recommend it to others, write articles about it, etc.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Acknowledgements}
+\label{intro.acknowledgments}
+
+We'd like to thank the following people for contributing valuable advice, code
+and encouragement: Geoff Talvola, Jay Love, Terrel Shumway, Sasa Zivkov, Arkaitz
+Bitorika, Jeremiah Bellomy, Baruch Even, Paul Boddie, Stephan Diehl, and Geir
+Magnusson.
+
+The Velocity, WebMacro and Smarty projects provided inspiration and design
+ideas. Cheetah has benefited from the creativity and energy of their
+developers. Thank you.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{License}
+\label{intro.license}
+
+Cheetah is released for unlimited distribution under the terms of the
+Python license.
+
31 docs/src/macros.aux
@@ -0,0 +1,31 @@
+\relax
+\@writefile{toc}{\contentsline {section}{\numberline {5}Macros}{14}}
+\newlabel{macros}{{5}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.1}What are macros?}{14}}
+\newlabel{macros.whatAre}{{5.1}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.2}Using macros}{14}}
+\newlabel{macros.using}{{5.2}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.3}Defining macros}{14}}
+\newlabel{macros.defining}{{5.3}{14}}
+\@writefile{toc}{\contentsline {subsection}{\numberline {5.4}Macro libraries}{14}}
+\newlabel{macros.libraries}{{5.4}{14}}
+\@setckpt{macros}{
+\setcounter{page}{15}
+\setcounter{equation}{0}
+\setcounter{enumi}{2}
+\setcounter{enumii}{6}
+\setcounter{enumiii}{0}
+\setcounter{enumiv}{0}
+\setcounter{footnote}{1}
+\setcounter{mpfootnote}{0}
+\setcounter{part}{0}
+\setcounter{section}{5}
+\setcounter{subsection}{4}
+\setcounter{subsubsection}{0}
+\setcounter{paragraph}{0}
+\setcounter{subparagraph}{0}
+\setcounter{figure}{0}
+\setcounter{table}{0}
+\setcounter{LT@tables}{0}
+\setcounter{LT@chunks}{0}
+}
18 docs/src/macros.tex
@@ -0,0 +1,18 @@
+\section{Macros}
+\label{macros}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{What are macros?}
+\label{macros.whatAre}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Using macros}
+\label{macros.using}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Defining macros}
+\label{macros.defining}
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+\subsection{Macro libraries}
+\label{macros.libraries}
4 docs/src/modusers_guide.ind
@@ -0,0 +1,4 @@
+\
+\begin{theindex}
+\label{modindex}
+\end{theindex}
196 docs/src/moreverb.sty
@@ -0,0 +1,196 @@
+%%% moreverb.sty
+%%% AJCD 20 Sep 91
+%%% adds various verbatim environments using Rainer Sch\"opf's new verbatim
+%%% environment.
+
+%%% Marginal hacks (RF) to work `properly' with 2e
+\def\filedate{1994/12/13}
+\def\fileversion{v2.0}
+%
+\NeedsTeXFormat{LaTeX2e}
+\ProvidesPackage{moreverb}
+ [\filedate\space \fileversion\space
+ LaTeX2e package for `more' verbatim enhancements]
+\typeout{Package: `moreverb'
+ \fileversion \space <\filedate> (RF, after AJCD and RmS)}
+%\typeout{English Documentation \@spaces <\docdate>} % oh no there isn't
+
+%%% load verbatim style if not already loaded.
+\@ifundefined{verbatim@processline}{\RequirePackage{verbatim}}{}
+
+%%% verbatimwrite writes all text in its body to a file, the name of which it
+%%% is given as an argument. Written by RmS.
+\newwrite \verbatim@out
+\def\verbatimwrite#1{%
+ \@bsphack
+ \immediate\openout \verbatim@out #1
+ \let\do\@makeother\dospecials
+ \catcode`\^^M\active \catcode`\^^I=12
+ \def\verbatim@processline{%
+ \immediate\write\verbatim@out
+ {\the\verbatim@line}}%
+ \verbatim@start}
+
+\def\endverbatimwrite{%
+ \immediate\closeout\verbatim@out
+ \@esphack}
+
+%%% Auxiliary macros and counters for expanding tabs. Use by listing and
+%%% verbatimtab environments.
+\newcount\tab@position \newcount\tab@size
+\newcount\verbatimtabsize \verbatimtabsize=8
+\def\@xobeytab{\leavevmode\penalty\@M
+ {\loop\ \global\advance\tab@position-1 \ifnum\tab@position>0 \repeat}}
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\@vobeytabs{\catcode`\^^I\active\let^^I\@xobeytab}%
+\endgroup
+\def\verbatim@tabexpand#1{%
+ \ifx#1\@nil \let\next\par \else
+ \ifx#1\@xobeysp \@xobeysp\advance\tab@position-1 \else
+ \ifx#1\@xobeytab \@xobeytab\else
+ #1\advance\tab@position-1
+ \fi\fi
+ \ifnum\tab@position=0 \tab@position\tab@size \fi
+ \let\next\verbatim@tabexpand
+ \fi\next
+}
+
+%%% listing defines a verbatim environment with numbered lines; it takes an
+%%% optional argument specifying the number of lines between numbered
+%%% lines, and a mandatory argument specifying the starting line. listingcont
+%%% continues from the place where listing left off.
+%%% The style in which the label is set can be altered by re-defining
+%%% \listinglabel. * versions are provided.
+\newcount\listing@line \listing@line=1 \newcount\listing@step \listing@step=1
+% Adding an \hbox in front of the line causes a line break, so I go
+% through this rigmarole to get the lines aligned nicely. I probably
+% missed some obvious reason why \hboxes don't work.
+\def\listinglabel#1{\rlap{\small\rm\the#1}\hskip2.5em}
+\def\thelisting@line{%
+ \setbox0\hbox{\listinglabel\listing@line}%
+ \@tempcnta=\listing@line
+ \divide\@tempcnta\listing@step \multiply\@tempcnta\listing@step
+ \ifnum\listing@line=1 \unhbox0
+ \else \ifnum\@tempcnta=\listing@line \unhbox0
+ \else \hskip\wd0
+ \fi\fi}
+\def\listing{\@ifnextchar[{\@listing}{\@listing[1]}}
+\def\@listing[#1]#2{%
+ \global\listing@line=#2\global\listing@step=#1\listingcont}
+\def\listingcont{%
+ \tab@size=\verbatimtabsize
+ \def\verbatim@processline{\tab@position\tab@size
+ \thelisting@line \global\advance\listing@line1
+ \expandafter\verbatim@tabexpand\the\verbatim@line\@nil}%
+ \@verbatim\frenchspacing\@vobeyspaces\@vobeytabs\verbatim@start}
+\let\endlisting=\endtrivlist
+\let\endlistingcont=\endtrivlist
+\@namedef{listing*}{\@ifnextchar[{\@listingstar}{\@listingstar[1]}}
+\def\@listingstar[#1]#2{%
+ \global\listing@line=#2\global\listing@step=#1\relax
+ \csname listingcont*\endcsname}
+\@namedef{listingcont*}{%
+ \def\verbatim@processline{%
+ \thelisting@line \global\advance\listing@line1
+ \the\verbatim@line\par}%
+ \@verbatim\verbatim@start}
+\expandafter\let\csname endlisting*\endcsname =\endtrivlist
+\expandafter\let\csname endlistingcont*\endcsname =\endtrivlist
+
+%%% file input version of listing
+\def\listinginput{%
+ \@ifnextchar[{\@listinginput}{\@listinginput[1]}}
+{\catcode`\~=\active \lccode`\~=`\^^M \lccode`\N=`\N
+ \lowercase{%
+ \gdef\@listinginput[#1]#2#3{\begingroup
+ \global\listing@line=#2\global\listing@step=#1
+ \tab@size=\verbatimtabsize
+ \def\verbatim@processline{\tab@position\tab@size
+ \thelisting@line \global\advance\listing@line1
+ \expandafter\verbatim@tabexpand\the\verbatim@line\@nil}%
+ \@verbatim\frenchspacing\@vobeyspaces\@vobeytabs
+ \def\verbatim@addtoline##1~{%
+ \verbatim@line\expandafter{\the\verbatim@line##1}}%
+ \openin\verbtab@in=#3
+ \ifeof\verbtab@in\typeout{No file #3.}\else
+ \verbtab@oktrue
+ \loop
+ \read\verbtab@in to \verbtab@line
+ \ifeof\verbtab@in\verbtab@okfalse\else
+ \expandafter\verbatim@addtoline\verbtab@line
+ \verbatim@processline
+ \verbatim@startline
+ \fi
+ \ifverbtab@ok\repeat
+ \closein\verbtab@in\fi
+ \endtrivlist\endgroup\@doendpe}}}
+
+%%% verbatimcmd is a verbatim environment with the exception of the escape and
+%%% grouping characters \, {, }.
+\def\verbatimcmd{%
+ \@verbatim \catcode`\\=0 \catcode`\{=1 \catcode`\}=2
+ \frenchspacing\@vobeyspaces\verbatim@start
+}
+\def\endverbatimcmd{%
+ \let\par\relax
+ \def\verbatim@{\endtrivlist\endgroup}%
+ \begingroup}
+
+%%% boxedverbatim produces a verbatim environment in a framed box.
+%%% written by Victor Eijkhout
+\def\boxedverbatim{%
+ % redefine `processline' to produce only a line as wide
+ % as the natural width of the line
+ \def\verbatim@processline{%
+ {\setbox0=\hbox{\the\verbatim@line}%
+ \hsize=\wd0 \the\verbatim@line\par}}%
+ % save the verbatim code in a box
+ \setbox0=\vbox\bgroup \verbatim
+}
+\def\endboxedverbatim{%
+ \endverbatim
+ \egroup % close the box and `fbox' it
+ \fbox{\box0}% <<<=== change here for centering,...
+}
+
+%%% verbatimtab is a verbatim environment which expands tab characters; it
+%%% takes an optional argument specifying the width of tab stops
+\def\verbatimtab{\futurelet\next\@verbatimtab}
+\def\@verbatimtab{\if\next[ \let\next\@@verbatimtab\else
+ \def\next{\@@verbatimtab[\the\verbatimtabsize]}\fi\next}
+\def\@@verbatimtab[#1]{%
+ \do@verbatimtab{#1}{%
+ \@verbatim\frenchspacing\@vobeyspaces\@vobeytabs\verbatim@start}%
+}
+\def\do@verbatimtab#1#2{%
+ \tab@size=#1
+ \def\verbatim@processline{\tab@position\tab@size
+ \expandafter\verbatim@tabexpand\the\verbatim@line\@nil}#2
+}
+\let\endverbatimtab=\endtrivlist
+
+%%% file input version of verbatimtab
+\newread\verbtab@in \newif\ifverbtab@ok
+\def\verbatimtabinput{%
+ \@ifnextchar[{\@verbatimtabinput}{\@verbatimtabinput[\the\verbatimtabsize]}}
+{\catcode`\~=\active \lccode`\~=`\^^M \lccode`\N=`\N
+ \lowercase{%
+ \gdef\@verbatimtabinput[#1]#2{\begingroup
+ \do@verbatimtab{#1}{%
+ \@verbatim\frenchspacing\@vobeyspaces\@vobeytabs}%
+ \def\verbatim@addtoline##1~{%
+ \verbatim@line\expandafter{\the\verbatim@line##1}}%
+ \openin\verbtab@in=#2
+ \ifeof\verbtab@in\typeout{No file #2.}\else
+ \verbtab@oktrue
+ \loop
+ \read\verbtab@in to \verbtab@line
+ \ifeof\verbtab@in\verbtab@okfalse\else
+ \expandafter\verbatim@addtoline\verbtab@line
+ \verbatim@processline
+ \verbatim@startline
+ \fi
+ \ifverbtab@ok\repeat
+ \closein\verbtab@in\fi
+ \endtrivlist\endgroup\@doendpe}}}
9 docs/src/users_guide.aux
@@ -0,0 +1,9 @@
+\relax
+\@input{introduction.aux}
+\@input{gettingStarted.aux}
+\@input{TemplateObjects.aux}
+\@input{TDL.aux}
+\@input{macros.aux}
+\@input{webware.aux}
+\@input{customizing.aux}
+\@input{examples.aux}
110 docs/src/users_guide.how
@@ -0,0 +1,110 @@
++++ TEXINPUTS=/home/tavis/Cheetah/docs/src:/home/tavis/tmp/Python-2.1/Doc/paper-letter:/home/tavis/tmp/Python-2.1/Doc/texinputs::::~/.TeX:/usr/doc/.TeX:/usr/doc/.TeX::~/.TeX:/usr/doc/.TeX:/usr/doc/.TeX::~/.TeX:/usr/doc/.TeX:/usr/doc/.TeX:
++++ pdflatex users_guide
+This is pdfTeX, Version 3.14159-13d (Web2C 7.3.1)
+(/home/tavis/Cheetah/docs/src/users_guide.tex[/var/lib/texmf/pdftex/config/pdft
+ex.cfg]
+LaTeX2e <1999/12/01> patch level 1
+Babel <v3.6Z> and hyphenation patterns for american, french, german, ngerman, n
+ohyphenation, loaded.
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/howto.cls
+Document Class: howto 1998/02/25 Document class (Python HOWTO)
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/pypaper.sty
+(/usr/share/texmf/tex/latex/psnfss/times.sty)
+Using Times instead of Computer Modern.
+) (/usr/share/texmf/tex/latex/base/article.cls
+Document Class: article 1999/09/10 v1.4a Standard LaTeX document class
+(/usr/share/texmf/tex/latex/base/size10.clo))
+(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty)
+Using fancier footers than usual.
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/python.sty
+(/usr/share/texmf/tex/latex/tools/longtable.sty)
+(/usr/share/texmf/pdftex/plain/misc/pdfcolor.tex)
+(/usr/share/texmf/tex/latex/tools/verbatim.sty)
+(/usr/share/texmf/tex/latex/base/alltt.sty)))
+(/home/tavis/Cheetah/docs/src/moreverb.sty
+Package: `moreverb' v2.0 <1994/12/13> (RF, after AJCD and RmS)
+)
+No file users_guide.aux.
+(/usr/share/texmf/tex/latex/psnfss/ot1ptm.fd)
+Underfull \hbox (badness 10000) in paragraph at lines 11--11
+
+(/usr/share/texmf/tex/latex/psnfss/ot1phv.fd)
+No file users_guide.toc.
+(/usr/share/texmf/tex/latex/psnfss/omsptm.fd)
+Underfull \hbox (badness 10000) has occurred while \output is active
+[]
+[1[/var/lib/texmf/dvips/config/pdftex.map]]
+(/home/tavis/Cheetah/docs/src/introduction.tex [2] [3]
+
+LaTeX Warning: Reference `macros.libraries' on page 4 undefined on input line 1
+80.
+
+) [4] (/home/tavis/Cheetah/docs/src/gettingStarted.tex
+(/usr/share/texmf/tex/latex/psnfss/ot1pcr.fd)) [5] [6]
+(/home/tavis/Cheetah/docs/src/TemplateObjects.tex) [7]
+(/home/tavis/Cheetah/docs/src/TDL.tex [8]
+
+LaTeX Warning: Reference `webware' on page 9 undefined on input line 106.
+
+[9]
+
+LaTeX Warning: Reference `customizing' on page 10 undefined on input line 160.
+
+[10] [11] [12]) [13] (/home/tavis/Cheetah/docs/src/macros.tex) [14]
+(/home/tavis/Cheetah/docs/src/webware.tex [15] [16]) [17]
+(/home/tavis/Cheetah/docs/src/customizing.tex) [18]
+(/home/tavis/Cheetah/docs/src/examples.tex) [19]
+(/home/tavis/Cheetah/docs/src/users_guide.aux
+(/home/tavis/Cheetah/docs/src/introduction.aux)
+(/home/tavis/Cheetah/docs/src/gettingStarted.aux)
+(/home/tavis/Cheetah/docs/src/TemplateObjects.aux)
+(/home/tavis/Cheetah/docs/src/TDL.aux) (/home/tavis/Cheetah/docs/src/macros.aux
+) (/home/tavis/Cheetah/docs/src/webware.aux)
+(/home/tavis/Cheetah/docs/src/customizing.aux)
+(/home/tavis/Cheetah/docs/src/examples.aux))
+
+LaTeX Warning: There were undefined references.
+
+
+LaTeX Warning: Label(s) may have changed. Rerun to get cross-references right.
+
+ )
+(see the transcript file for additional information)<8r.enc><cmsy10.pfb>
+Output written on users_guide.pdf (19 pages, 44632 bytes).
+Transcript written on users_guide.log.
++++ pdflatex users_guide
+This is pdfTeX, Version 3.14159-13d (Web2C 7.3.1)
+(/home/tavis/Cheetah/docs/src/users_guide.tex[/var/lib/texmf/pdftex/config/pdft
+ex.cfg]
+LaTeX2e <1999/12/01> patch level 1
+Babel <v3.6Z> and hyphenation patterns for american, french, german, ngerman, n
+ohyphenation, loaded.
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/howto.cls
+Document Class: howto 1998/02/25 Document class (Python HOWTO)
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/pypaper.sty
+(/usr/share/texmf/tex/latex/psnfss/times.sty)
+Using Times instead of Computer Modern.
+) (/usr/share/texmf/tex/latex/base/article.cls
+Document Class: article 1999/09/10 v1.4a Standard LaTeX document class
+(/usr/share/texmf/tex/latex/base/size10.clo))
+(/usr/share/texmf/tex/latex/fancyhdr/fancyhdr.sty)
+Using fancier footers than usual.
+(/home/tavis/tmp/Python-2.1/Doc/texinputs/python.sty
+(/usr/share/texmf/tex/latex/tools/longtable.sty)
+(/usr/share/texmf/pdftex/plain/misc/pdfcolor.tex)
+(/usr/share/texmf/tex/latex/tools/verbatim.sty)
+(/usr/share/texmf/tex/latex/base/alltt.sty)
+! Interruption.
+\@argdef ...fdefinable #1{\@yargdef #1\@ne {#2}{#3
+ }}
+l.634 }{\end{fulllineitems}}
+
+?
+! Emergency stop.
+\@argdef ...fdefinable #1{\@yargdef #1\@ne {#2}{#3
+ }}
+l.634 }{\end{fulllineitems}}
+
+! ==> Fatal error occurred, the output PDF file not finished!
+Transcript written on users_guide.log.
+*** Session transcript and error messages are in users_guide.how.
4 docs/src/users_guide.ind
@@ -0,0 +1,4 @@
+\
+\begin{theindex}
+\label{genindex}
+\end{theindex}
606 docs/src/users_guide.l2h
@@ -0,0 +1,606 @@
+package main;
+push (@INC, '/home/tavis/tmp/Python-2.1/Doc/perl');
+$mydir = '/home/tavis/tmp/Python-2.1/Doc/perl';
+# LaTeX2HTML support base for use with Python documentation.
+
+package main;
+
+use L2hos;
+
+$HTML_VERSION = 4.0;
+
+$MAX_LINK_DEPTH = 2;
+$ADDRESS = '';
+
+$NO_FOOTNODE = 1;
+$NUMBERED_FOOTNOTES = 1;
+
+# Python documentation uses section numbers to support references to match
+# in the printed and online versions.
+#
+$SHOW_SECTION_NUMBERS = 1;
+
+$ICONSERVER = '../icons';
+$IMAGE_TYPE = 'gif';
+
+# Control where the navigation bars should show up:
+$TOP_NAVIGATION = 1;
+$BOTTOM_NAVIGATION = 1;
+$AUTO_NAVIGATION = 0;
+
+$BODYTEXT = '';
+$CHILDLINE = "\n<p><hr>\n";
+$VERBOSITY = 0;
+
+# default # of columns for the indexes
+$INDEX_COLUMNS = 2;
+$MODULE_INDEX_COLUMNS = 4;
+
+
+# A little painful, but lets us clean up the top level directory a little,
+# and not be tied to the current directory (as far as I can tell). Testing
+# an existing definition of $mydir is needed since it cannot be computed when
+# run under mkhowto with recent versions of LaTeX2HTML, since this file is
+# not read directly by LaTeX2HTML any more. mkhowto is required to prepend
+# the required definition at the top of the actual input file.
+#
+if (!defined $mydir) {
+ use Cwd;
+ use File::Basename;
+ ($myname, $mydir, $myext) = fileparse(__FILE__, '\..*');
+ chop $mydir; # remove trailing '/'
+ $mydir = getcwd() . "$dd$mydir"
+ unless $mydir =~ s|^/|/|;
+}
+$LATEX2HTMLSTYLES = "$mydir$envkey$LATEX2HTMLSTYLES";
+push (@INC, $mydir);
+
+($myrootname, $myrootdir, $myext) = fileparse($mydir, '\..*');
+chop $myrootdir;
+
+
+# Hackish way to get the appropriate paper-*/ directory into $TEXINPUTS;
+# pass in the paper size (a4 or letter) as the environment variable PAPER
+# to add the right directory. If not given, the current directory is
+# added instead for use with HOWTO processing.
+#
+if (defined $ENV{'PAPER'}) {
+ $mytexinputs = "$myrootdir${dd}paper-$ENV{'PAPER'}$envkey";
+}
+else {
+ $mytexinputs = getcwd() . $envkey;
+}
+$mytexinputs .= "$myrootdir${dd}texinputs";
+
+
+# Change this variable to change the text added in "About this document...";
+# this should be an absolute pathname to get it right.
+#
+$ABOUT_FILE = "$myrootdir${dd}html${dd}stdabout.dat";
+
+
+sub custom_driver_hook {
+ #
+ # This adds the directory of the main input file to $TEXINPUTS; it
+ # seems to be sufficiently general that it should be fine for HOWTO
+ # processing.
+ #
+ my $file = @_[0];
+ my($jobname, $dir, $ext) = fileparse($file, '\..*');
+ $dir = L2hos->Make_directory_absolute($dir);
+ $dir =~ s/$dd$//;
+ $TEXINPUTS = "$dir$envkey$mytexinputs";
+ print "\nAdding $dir to \$TEXINPUTS\n";
+}
+
+
+$CUSTOM_BUTTONS = '';
+
+sub make_nav_sectref {
+ my($label,$title) = @_;
+ if ($title) {
+ if ($title =~ /\<[aA] /) {
+ $title =~ s/\<[aA] /<a class="sectref" /;
+ }
+ else {
+ $title = "<span class=\"sectref\">$title</span>";
+ }
+ return "<b class=\"navlabel\">$label:</b> $title\n";
+ }
+ return '';
+}
+
+@my_icon_tags = ();
+$my_icon_tags{'next'} = 'Next Page';
+$my_icon_tags{'next_page'} = 'Next Page';
+$my_icon_tags{'previous'} = 'Previous Page';
+$my_icon_tags{'previous_page'} = 'Previous Page';
+$my_icon_tags{'up'} = 'Up One Level';
+$my_icon_tags{'contents'} = 'Contents';
+$my_icon_tags{'index'} = 'Index';
+$my_icon_tags{'modules'} = 'Module Index';
+
+@my_icon_names = ();
+$my_icon_names{'previous_page'} = 'previous';
+$my_icon_names{'next_page'} = 'next';
+
+sub get_my_icon {
+ my $name = @_[0];
+ my $text = $my_icon_tags{$name};
+ if ($my_icon_names{$name}) {
+ $name = $my_icon_names{$name};
+ }
+ if ($text eq '') {
+ $name = 'blank';
+ }
+ my $iconserver = ($ICONSERVER eq '.') ? '' : "$ICONSERVER/";
+ return "<img src=\"$iconserver$name.$IMAGE_TYPE\"\n border=\"0\""
+ . " height=\"32\"\n alt=\"$text\" width=\"32\">";
+}
+
+sub use_my_icon {
+ my $s = @_[0];
+ if ($s =~ /\<tex2html_([a-z_]+)_visible_mark\>/) {
+ my $r = get_my_icon($1);
+ $s =~ s/\<tex2html_[a-z_]+_visible_mark\>/$r/;
+ }
+ return $s;
+}
+
+sub make_nav_panel {
+ my $s;
+ my $BLANK_ICON = get_my_icon('blank');
+ $NEXT = $NEXT_TITLE ? use_my_icon("$NEXT") : $BLANK_ICON;
+ $UP = $UP_TITLE ? use_my_icon("$UP") : $BLANK_ICON;
+ $PREVIOUS = $PREVIOUS_TITLE ? use_my_icon("$PREVIOUS") : $BLANK_ICON;
+ $CONTENTS = use_my_icon("$CONTENTS");
+ $INDEX = $INDEX ? use_my_icon("$INDEX") : $BLANK_ICON;
+ if (!$CUSTOM_BUTTONS) {
+ $CUSTOM_BUTTONS = $BLANK_ICON;
+ }
+ $s = ('<table align="center" width="100%" cellpadding="0" cellspacing="2">'
+ . "\n<tr>"
+ # left-hand side
+ . "\n<td>$PREVIOUS</td>"
+ . "\n<td>$UP</td>"
+ . "\n<td>$NEXT</td>"
+ # title box
+ . "\n<td align=\"center\" width=\"100%\">$t_title</td>"
+ # right-hand side
+ . "\n<td>$CONTENTS</td>"
+ . "\n<td>$CUSTOM_BUTTONS</td>" # module index
+ . "\n<td>$INDEX</td>"
+ . "\n</tr></table>\n"
+ # textual navigation
+ . make_nav_sectref("Previous", $PREVIOUS_TITLE)
+ . make_nav_sectref("Up", $UP_TITLE)
+ . make_nav_sectref("Next", $NEXT_TITLE)
+ );
+ # remove these; they are unnecessary and cause errors from validation
+ $s =~ s/ NAME="tex2html\d+"\n */ /g;
+ return $s;
+}
+
+sub get_version_text {
+ if ($PACKAGE_VERSION ne '' && $t_date) {
+ return ("<span class=\"release-info\">"
+ . "Release $PACKAGE_VERSION,"
+ . " documentation updated on $t_date.</span>");
+ }
+ if ($PACKAGE_VERSION ne '') {
+ return ("<span class=\"release-info\">"
+ . "Release $PACKAGE_VERSION.</span>");
+ }
+ if ($t_date) {
+ return ("<span class=\"release-info\">Documentation released on "
+ . "$t_date.</span>");
+ }
+ return '';
+}
+
+
+sub top_navigation_panel {
+ return "\n"
+ . make_nav_panel()
+ . "<br><hr>\n";
+}
+
+sub bot_navigation_panel {
+ return "\n<p><hr>\n"
+ . make_nav_panel()
+ . "<hr>\n"
+ . get_version_text()
+ . "\n";
+}
+
+sub add_link {
+ # Returns a pair (iconic link, textual link)
+ my($icon, $current_file, @link) = @_;
+ my($dummy, $file, $title) = split($delim,
+ $section_info{join(' ',@link)});
+ if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) {
+ my $r = get_my_icon($1);
+ $icon =~ s/\<tex2html_[_a-z]+_visible_mark\>/$r/;
+ }
+ if ($title && ($file ne $current_file)) {
+ $title = purify($title);
+ $title = get_first_words($title, $WORDS_IN_NAVIGATION_PANEL_TITLES);
+ return (make_href($file, $icon), make_href($file, "$title"))
+ }
+ elsif ($icon eq get_my_icon('up') && $EXTERNAL_UP_LINK) {
+ return (make_href($EXTERNAL_UP_LINK, $icon),
+ make_href($EXTERNAL_UP_LINK, "$EXTERNAL_UP_TITLE"))
+ }
+ elsif ($icon eq get_my_icon('previous')
+ && $EXTERNAL_PREV_LINK && $EXTERNAL_PREV_TITLE) {
+ return (make_href($EXTERNAL_PREV_LINK, $icon),
+ make_href($EXTERNAL_PREV_LINK, "$EXTERNAL_PREV_TITLE"))
+ }
+ elsif ($icon eq get_my_icon('next')
+ && $EXTERNAL_DOWN_LINK && $EXTERNAL_DOWN_TITLE) {
+ return (make_href($EXTERNAL_DOWN_LINK, $icon),
+ make_href($EXTERNAL_DOWN_LINK, "$EXTERNAL_DOWN_TITLE"))
+ }
+ return (&inactive_img($icon), "");
+}
+
+sub add_special_link {
+ my($icon, $file, $current_file) = @_;
+ if ($icon =~ /\<tex2html_([_a-z]+)_visible_mark\>/) {
+ my $r = get_my_icon($1);
+ $icon =~ s/\<tex2html_[_a-z]+_visible_mark\>/$r/;
+ }
+ return (($file && ($file ne $current_file))
+ ? make_href($file, $icon)
+ : undef)
+}
+
+# The img_tag() function seems only to be called with the parameter
+# 'anchor_invisible_mark', which we want to turn into ''. Since
+# replace_icon_marks() is the only interesting caller, and all it really
+# does is call img_tag(), we can just define the hook alternative to be
+# a no-op instead.
+#
+sub replace_icons_hook {}
+
+sub do_cmd_arabic {
+ # get rid of that nasty <SPAN CLASS="arabic">...</SPAN>
+ my($ctr, $val, $id, $text) = &read_counter_value(@_[0]);
+ return ($val ? farabic($val) : "0") . $text;
+}
+
+
+sub gen_index_id {
+ # this is used to ensure common index key generation and a stable sort
+ my($str,$extra) = @_;
+ sprintf('%s###%s%010d', $str, $extra, ++$global{'max_id'});
+}
+
+sub insert_index {
+ my($mark,$datafile,$columns,$letters,$prefix) = @_;
+ my $prog = "$myrootdir/tools/buildindex.py";
+ my $index;
+ if ($letters) {
+ $index = `$prog --columns $columns --letters $datafile`;
+ }
+ else {
+ $index = `$prog --columns $columns $datafile`;
+ }
+ if (!s/$mark/$prefix$index/) {
+ print "\nCould not locate index mark: $mark";
+ }
+}
+
+sub add_idx {
+ print "\nBuilding HTML for the index ...";
+ close(IDXFILE);
+ insert_index($idx_mark, 'index.dat', $INDEX_COLUMNS, 1, '');
+}
+
+
+$idx_module_mark = '<tex2html_idx_module_mark>';
+$idx_module_title = 'Module Index';
+
+sub add_module_idx {
+ print "\nBuilding HTML for the module index ...";
+ my $key;
+ my $first = 1;
+ my $prevplat = '';
+ my $allthesame = 1;
+ my $prefix = '';
+ foreach $key (keys %Modules) {
+ $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/\1/;
+ my $plat = "$ModulePlatforms{$key}";
+ $plat = ''
+ if ($plat eq $IGNORE_PLATFORM_ANNOTATION);
+ if (!$first) {
+ $allthesame = 0
+ if ($prevplat ne $plat);
+ }
+ else { $first = 0; }
+ $prevplat = $plat;
+ }
+ open(MODIDXFILE, '>modindex.dat') || die "\n$!\n";
+ foreach $key (keys %Modules) {
+ # dump the line in the data file; just use a dummy seqno field
+ my $nkey = $1;
+ my $moditem = "$Modules{$key}";
+ my $plat = '';
+ $key =~ s/<tt>([a-zA-Z0-9._]*)<\/tt>/\1/;
+ if ($ModulePlatforms{$key} && !$allthesame) {
+ $plat = (" <em>(<span class='platform'>$ModulePlatforms{$key}"
+ . '</span>)</em>');
+ }
+ print MODIDXFILE $moditem . $IDXFILE_FIELD_SEP
+ . "<tt class='module'>$key</tt>$plat###\n";
+ }
+ close(MODIDXFILE);
+
+ if ($GLOBAL_MODULE_INDEX) {
+ $prefix = <<MODULE_INDEX_PREFIX;
+
+<p> This index only lists modules documented in this manual.
+ The <em class="citetitle"><a href="$GLOBAL_MODULE_INDEX">Global Module
+ Index</a></em> lists all modules that are documented in this set
+ of manuals.</p>
+MODULE_INDEX_PREFIX
+ }
+ if (!$allthesame) {
+ $prefix .= <<PLAT_DISCUSS;
+
+<p> Some module names are followed by an annotation indicating what
+platform they are available on.</p>
+
+PLAT_DISCUSS
+ }
+ insert_index($idx_module_mark, 'modindex.dat', $MODULE_INDEX_COLUMNS, 0,
+ $prefix);
+}
+
+# replace both indexes as needed:
+sub add_idx_hook {
+ add_idx() if (/$idx_mark/);
+ process_python_state();
+ if ($MODULE_INDEX_FILE) {
+ local ($_);
+ open(MYFILE, "<$MODULE_INDEX_FILE");
+ sysread(MYFILE, $_, 1024*1024);
+ close(MYFILE);
+ add_module_idx();
+ open(MYFILE,">$MODULE_INDEX_FILE");
+ print MYFILE $_;
+ close(MYFILE);
+ }
+}
+
+
+# In addition to the standard stuff, add label to allow named node files and
+# support suppression of the page complete (for HTML Help use).
+sub do_cmd_tableofcontents {
+ local($_) = @_;
+ $TITLE = $toc_title;
+ $tocfile = $CURRENT_FILE;
+ my($closures,$reopens) = preserve_open_tags();
+ anchor_label('contents', $CURRENT_FILE, $_); # this is added
+ join('', "<BR>\n\\tableofchildlinks[off]", $closures
+ , make_section_heading($toc_title, 'H2'), $toc_mark
+ , $reopens, $_);
+}
+# In addition to the standard stuff, add label to allow named node files.
+sub do_cmd_listoffigures {
+ local($_) = @_;
+ $TITLE = $lof_title;
+ $loffile = $CURRENT_FILE;
+ my($closures,$reopens) = preserve_open_tags();
+ anchor_label('lof', $CURRENT_FILE, $_); # this is added
+ join('', "<BR>\n", $closures
+ , make_section_heading($lof_title, 'H2'), $lof_mark
+ , $reopens, $_);
+}
+# In addition to the standard stuff, add label to allow named node files.
+sub do_cmd_listoftables {
+ local($_) = @_;
+ $TITLE = $lot_title;
+ $lotfile = $CURRENT_FILE;
+ my($closures,$reopens) = preserve_open_tags();
+ anchor_label('lot', $CURRENT_FILE, $_); # this is added
+ join('', "<BR>\n", $closures
+ , make_section_heading($lot_title, 'H2'), $lot_mark
+ , $reopens, $_);
+}
+# In addition to the standard stuff, add label to allow named node files.
+sub do_cmd_textohtmlinfopage {
+ local($_) = @_;
+ if ($INFO) { #
+ anchor_label("about",$CURRENT_FILE,$_); # this is added
+ } #
+ my $the_version = ''; # and the rest is
+ if ($t_date) { # mostly ours
+ $the_version = ",\n$t_date";
+ if ($PACKAGE_VERSION) {
+ $the_version .= ", Release $PACKAGE_VERSION";
+ }
+ }
+ $_ = (($INFO == 1)
+ ? join('',
+ $close_all,
+ "<strong>$t_title</strong>$the_version\n",
+ `cat $ABOUT_FILE`,
+ $open_all, $_)
+ : join('', $close_all, $INFO,"\n", $open_all, $_));
+ $_;
+}
+
+# $idx_mark will be replaced with the real index at the end
+sub do_cmd_textohtmlindex {
+ local($_) = @_;
+ $TITLE = $idx_title;
+ $idxfile = $CURRENT_FILE;
+ if (%index_labels) { make_index_labels(); }
+ if (($SHORT_INDEX) && (%index_segment)) { make_preindex(); }
+ else { $preindex = ''; }
+ my $heading = make_section_heading($idx_title, 'h2') . $idx_mark;
+ my($pre,$post) = minimize_open_tags($heading);
+ anchor_label('genindex',$CURRENT_FILE,$_); # this is added
+ return "<br>\n" . $pre . $_;
+}
+
+$MODULE_INDEX_FILE = '';
+
+# $idx_module_mark will be replaced with the real index at the end
+sub do_cmd_textohtmlmoduleindex {
+ local($_) = @_;
+ $TITLE = $idx_module_title;
+ anchor_label('modindex', $CURRENT_FILE, $_);
+ $MODULE_INDEX_FILE = "$CURRENT_FILE";
+ $_ = ('<p>' . make_section_heading($idx_module_title, 'h2')