Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
75746c85
Commit
75746c85
authored
Jan 16, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added indexing commands
parent
a9873d48
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
8 deletions
+82
-8
Doc/lib.tex
Doc/lib.tex
+41
-4
Doc/lib/lib.tex
Doc/lib/lib.tex
+41
-4
No files found.
Doc/lib.tex
View file @
75746c85
...
...
@@ -15,6 +15,42 @@
\\*
[0mm]
}
% Command to generate two index entries (using subentries)
\newcommand
{
\indexii
}
[2]
{
\index
{
#1!#2
}
\index
{
#2!#1
}
}
% And three entries (using only one level of subentries)
\newcommand
{
\indexiii
}
[3]
{
\index
{
#1!#2 #3
}
\index
{
#2!#3, #1
}
\index
{
#3!#1 #2
}
}
% And four (again, using only one level of subentries)
\newcommand
{
\indexiv
}
[4]
{
\index
{
#1!#2 #3 #4
}
\index
{
#2!#3 #4, #1
}
\index
{
#3!#4, #1 #2
}
\index
{
#4!#1 #2 #3
}
}
% Command to generate a reference to a function, statement, keyword, operator
\newcommand
{
\stindex
}
[1]
{
\indexii
{
statement
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\kwindex
}
[1]
{
\indexii
{
keyword
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\opindex
}
[1]
{
\indexii
{
operator
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\bifuncindex
}
[1]
{
\index
{
#1@
{
\tt
#1
}
(built-in function)
}}
% Add an index entry for a module
\newcommand
{
\modindex
}
[2]
{
\index
{
#1@
{
\tt
#1
}
(#2module)
}}
\newcommand
{
\bimodindex
}
[1]
{
\modindex
{
#1
}{
built-in
}}
\newcommand
{
\stmodindex
}
[1]
{
\modindex
{
#1
}{
standard
}}
% Additional string for an index entry
\newcommand
{
\indexsubitem
}{}
\newcommand
{
\ttindex
}
[1]
{
\index
{
#1@
{
\tt
#1
}
\indexsubitem
}}
% Define \itemjoin: some negative vspace to join two items together
\newcommand
{
\itemjoin
}{
\mbox
{}
...
...
@@ -24,21 +60,21 @@
% Define \funcitem{func}{args}: define a function item
\newcommand
{
\funcitem
}
[2]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1(#2)}]
\
}
% Define \dataitem{name}: define a data item
\newcommand
{
\dataitem
}
[1]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1}]
\
}
% Define \excitem{name}{string}: define an exception item
\newcommand
{
\excitem
}
[2]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1 = '#2'}]
\itembreak
}
...
...
@@ -54,6 +90,7 @@
E-mail:
{
\tt
guido@cwi.nl
}
}
% Tell \index to actually write the .idx file
\makeindex
\begin{document}
...
...
@@ -87,6 +124,6 @@ language.
\input
{
lib3.tex
}
% standard modules
\input
{
lib4.tex
}
% OS-dependent chapters
\input
{
lib5.tex
}
% Graphics chapters
\input
{
lib
index.tex
}
% The index
\input
{
lib
.ind
}
% The index
\end{document}
Doc/lib/lib.tex
View file @
75746c85
...
...
@@ -15,6 +15,42 @@
\\*
[0mm]
}
% Command to generate two index entries (using subentries)
\newcommand
{
\indexii
}
[2]
{
\index
{
#1!#2
}
\index
{
#2!#1
}
}
% And three entries (using only one level of subentries)
\newcommand
{
\indexiii
}
[3]
{
\index
{
#1!#2 #3
}
\index
{
#2!#3, #1
}
\index
{
#3!#1 #2
}
}
% And four (again, using only one level of subentries)
\newcommand
{
\indexiv
}
[4]
{
\index
{
#1!#2 #3 #4
}
\index
{
#2!#3 #4, #1
}
\index
{
#3!#4, #1 #2
}
\index
{
#4!#1 #2 #3
}
}
% Command to generate a reference to a function, statement, keyword, operator
\newcommand
{
\stindex
}
[1]
{
\indexii
{
statement
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\kwindex
}
[1]
{
\indexii
{
keyword
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\opindex
}
[1]
{
\indexii
{
operator
}{
#1@
{
\tt
#1
}}}
\newcommand
{
\bifuncindex
}
[1]
{
\index
{
#1@
{
\tt
#1
}
(built-in function)
}}
% Add an index entry for a module
\newcommand
{
\modindex
}
[2]
{
\index
{
#1@
{
\tt
#1
}
(#2module)
}}
\newcommand
{
\bimodindex
}
[1]
{
\modindex
{
#1
}{
built-in
}}
\newcommand
{
\stmodindex
}
[1]
{
\modindex
{
#1
}{
standard
}}
% Additional string for an index entry
\newcommand
{
\indexsubitem
}{}
\newcommand
{
\ttindex
}
[1]
{
\index
{
#1@
{
\tt
#1
}
\indexsubitem
}}
% Define \itemjoin: some negative vspace to join two items together
\newcommand
{
\itemjoin
}{
\mbox
{}
...
...
@@ -24,21 +60,21 @@
% Define \funcitem{func}{args}: define a function item
\newcommand
{
\funcitem
}
[2]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1(#2)}]
\
}
% Define \dataitem{name}: define a data item
\newcommand
{
\dataitem
}
[1]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1}]
\
}
% Define \excitem{name}{string}: define an exception item
\newcommand
{
\excitem
}
[2]
{
\
index
{
#1@
{
\tt
#1
}
}
\
ttindex
{
#1
}
\item
[{\tt #1 = '#2'}]
\itembreak
}
...
...
@@ -54,6 +90,7 @@
E-mail:
{
\tt
guido@cwi.nl
}
}
% Tell \index to actually write the .idx file
\makeindex
\begin{document}
...
...
@@ -87,6 +124,6 @@ language.
\input
{
lib3.tex
}
% standard modules
\input
{
lib4.tex
}
% OS-dependent chapters
\input
{
lib5.tex
}
% Graphics chapters
\input
{
lib
index.tex
}
% The index
\input
{
lib
.ind
}
% The index
\end{document}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment