Commit 7f6e2c45 authored by Fred Drake's avatar Fred Drake

Use "\samp{...}" instead of "``\code{...}''" when showing markup fragments

in the running text.

For computed attribute and method names (where there's a \var{} part to
the name), use the non-indexing forms of \datadesc{} and \funcdesc{}.
This doesn't change the printed output, but removes 3 rejections from the
makeindex run and allows the LaTeX2HTML support to exclude these from the
index.
parent b441eb84
...@@ -94,7 +94,7 @@ nothing. ...@@ -94,7 +94,7 @@ nothing.
\begin{funcdesc}{handle_charref}{ref} \begin{funcdesc}{handle_charref}{ref}
This method is called to process a character reference of the form This method is called to process a character reference of the form
``\code{\&\#\var{ref};}''. \var{ref} can either be a decimal number, \samp{\&\#\var{ref};}. \var{ref} can either be a decimal number,
or a hexadecimal number when preceded by \code{x}. or a hexadecimal number when preceded by \code{x}.
In the base implementation, \var{ref} must be a number in the In the base implementation, \var{ref} must be a number in the
range 0-255. It translates the character to \ASCII{} and calls the range 0-255. It translates the character to \ASCII{} and calls the
...@@ -107,7 +107,7 @@ references outside of the \ASCII{} range. ...@@ -107,7 +107,7 @@ references outside of the \ASCII{} range.
\begin{funcdesc}{handle_entityref}{ref} \begin{funcdesc}{handle_entityref}{ref}
This method is called to process a general entity reference of the form This method is called to process a general entity reference of the form
``\code{\&\var{ref};}'' where \var{ref} is an general entity \samp{\&\var{ref};} where \var{ref} is an general entity
reference. It looks for \var{ref} in the instance (or class) reference. It looks for \var{ref} in the instance (or class)
variable \code{entitydefs} which should be a mapping from entity names variable \code{entitydefs} which should be a mapping from entity names
to corresponding translations. to corresponding translations.
...@@ -121,8 +121,8 @@ defines translations for \code{\&}, \code{\&apos}, \code{\>}, ...@@ -121,8 +121,8 @@ defines translations for \code{\&}, \code{\&apos}, \code{\>},
\begin{funcdesc}{handle_comment}{comment} \begin{funcdesc}{handle_comment}{comment}
This method is called when a comment is encountered. The This method is called when a comment is encountered. The
\code{comment} argument is a string containing the text between the \code{comment} argument is a string containing the text between the
``\code{<!--}'' and ``\code{-->}'' delimiters, but not the delimiters \samp{<!--} and \samp{-->} delimiters, but not the delimiters
themselves. For example, the comment ``\code{<!--text-->}'' will themselves. For example, the comment \samp{<!--text-->} will
cause this method to be called with the argument \code{'text'}. The cause this method to be called with the argument \code{'text'}. The
default method does nothing. default method does nothing.
\end{funcdesc} \end{funcdesc}
...@@ -130,8 +130,8 @@ default method does nothing. ...@@ -130,8 +130,8 @@ default method does nothing.
\begin{funcdesc}{handle_cdata}{data} \begin{funcdesc}{handle_cdata}{data}
This method is called when a CDATA element is encountered. The This method is called when a CDATA element is encountered. The
\code{data} argument is a string containing the text between the \code{data} argument is a string containing the text between the
``\code{<![CDATA[}'' and ``\code{]]>}'' delimiters, but not the delimiters \samp{<![CDATA[} and \samp{]]>} delimiters, but not the delimiters
themselves. For example, the entity ``\code{<![CDATA[text]]>}'' will themselves. For example, the entity \samp{<![CDATA[text]]>} will
cause this method to be called with the argument \code{'text'}. The cause this method to be called with the argument \code{'text'}. The
default method does nothing. default method does nothing.
\end{funcdesc} \end{funcdesc}
...@@ -141,7 +141,7 @@ This method is called when a processing instruction (PI) is encountered. The ...@@ -141,7 +141,7 @@ This method is called when a processing instruction (PI) is encountered. The
\code{name} is the PI target, and the \code{data} argument is a \code{name} is the PI target, and the \code{data} argument is a
string containing the text between the PI target and the closing delimiter, string containing the text between the PI target and the closing delimiter,
but not the delimiter itself. For example, the instruction but not the delimiter itself. For example, the instruction
``\code{<?XML text?>}'' will cause this method to be called with the \samp{<?XML text?>} will cause this method to be called with the
arguments \code{'XML'} and \code{'text'}. The default method does arguments \code{'XML'} and \code{'text'}. The default method does
nothing. Note that if a document starts with a \code{<?xml ...?>} nothing. Note that if a document starts with a \code{<?xml ...?>}
tag, \code{handle_xml} is called to handle it. tag, \code{handle_xml} is called to handle it.
...@@ -150,8 +150,8 @@ tag, \code{handle_xml} is called to handle it. ...@@ -150,8 +150,8 @@ tag, \code{handle_xml} is called to handle it.
\begin{funcdesc}{handle_special}{data} \begin{funcdesc}{handle_special}{data}
This method is called when a declaration is encountered. The This method is called when a declaration is encountered. The
\code{data} argument is a string containing the text between the \code{data} argument is a string containing the text between the
``\code{<!}'' and ``\code{>}'' delimiters, but not the delimiters \samp{<!} and \samp{>} delimiters, but not the delimiters
themselves. For example, the entity ``\code{<!ENTITY text>}'' will themselves. For example, the entity \samp{<!ENTITY text>} will
cause this method to be called with the argument \code{'ENTITY text'}. The cause this method to be called with the argument \code{'ENTITY text'}. The
default method does nothing. Note that \code{<!DOCTYPE ...>} is default method does nothing. Note that \code{<!DOCTYPE ...>} is
handled separately if it is located at the start of the document. handled separately if it is located at the start of the document.
...@@ -196,18 +196,18 @@ define processing of specific tags. Tag names in the input stream are ...@@ -196,18 +196,18 @@ define processing of specific tags. Tag names in the input stream are
case dependent; the \var{tag} occurring in method names must be in the case dependent; the \var{tag} occurring in method names must be in the
correct case: correct case:
\begin{funcdesc}{start_\var{tag}}{attributes} \begin{funcdescni}{start_\var{tag}}{attributes}
This method is called to process an opening tag \var{tag}. The This method is called to process an opening tag \var{tag}. The
\var{attributes} argument has the same meaning as described for \var{attributes} argument has the same meaning as described for
\code{handle_starttag()} above. In fact, the base implementation of \code{handle_starttag()} above. In fact, the base implementation of
\code{handle_starttag} calls this method. \code{handle_starttag()} calls this method.
\end{funcdesc} \end{funcdescni}
\begin{funcdesc}{end_\var{tag}}{} \begin{funcdescni}{end_\var{tag}}{}
This method is called to process a closing tag \var{tag}. This method is called to process a closing tag \var{tag}.
\end{funcdesc} \end{funcdescni}
\begin{datadesc}{\var{tag}_attributes} \begin{datadescni}{\var{tag}_attributes}
If a class or instance variable \code{\var{tag}_attributes} exists, it If a class or instance variable \code{\var{tag}_attributes} exists, it
should be a list or a dictionary. If a list, the elements of the list should be a list or a dictionary. If a list, the elements of the list
are the valid attributes for the element \var{tag}; if a dictionary, are the valid attributes for the element \var{tag}; if a dictionary,
...@@ -215,7 +215,7 @@ the keys are the valid attributes for the element \var{tag}, and the ...@@ -215,7 +215,7 @@ the keys are the valid attributes for the element \var{tag}, and the
values the default values of the attributes, or \code{None} if there values the default values of the attributes, or \code{None} if there
is no default. is no default.
In addition to the attributes that were present in the tag, the In addition to the attributes that were present in the tag, the
attribute dictionary that is passed to \code{handle_starttag} and attribute dictionary that is passed to \code{handle_starttag()} and
\code{unknown_starttag} contains values for all attributes that have a \code{unknown_starttag()} contains values for all attributes that have a
default value. default value.
\end{datadesc} \end{datadescni}
...@@ -94,7 +94,7 @@ nothing. ...@@ -94,7 +94,7 @@ nothing.
\begin{funcdesc}{handle_charref}{ref} \begin{funcdesc}{handle_charref}{ref}
This method is called to process a character reference of the form This method is called to process a character reference of the form
``\code{\&\#\var{ref};}''. \var{ref} can either be a decimal number, \samp{\&\#\var{ref};}. \var{ref} can either be a decimal number,
or a hexadecimal number when preceded by \code{x}. or a hexadecimal number when preceded by \code{x}.
In the base implementation, \var{ref} must be a number in the In the base implementation, \var{ref} must be a number in the
range 0-255. It translates the character to \ASCII{} and calls the range 0-255. It translates the character to \ASCII{} and calls the
...@@ -107,7 +107,7 @@ references outside of the \ASCII{} range. ...@@ -107,7 +107,7 @@ references outside of the \ASCII{} range.
\begin{funcdesc}{handle_entityref}{ref} \begin{funcdesc}{handle_entityref}{ref}
This method is called to process a general entity reference of the form This method is called to process a general entity reference of the form
``\code{\&\var{ref};}'' where \var{ref} is an general entity \samp{\&\var{ref};} where \var{ref} is an general entity
reference. It looks for \var{ref} in the instance (or class) reference. It looks for \var{ref} in the instance (or class)
variable \code{entitydefs} which should be a mapping from entity names variable \code{entitydefs} which should be a mapping from entity names
to corresponding translations. to corresponding translations.
...@@ -121,8 +121,8 @@ defines translations for \code{\&amp;}, \code{\&apos}, \code{\&gt;}, ...@@ -121,8 +121,8 @@ defines translations for \code{\&amp;}, \code{\&apos}, \code{\&gt;},
\begin{funcdesc}{handle_comment}{comment} \begin{funcdesc}{handle_comment}{comment}
This method is called when a comment is encountered. The This method is called when a comment is encountered. The
\code{comment} argument is a string containing the text between the \code{comment} argument is a string containing the text between the
``\code{<!--}'' and ``\code{-->}'' delimiters, but not the delimiters \samp{<!--} and \samp{-->} delimiters, but not the delimiters
themselves. For example, the comment ``\code{<!--text-->}'' will themselves. For example, the comment \samp{<!--text-->} will
cause this method to be called with the argument \code{'text'}. The cause this method to be called with the argument \code{'text'}. The
default method does nothing. default method does nothing.
\end{funcdesc} \end{funcdesc}
...@@ -130,8 +130,8 @@ default method does nothing. ...@@ -130,8 +130,8 @@ default method does nothing.
\begin{funcdesc}{handle_cdata}{data} \begin{funcdesc}{handle_cdata}{data}
This method is called when a CDATA element is encountered. The This method is called when a CDATA element is encountered. The
\code{data} argument is a string containing the text between the \code{data} argument is a string containing the text between the
``\code{<![CDATA[}'' and ``\code{]]>}'' delimiters, but not the delimiters \samp{<![CDATA[} and \samp{]]>} delimiters, but not the delimiters
themselves. For example, the entity ``\code{<![CDATA[text]]>}'' will themselves. For example, the entity \samp{<![CDATA[text]]>} will
cause this method to be called with the argument \code{'text'}. The cause this method to be called with the argument \code{'text'}. The
default method does nothing. default method does nothing.
\end{funcdesc} \end{funcdesc}
...@@ -141,7 +141,7 @@ This method is called when a processing instruction (PI) is encountered. The ...@@ -141,7 +141,7 @@ This method is called when a processing instruction (PI) is encountered. The
\code{name} is the PI target, and the \code{data} argument is a \code{name} is the PI target, and the \code{data} argument is a
string containing the text between the PI target and the closing delimiter, string containing the text between the PI target and the closing delimiter,
but not the delimiter itself. For example, the instruction but not the delimiter itself. For example, the instruction
``\code{<?XML text?>}'' will cause this method to be called with the \samp{<?XML text?>} will cause this method to be called with the
arguments \code{'XML'} and \code{'text'}. The default method does arguments \code{'XML'} and \code{'text'}. The default method does
nothing. Note that if a document starts with a \code{<?xml ...?>} nothing. Note that if a document starts with a \code{<?xml ...?>}
tag, \code{handle_xml} is called to handle it. tag, \code{handle_xml} is called to handle it.
...@@ -150,8 +150,8 @@ tag, \code{handle_xml} is called to handle it. ...@@ -150,8 +150,8 @@ tag, \code{handle_xml} is called to handle it.
\begin{funcdesc}{handle_special}{data} \begin{funcdesc}{handle_special}{data}
This method is called when a declaration is encountered. The This method is called when a declaration is encountered. The
\code{data} argument is a string containing the text between the \code{data} argument is a string containing the text between the
``\code{<!}'' and ``\code{>}'' delimiters, but not the delimiters \samp{<!} and \samp{>} delimiters, but not the delimiters
themselves. For example, the entity ``\code{<!ENTITY text>}'' will themselves. For example, the entity \samp{<!ENTITY text>} will
cause this method to be called with the argument \code{'ENTITY text'}. The cause this method to be called with the argument \code{'ENTITY text'}. The
default method does nothing. Note that \code{<!DOCTYPE ...>} is default method does nothing. Note that \code{<!DOCTYPE ...>} is
handled separately if it is located at the start of the document. handled separately if it is located at the start of the document.
...@@ -196,18 +196,18 @@ define processing of specific tags. Tag names in the input stream are ...@@ -196,18 +196,18 @@ define processing of specific tags. Tag names in the input stream are
case dependent; the \var{tag} occurring in method names must be in the case dependent; the \var{tag} occurring in method names must be in the
correct case: correct case:
\begin{funcdesc}{start_\var{tag}}{attributes} \begin{funcdescni}{start_\var{tag}}{attributes}
This method is called to process an opening tag \var{tag}. The This method is called to process an opening tag \var{tag}. The
\var{attributes} argument has the same meaning as described for \var{attributes} argument has the same meaning as described for
\code{handle_starttag()} above. In fact, the base implementation of \code{handle_starttag()} above. In fact, the base implementation of
\code{handle_starttag} calls this method. \code{handle_starttag()} calls this method.
\end{funcdesc} \end{funcdescni}
\begin{funcdesc}{end_\var{tag}}{} \begin{funcdescni}{end_\var{tag}}{}
This method is called to process a closing tag \var{tag}. This method is called to process a closing tag \var{tag}.
\end{funcdesc} \end{funcdescni}
\begin{datadesc}{\var{tag}_attributes} \begin{datadescni}{\var{tag}_attributes}
If a class or instance variable \code{\var{tag}_attributes} exists, it If a class or instance variable \code{\var{tag}_attributes} exists, it
should be a list or a dictionary. If a list, the elements of the list should be a list or a dictionary. If a list, the elements of the list
are the valid attributes for the element \var{tag}; if a dictionary, are the valid attributes for the element \var{tag}; if a dictionary,
...@@ -215,7 +215,7 @@ the keys are the valid attributes for the element \var{tag}, and the ...@@ -215,7 +215,7 @@ the keys are the valid attributes for the element \var{tag}, and the
values the default values of the attributes, or \code{None} if there values the default values of the attributes, or \code{None} if there
is no default. is no default.
In addition to the attributes that were present in the tag, the In addition to the attributes that were present in the tag, the
attribute dictionary that is passed to \code{handle_starttag} and attribute dictionary that is passed to \code{handle_starttag()} and
\code{unknown_starttag} contains values for all attributes that have a \code{unknown_starttag()} contains values for all attributes that have a
default value. default value.
\end{datadesc} \end{datadescni}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment