comparison Doc/texinputs/python.sty @ 7740:423be7cd0479 legacy-trunk

Don't use the fncychap package for HOWTO documents; appendices break. Still use them for manuals.
author Fred Drake <fdrake@acm.org>
date Wed, 25 Mar 1998 15:41:23 +0000
parents 5d7e4d20c89e
children 9d0dc11775a4
comparison
equal deleted inserted replaced
7739:1091ba2baea4 7740:423be7cd0479
3 % 3 %
4 4
5 \NeedsTeXFormat{LaTeX2e}[1995/12/01] 5 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
6 \ProvidesPackage{python} 6 \ProvidesPackage{python}
7 [1998/01/11 LaTeX package (Python markup)] 7 [1998/01/11 LaTeX package (Python markup)]
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 8
16 % for PDF output, use maximal compression & a lot of other stuff 9 % for PDF output, use maximal compression & a lot of other stuff
17 % (test for PDF recommended by Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov>) 10 % (test for PDF recommended by Tanmoy Bhattacharya <tanmoy@qcd.lanl.gov>)
18 % 11 %
19 \ifx\pdfoutput\undefined\else\ifcase\pdfoutput 12 \ifx\pdfoutput\undefined\else\ifcase\pdfoutput
404 }{\end{fulllineitems}} 397 }{\end{fulllineitems}}
405 398
406 399
407 \let\nodename=\label 400 \let\nodename=\label
408 401
402 \newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
403
409 % For these commands, use \command{} to get the typography right, not 404 % For these commands, use \command{} to get the typography right, not
410 % {\command}. This works better with the texinfo translation. 405 % {\command}. This works better with the texinfo translation.
411 \newcommand{\ABC}{{\sc abc}} 406 \newcommand{\ABC}{{\sc abc}}
412 \newcommand{\UNIX}{{\sc Unix}} 407 \newcommand{\UNIX}{{\sc Unix}}
413 \newcommand{\POSIX}{POSIX} 408 \newcommand{\POSIX}{POSIX}
414 \newcommand{\ASCII}{{\sc ascii}} 409 \newcommand{\ASCII}{{\sc ascii}}
415 \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}} 410 \newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}}
416 \newcommand{\C}{C} 411 \newcommand{\C}{C}
417 \newcommand{\EOF}{{\sc eof}} 412 \newcommand{\EOF}{{\sc eof}}
418 \newcommand{\NULL}{\code{NULL}} 413 \newcommand{\NULL}{\sectcode{NULL}}
419 414
420 % code is the most difficult one... 415 % code is the most difficult one...
421 \newcommand{\code}[1]{{\@vobeyspaces\@noligs\def\{{\char`\{}\def\}{\char`\}}\def\~{\char`\~}\def\^{\char`\^}\def\e{\char`\\}\def\${\char`\$}\def\#{\char`\#}\def\&{\char`\&}\def\%{\char`\%}% 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`\%}%
422 \mbox{\codefont{#1}}}} 417 \mbox{\codefont{#1}}}}
423 418
461 % names for specific semantic assignments. 456 % names for specific semantic assignments.
462 % 457 %
463 % For now, don't do anything really fancy with them; just use them as 458 % For now, don't do anything really fancy with them; just use them as
464 % logical markup. This might change in the future. 459 % logical markup. This might change in the future.
465 % 460 %
466 \let\module=\code 461 \let\module=\sectcode
467 \let\keyword=\code 462 \let\keyword=\sectcode
468 \let\exception=\code 463 \let\exception=\sectcode
469 \let\class=\code 464 \let\class=\sectcode
470 \let\function=\code 465 \let\function=\sectcode
471 \let\member=\code 466 \let\member=\sectcode
472 \let\method=\code 467 \let\method=\sectcode
473 468
474 \let\cfunction=\code 469 \let\cfunction=\sectcode
475 \let\ctype=\code 470 \let\ctype=\sectcode
476 \let\cdata=\code 471 \let\cdata=\sectcode
477 472
478 \newcommand{\mimetype}[1]{{\small\textsf{#1}}} 473 \newcommand{\mimetype}[1]{{\small\textsf{#1}}}
479 % The \! is a "negative thin space" in math mode. 474 % The \! is a "negative thin space" in math mode.
480 \newcommand{\regexp}[1]{% 475 \newcommand{\regexp}[1]{%
481 {\tiny$^{^\lceil}\!\!$% 476 {\tiny$^{^\lceil}\!\!$%
535 530
536 \newcommand{\itemnewline}[1]{% 531 \newcommand{\itemnewline}[1]{%
537 \@tempdima\linewidth% 532 \@tempdima\linewidth%
538 \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}% 533 \advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%
539 } 534 }
540
541 \newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
542 535
543 % Cross-referencing (AMK) 536 % Cross-referencing (AMK)
544 % Sample usage: 537 % Sample usage:
545 % \begin{seealso} 538 % \begin{seealso}
546 % \seemodule{rand}{Uniform random number generator}; % Module xref 539 % \seemodule{rand}{Uniform random number generator}; % Module xref