|
6 | 6 | \ProvidesPackage{python} |
7 | 7 | [1998/01/11 LaTeX package (Python markup)] |
8 | 8 |
|
9 | | -% The "fncychap" package is used to get the nice chapter headers. The |
10 | | -% .sty file is distributed with Python, so you should not need to disable |
11 | | -% it. You'd also end up with a mixed page style; uglier than stock LaTeX! |
12 | | -% |
13 | | -\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.} |
14 | | - |
15 | | - |
16 | 9 | % for PDF output, use maximal compression & a lot of other stuff |
17 | 10 | % (test for PDF recommended by Tanmoy Bhattacharya <[email protected]>) |
18 | 11 | % |
|
406 | 399 |
|
407 | 400 | \let\nodename=\label |
408 | 401 |
|
| 402 | +\newcommand{\sectcode}[1]{{\sectcodefont{#1}}} |
| 403 | + |
409 | 404 | % For these commands, use \command{} to get the typography right, not |
410 | 405 | % {\command}. This works better with the texinfo translation. |
411 | 406 | \newcommand{\ABC}{{\sc abc}} |
|
415 | 410 | \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} |
416 | 411 | \newcommand{\C}{C} |
417 | 412 | \newcommand{\EOF}{{\sc eof}} |
418 | | -\newcommand{\NULL}{\code{NULL}} |
| 413 | +\newcommand{\NULL}{\sectcode{NULL}} |
419 | 414 |
|
420 | 415 | % code is the most difficult one... |
421 | 416 | \newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% |
|
463 | 458 | % For now, don't do anything really fancy with them; just use them as |
464 | 459 | % logical markup. This might change in the future. |
465 | 460 | % |
466 | | -\let\module=\code |
467 | | -\let\keyword=\code |
468 | | -\let\exception=\code |
469 | | -\let\class=\code |
470 | | -\let\function=\code |
471 | | -\let\member=\code |
472 | | -\let\method=\code |
473 | | - |
474 | | -\let\cfunction=\code |
475 | | -\let\ctype=\code |
476 | | -\let\cdata=\code |
| 461 | +\let\module=\sectcode |
| 462 | +\let\keyword=\sectcode |
| 463 | +\let\exception=\sectcode |
| 464 | +\let\class=\sectcode |
| 465 | +\let\function=\sectcode |
| 466 | +\let\member=\sectcode |
| 467 | +\let\method=\sectcode |
| 468 | + |
| 469 | +\let\cfunction=\sectcode |
| 470 | +\let\ctype=\sectcode |
| 471 | +\let\cdata=\sectcode |
477 | 472 |
|
478 | 473 | \newcommand{\mimetype}[1]{{\small\textsf{#1}}} |
479 | 474 | % The \! is a "negative thin space" in math mode. |
|
538 | 533 | \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}% |
539 | 534 | } |
540 | 535 |
|
541 | | -\newcommand{\sectcode}[1]{{\sectcodefont{#1}}} |
542 | | - |
543 | 536 | % Cross-referencing (AMK) |
544 | 537 | % Sample usage: |
545 | 538 | % \begin{seealso} |
|
0 commit comments