Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f6e2c4

Browse files
committed
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.
1 parent b441eb8 commit 7f6e2c4

2 files changed

Lines changed: 36 additions & 36 deletions

File tree

Doc/lib/libxmllib.tex

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ \section{Standard Module \sectcode{xmllib}}
9494
9595
\begin{funcdesc}{handle_charref}{ref}
9696
This method is called to process a character reference of the form
97-
``\code{\&\#\var{ref};}''. \var{ref} can either be a decimal number,
97+
\samp{\&\#\var{ref};}. \var{ref} can either be a decimal number,
9898
or a hexadecimal number when preceded by \code{x}.
9999
In the base implementation, \var{ref} must be a number in the
100100
range 0-255. It translates the character to \ASCII{} and calls the
@@ -107,7 +107,7 @@ \section{Standard Module \sectcode{xmllib}}
107107
108108
\begin{funcdesc}{handle_entityref}{ref}
109109
This method is called to process a general entity reference of the form
110-
``\code{\&\var{ref};}'' where \var{ref} is an general entity
110+
\samp{\&\var{ref};} where \var{ref} is an general entity
111111
reference. It looks for \var{ref} in the instance (or class)
112112
variable \code{entitydefs} which should be a mapping from entity names
113113
to corresponding translations.
@@ -121,17 +121,17 @@ \section{Standard Module \sectcode{xmllib}}
121121
\begin{funcdesc}{handle_comment}{comment}
122122
This method is called when a comment is encountered. The
123123
\code{comment} argument is a string containing the text between the
124-
``\code{<!--}'' and ``\code{-->}'' delimiters, but not the delimiters
125-
themselves. For example, the comment ``\code{<!--text-->}'' will
124+
\samp{<!--} and \samp{-->} delimiters, but not the delimiters
125+
themselves. For example, the comment \samp{<!--text-->} will
126126
cause this method to be called with the argument \code{'text'}. The
127127
default method does nothing.
128128
\end{funcdesc}
129129
130130
\begin{funcdesc}{handle_cdata}{data}
131131
This method is called when a CDATA element is encountered. The
132132
\code{data} argument is a string containing the text between the
133-
``\code{<![CDATA[}'' and ``\code{]]>}'' delimiters, but not the delimiters
134-
themselves. For example, the entity ``\code{<![CDATA[text]]>}'' will
133+
\samp{<![CDATA[} and \samp{]]>} delimiters, but not the delimiters
134+
themselves. For example, the entity \samp{<![CDATA[text]]>} will
135135
cause this method to be called with the argument \code{'text'}. The
136136
default method does nothing.
137137
\end{funcdesc}
@@ -141,7 +141,7 @@ \section{Standard Module \sectcode{xmllib}}
141141
\code{name} is the PI target, and the \code{data} argument is a
142142
string containing the text between the PI target and the closing delimiter,
143143
but not the delimiter itself. For example, the instruction
144-
``\code{<?XML text?>}'' will cause this method to be called with the
144+
\samp{<?XML text?>} will cause this method to be called with the
145145
arguments \code{'XML'} and \code{'text'}. The default method does
146146
nothing. Note that if a document starts with a \code{<?xml ...?>}
147147
tag, \code{handle_xml} is called to handle it.
@@ -150,8 +150,8 @@ \section{Standard Module \sectcode{xmllib}}
150150
\begin{funcdesc}{handle_special}{data}
151151
This method is called when a declaration is encountered. The
152152
\code{data} argument is a string containing the text between the
153-
``\code{<!}'' and ``\code{>}'' delimiters, but not the delimiters
154-
themselves. For example, the entity ``\code{<!ENTITY text>}'' will
153+
\samp{<!} and \samp{>} delimiters, but not the delimiters
154+
themselves. For example, the entity \samp{<!ENTITY text>} will
155155
cause this method to be called with the argument \code{'ENTITY text'}. The
156156
default method does nothing. Note that \code{<!DOCTYPE ...>} is
157157
handled separately if it is located at the start of the document.
@@ -196,26 +196,26 @@ \section{Standard Module \sectcode{xmllib}}
196196
case dependent; the \var{tag} occurring in method names must be in the
197197
correct case:
198198
199-
\begin{funcdesc}{start_\var{tag}}{attributes}
199+
\begin{funcdescni}{start_\var{tag}}{attributes}
200200
This method is called to process an opening tag \var{tag}. The
201201
\var{attributes} argument has the same meaning as described for
202202
\code{handle_starttag()} above. In fact, the base implementation of
203-
\code{handle_starttag} calls this method.
204-
\end{funcdesc}
203+
\code{handle_starttag()} calls this method.
204+
\end{funcdescni}
205205
206-
\begin{funcdesc}{end_\var{tag}}{}
206+
\begin{funcdescni}{end_\var{tag}}{}
207207
This method is called to process a closing tag \var{tag}.
208-
\end{funcdesc}
208+
\end{funcdescni}
209209
210-
\begin{datadesc}{\var{tag}_attributes}
210+
\begin{datadescni}{\var{tag}_attributes}
211211
If a class or instance variable \code{\var{tag}_attributes} exists, it
212212
should be a list or a dictionary. If a list, the elements of the list
213213
are the valid attributes for the element \var{tag}; if a dictionary,
214214
the keys are the valid attributes for the element \var{tag}, and the
215215
values the default values of the attributes, or \code{None} if there
216216
is no default.
217217
In addition to the attributes that were present in the tag, the
218-
attribute dictionary that is passed to \code{handle_starttag} and
219-
\code{unknown_starttag} contains values for all attributes that have a
218+
attribute dictionary that is passed to \code{handle_starttag()} and
219+
\code{unknown_starttag()} contains values for all attributes that have a
220220
default value.
221-
\end{datadesc}
221+
\end{datadescni}

Doc/libxmllib.tex

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ \section{Standard Module \sectcode{xmllib}}
9494
9595
\begin{funcdesc}{handle_charref}{ref}
9696
This method is called to process a character reference of the form
97-
``\code{\&\#\var{ref};}''. \var{ref} can either be a decimal number,
97+
\samp{\&\#\var{ref};}. \var{ref} can either be a decimal number,
9898
or a hexadecimal number when preceded by \code{x}.
9999
In the base implementation, \var{ref} must be a number in the
100100
range 0-255. It translates the character to \ASCII{} and calls the
@@ -107,7 +107,7 @@ \section{Standard Module \sectcode{xmllib}}
107107
108108
\begin{funcdesc}{handle_entityref}{ref}
109109
This method is called to process a general entity reference of the form
110-
``\code{\&\var{ref};}'' where \var{ref} is an general entity
110+
\samp{\&\var{ref};} where \var{ref} is an general entity
111111
reference. It looks for \var{ref} in the instance (or class)
112112
variable \code{entitydefs} which should be a mapping from entity names
113113
to corresponding translations.
@@ -121,17 +121,17 @@ \section{Standard Module \sectcode{xmllib}}
121121
\begin{funcdesc}{handle_comment}{comment}
122122
This method is called when a comment is encountered. The
123123
\code{comment} argument is a string containing the text between the
124-
``\code{<!--}'' and ``\code{-->}'' delimiters, but not the delimiters
125-
themselves. For example, the comment ``\code{<!--text-->}'' will
124+
\samp{<!--} and \samp{-->} delimiters, but not the delimiters
125+
themselves. For example, the comment \samp{<!--text-->} will
126126
cause this method to be called with the argument \code{'text'}. The
127127
default method does nothing.
128128
\end{funcdesc}
129129
130130
\begin{funcdesc}{handle_cdata}{data}
131131
This method is called when a CDATA element is encountered. The
132132
\code{data} argument is a string containing the text between the
133-
``\code{<![CDATA[}'' and ``\code{]]>}'' delimiters, but not the delimiters
134-
themselves. For example, the entity ``\code{<![CDATA[text]]>}'' will
133+
\samp{<![CDATA[} and \samp{]]>} delimiters, but not the delimiters
134+
themselves. For example, the entity \samp{<![CDATA[text]]>} will
135135
cause this method to be called with the argument \code{'text'}. The
136136
default method does nothing.
137137
\end{funcdesc}
@@ -141,7 +141,7 @@ \section{Standard Module \sectcode{xmllib}}
141141
\code{name} is the PI target, and the \code{data} argument is a
142142
string containing the text between the PI target and the closing delimiter,
143143
but not the delimiter itself. For example, the instruction
144-
``\code{<?XML text?>}'' will cause this method to be called with the
144+
\samp{<?XML text?>} will cause this method to be called with the
145145
arguments \code{'XML'} and \code{'text'}. The default method does
146146
nothing. Note that if a document starts with a \code{<?xml ...?>}
147147
tag, \code{handle_xml} is called to handle it.
@@ -150,8 +150,8 @@ \section{Standard Module \sectcode{xmllib}}
150150
\begin{funcdesc}{handle_special}{data}
151151
This method is called when a declaration is encountered. The
152152
\code{data} argument is a string containing the text between the
153-
``\code{<!}'' and ``\code{>}'' delimiters, but not the delimiters
154-
themselves. For example, the entity ``\code{<!ENTITY text>}'' will
153+
\samp{<!} and \samp{>} delimiters, but not the delimiters
154+
themselves. For example, the entity \samp{<!ENTITY text>} will
155155
cause this method to be called with the argument \code{'ENTITY text'}. The
156156
default method does nothing. Note that \code{<!DOCTYPE ...>} is
157157
handled separately if it is located at the start of the document.
@@ -196,26 +196,26 @@ \section{Standard Module \sectcode{xmllib}}
196196
case dependent; the \var{tag} occurring in method names must be in the
197197
correct case:
198198
199-
\begin{funcdesc}{start_\var{tag}}{attributes}
199+
\begin{funcdescni}{start_\var{tag}}{attributes}
200200
This method is called to process an opening tag \var{tag}. The
201201
\var{attributes} argument has the same meaning as described for
202202
\code{handle_starttag()} above. In fact, the base implementation of
203-
\code{handle_starttag} calls this method.
204-
\end{funcdesc}
203+
\code{handle_starttag()} calls this method.
204+
\end{funcdescni}
205205
206-
\begin{funcdesc}{end_\var{tag}}{}
206+
\begin{funcdescni}{end_\var{tag}}{}
207207
This method is called to process a closing tag \var{tag}.
208-
\end{funcdesc}
208+
\end{funcdescni}
209209
210-
\begin{datadesc}{\var{tag}_attributes}
210+
\begin{datadescni}{\var{tag}_attributes}
211211
If a class or instance variable \code{\var{tag}_attributes} exists, it
212212
should be a list or a dictionary. If a list, the elements of the list
213213
are the valid attributes for the element \var{tag}; if a dictionary,
214214
the keys are the valid attributes for the element \var{tag}, and the
215215
values the default values of the attributes, or \code{None} if there
216216
is no default.
217217
In addition to the attributes that were present in the tag, the
218-
attribute dictionary that is passed to \code{handle_starttag} and
219-
\code{unknown_starttag} contains values for all attributes that have a
218+
attribute dictionary that is passed to \code{handle_starttag()} and
219+
\code{unknown_starttag()} contains values for all attributes that have a
220220
default value.
221-
\end{datadesc}
221+
\end{datadescni}

0 commit comments

Comments
 (0)