Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5573031

Browse files
committed
Don't use the fncychap package for HOWTO documents; appendices break. Still
use them for manuals.
1 parent 050be83 commit 5573031

3 files changed

Lines changed: 31 additions & 28 deletions

File tree

Doc/texinputs/howto.cls

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,15 @@
4040
\RequirePackage{python}
4141

4242

43+
% need to do one of these....
44+
\newcommand{\@doHorizontalRule}{\rule{\textwidth}{1pt}}
45+
46+
4347
% Change the title page to look a bit better, and fit in with the
4448
% fncychap ``Bjarne'' style a bit better.
4549
%
4650
\renewcommand{\maketitle}{
47-
\@ifundefined{ChTitleVar}{}{
48-
\mghrulefill{\RW}}
51+
\@doHorizontalRule
4952
\@ifundefined{pdfinfo}{}{
5053
\pdfinfo{
5154
/Author (\@author)
@@ -74,8 +77,7 @@
7477
\parskip = 0mm
7578
\OldTableofcontents
7679
\endgroup
77-
\@ifundefined{ChTitleVar}{}{
78-
\mghrulefill{\RW}}
80+
\@doHorizontalRule
7981
\vspace{12pt}
8082
}
8183

Doc/texinputs/manual.cls

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,16 @@
3232
\RequirePackage{times}\typeout{Using times fonts instead of Computer Modern.}
3333

3434

35-
% Required package:
35+
% Required packages:
36+
%
37+
% The "fncychap" package is used to get the nice chapter headers. The
38+
% .sty file is distributed with Python, so you should not need to disable
39+
% it. You'd also end up with a mixed page style; uglier than stock LaTeX!
40+
%
41+
\RequirePackage[Bjarne]{fncychap}\typeout{Using fancy chapter headings.}
42+
% Do horizontal rules it this way to match:
43+
\newcommand{\@doHorizontalRule}{\mghrulefill{\RW}}
44+
%
3645
%
3746
% This gives us all the Python-specific markup that we really want.
3847
% This should come last. Do not change this.
@@ -47,8 +56,7 @@
4756
\begin{titlepage}%
4857
\let\footnotesize\small
4958
\let\footnoterule\relax
50-
\@ifundefined{ChTitleVar}{}{%
51-
\mghrulefill{\RW}}%
59+
\@doHorizontalRule%
5260
\@ifundefined{pdfinfo}{}{
5361
\pdfinfo{
5462
/Author (\@author)

Doc/texinputs/python.sty

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@
66
\ProvidesPackage{python}
77
[1998/01/11 LaTeX package (Python markup)]
88

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-
169
% for PDF output, use maximal compression & a lot of other stuff
1710
% (test for PDF recommended by Tanmoy Bhattacharya <[email protected]>)
1811
%
@@ -406,6 +399,8 @@
406399

407400
\let\nodename=\label
408401

402+
\newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
403+
409404
% For these commands, use \command{} to get the typography right, not
410405
% {\command}. This works better with the texinfo translation.
411406
\newcommand{\ABC}{{\sc abc}}
@@ -415,7 +410,7 @@
415410
\newcommand{\Cpp}{C\protect\raisebox{.18ex}{++}}
416411
\newcommand{\C}{C}
417412
\newcommand{\EOF}{{\sc eof}}
418-
\newcommand{\NULL}{\code{NULL}}
413+
\newcommand{\NULL}{\sectcode{NULL}}
419414

420415
% code is the most difficult one...
421416
\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,17 +458,17 @@
463458
% For now, don't do anything really fancy with them; just use them as
464459
% logical markup. This might change in the future.
465460
%
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
477472

478473
\newcommand{\mimetype}[1]{{\small\textsf{#1}}}
479474
% The \! is a "negative thin space" in math mode.
@@ -538,8 +533,6 @@
538533
\advance\@tempdima \leftmargin\makebox[\@tempdima][l]{#1}%
539534
}
540535

541-
\newcommand{\sectcode}[1]{{\sectcodefont{#1}}}
542-
543536
% Cross-referencing (AMK)
544537
% Sample usage:
545538
% \begin{seealso}

0 commit comments

Comments
 (0)