mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 13:41:24 +00:00 
			
		
		
		
	main(): Include a \label{modindex} in the output so latex won't let us re-use
the name elsewhere. This is useful for the logical filenames project, since the "modindex" label is hardcoded into .latex2html-init.
This commit is contained in:
		
							parent
							
								
									45a40930e7
								
							
						
					
					
						commit
						a219e7976f
					
				
					 2 changed files with 4 additions and 2 deletions
				
			
		|  | @ -22,6 +22,7 @@ def cmp_items((s1, line1), (s2, line2)): | |||
|     return rc | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| def main(): | ||||
|     if sys.argv[1:]: | ||||
| 	infile = sys.argv[1] | ||||
|  | @ -36,7 +37,7 @@ def main(): | |||
| 	base, ext = os.path.splitext(infile) | ||||
| 	outfile = base + ".ind" | ||||
| 	ofp = open(outfile, "w") | ||||
|     ofp.write("\\begin{theindex}\n\n") | ||||
|     ofp.write("\\begin{theindex}\n\label{modindex}\n\n") | ||||
|     lines = ifp.readlines() | ||||
|     for i in range(len(lines)): | ||||
| 	if lines[i][0] == '\\': | ||||
|  |  | |||
|  | @ -22,6 +22,7 @@ def cmp_items((s1, line1), (s2, line2)): | |||
|     return rc | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| def main(): | ||||
|     if sys.argv[1:]: | ||||
| 	infile = sys.argv[1] | ||||
|  | @ -36,7 +37,7 @@ def main(): | |||
| 	base, ext = os.path.splitext(infile) | ||||
| 	outfile = base + ".ind" | ||||
| 	ofp = open(outfile, "w") | ||||
|     ofp.write("\\begin{theindex}\n\n") | ||||
|     ofp.write("\\begin{theindex}\n\label{modindex}\n\n") | ||||
|     lines = ifp.readlines() | ||||
|     for i in range(len(lines)): | ||||
| 	if lines[i][0] == '\\': | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Fred Drake
						Fred Drake