mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Moved macros to myformat.sty.
This commit is contained in:
		
							parent
							
								
									0e5f0097c4
								
							
						
					
					
						commit
						b75d8cea54
					
				
					 2 changed files with 0 additions and 154 deletions
				
			
		
							
								
								
									
										77
									
								
								Doc/lib.tex
									
										
									
									
									
								
							
							
						
						
									
										77
									
								
								Doc/lib.tex
									
										
									
									
									
								
							| 
						 | 
					@ -1,82 +1,5 @@
 | 
				
			||||||
\documentstyle[myformat]{report}
 | 
					\documentstyle[myformat]{report}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% Underscores are not magic throughout this document
 | 
					 | 
				
			||||||
\catcode`_=12
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Dummy \cbstart and \cbend so I can leave the changebars in...
 | 
					 | 
				
			||||||
\newcommand{\cbstart}{}
 | 
					 | 
				
			||||||
\newcommand{\cbend}{}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \itembreak: force the text after an item to start on a new line
 | 
					 | 
				
			||||||
\newcommand{\itembreak}{
 | 
					 | 
				
			||||||
\mbox{}
 | 
					 | 
				
			||||||
\\*[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{}
 | 
					 | 
				
			||||||
\vspace{-\itemsep}
 | 
					 | 
				
			||||||
\vspace{-\parsep}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \funcitem{func}{args}: define a function item
 | 
					 | 
				
			||||||
\newcommand{\funcitem}[2]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1(#2)}]
 | 
					 | 
				
			||||||
\ 
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \dataitem{name}: define a data item
 | 
					 | 
				
			||||||
\newcommand{\dataitem}[1]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1}]
 | 
					 | 
				
			||||||
\ 
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \excitem{name}: define an exception item
 | 
					 | 
				
			||||||
\newcommand{\excitem}[1]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1}]
 | 
					 | 
				
			||||||
\itembreak
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
\title{\bf
 | 
					\title{\bf
 | 
				
			||||||
	Python Library Reference
 | 
						Python Library Reference
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,82 +1,5 @@
 | 
				
			||||||
\documentstyle[myformat]{report}
 | 
					\documentstyle[myformat]{report}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
% Underscores are not magic throughout this document
 | 
					 | 
				
			||||||
\catcode`_=12
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Dummy \cbstart and \cbend so I can leave the changebars in...
 | 
					 | 
				
			||||||
\newcommand{\cbstart}{}
 | 
					 | 
				
			||||||
\newcommand{\cbend}{}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \itembreak: force the text after an item to start on a new line
 | 
					 | 
				
			||||||
\newcommand{\itembreak}{
 | 
					 | 
				
			||||||
\mbox{}
 | 
					 | 
				
			||||||
\\*[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{}
 | 
					 | 
				
			||||||
\vspace{-\itemsep}
 | 
					 | 
				
			||||||
\vspace{-\parsep}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \funcitem{func}{args}: define a function item
 | 
					 | 
				
			||||||
\newcommand{\funcitem}[2]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1(#2)}]
 | 
					 | 
				
			||||||
\ 
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \dataitem{name}: define a data item
 | 
					 | 
				
			||||||
\newcommand{\dataitem}[1]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1}]
 | 
					 | 
				
			||||||
\ 
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
% Define \excitem{name}: define an exception item
 | 
					 | 
				
			||||||
\newcommand{\excitem}[1]{
 | 
					 | 
				
			||||||
\ttindex{#1}
 | 
					 | 
				
			||||||
\item[{\tt #1}]
 | 
					 | 
				
			||||||
\itembreak
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
\title{\bf
 | 
					\title{\bf
 | 
				
			||||||
	Python Library Reference
 | 
						Python Library Reference
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue