Mercurial > cpython-lru_cache-weakref
comparison Doc/texinputs/python.sty @ 7550:69860821ca1d legacy-trunk
Create the module index only if a conditional is true.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Wed, 04 Mar 1998 21:56:42 +0000 |
| parents | 7eb19b1ce84d |
| children | cc7e126f009d |
comparison
equal
deleted
inserted
replaced
| 7549:4b11cb961046 | 7550:69860821ca1d |
|---|---|
| 259 \newcommand{\refbimodindex}[1]{\refmodule{#1}{built-in }} | 259 \newcommand{\refbimodindex}[1]{\refmodule{#1}{built-in }} |
| 260 \newcommand{\refexmodindex}[1]{\refmodule{#1}{extension }} | 260 \newcommand{\refexmodindex}[1]{\refmodule{#1}{extension }} |
| 261 \newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }} | 261 \newcommand{\refstmodindex}[1]{\refmodule{#1}{standard }} |
| 262 | 262 |
| 263 % support for the module index | 263 % support for the module index |
| 264 \newwrite\modindexfile | 264 \if@usemoduleindex |
| 265 \openout\modindexfile=mod\jobname.idx | 265 \newwrite\modindexfile |
| 266 \openout\modindexfile=mod\jobname.idx | |
| 267 \fi | |
| 266 | 268 |
| 267 % Add the defining entry for a module | 269 % Add the defining entry for a module |
| 268 \newcommand{\defmodindex}[2]{% | 270 \newcommand{\defmodindex}[2]{% |
| 269 \index{#1@{\idxcode{#1}} (#2module)|textbf}% | 271 \index{#1@{\idxcode{#1}} (#2module)|textbf}% |
| 270 \setindexsubitem{(in module #1)}% | 272 \setindexsubitem{(in module #1)}% |
| 271 \write\modindexfile{#1 \thepage}} | 273 \if@usemoduleindex% |
| 274 \write\modindexfile{#1 \thepage}% | |
| 275 \fi} | |
| 272 | 276 |
| 273 % built-in & Python modules in the main distribution | 277 % built-in & Python modules in the main distribution |
| 274 \newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }} | 278 \newcommand{\bimodindex}[1]{\defmodindex{#1}{built-in }} |
| 275 \newcommand{\stmodindex}[1]{\defmodindex{#1}{standard }} | 279 \newcommand{\stmodindex}[1]{\defmodindex{#1}{standard }} |
| 276 | 280 |
