Skip to content
Browse files

DOC: improve appearance of PDF output

  • Loading branch information...
1 parent b578b4d commit 39294b7a33068bfb1a7c668c8858cfee911b905c @pv pv committed
Showing with 13 additions and 7 deletions.
  1. +10 −4 doc/postprocess.py
  2. +3 −3 doc/source/conf.py
View
14 doc/postprocess.py
@@ -39,13 +39,19 @@ def process_html(fn, lines):
def process_tex(lines):
"""
- Remove unnecessary section titles from the LaTeX file,
- and convert UTF-8 non-breaking spaces to Latex nbsps.
-
+ Remove unnecessary section titles from the LaTeX file.
+
"""
new_lines = []
for line in lines:
- if re.match(r'^\\(section|subsection|subsubsection|paragraph|subparagraph){(numpy|scipy)\.', line):
+ line = re.sub(r'^\s*\\strong{See Also:}\s*$', r'\paragraph{See Also}', line)
+
+ if (line.startswith(r'\section{scipy.')
+ or line.startswith(r'\subsection{scipy.')
+ or line.startswith(r'\subsubsection{scipy.')
+ or line.startswith(r'\paragraph{scipy.')
+ or line.startswith(r'\subparagraph{scipy.')
+ ):
pass # skip!
else:
new_lines.append(line)
View
6 doc/source/conf.py
@@ -146,7 +146,7 @@
html_use_modindex = True
# If true, the reST sources are included in the HTML build as _sources/<name>.
-#html_copy_source = True
+html_copy_source = False
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
@@ -206,8 +206,8 @@
% Make Examples/etc section headers smaller and more compact
\makeatletter
-\titleformat{\paragraph}{\normalsize\py@HeaderFamily}%
- {\py@TitleColor}{0em}{\py@TitleColor}{\py@NormalColor}
+\titleformat{\paragraph}{\normalsize\normalfont\bfseries\itshape}%
+ {\py@NormalColor}{0em}{\py@NormalColor}{\py@NormalColor}
\titlespacing*{\paragraph}{0pt}{1ex}{0pt}
\makeatother

0 comments on commit 39294b7

Please sign in to comment.
Something went wrong with that request. Please try again.