Skip to content

Commit cbcd15c

Browse files
committed
Beefed up latex output. Unfortunately parts look ugly.
1 parent 854e0e2 commit cbcd15c

File tree

7 files changed

+98
-44
lines changed

7 files changed

+98
-44
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@
190190
'pointsize': '12pt',
191191
'preamble': r'\usepackage{flaskstyle}'
192192
}
193+
latex_use_parts = True
193194

194195
latex_additional_files = ['flaskstyle.sty', 'logo.pdf']
195196

docs/contents.rst.inc

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/errorhandling.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ Here is a list of useful formatting variables for the format string. Note
163163
that this list is not complete, consult the official documentation of the
164164
:mod:`logging` package for a full list.
165165

166+
.. tabularcolumns:: |p{3cm}|p{12cm}|
167+
166168
+------------------+----------------------------------------------------+
167169
| Format | Description |
168170
+==================+====================================================+

docs/flaskstyle.sty

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,13 @@
7070
\ChNumVar{\raggedleft \bfseries\Large}
7171
\ChTitleVar{\raggedleft \rm\Huge}
7272

73+
% use inconsolata font
7374
\usepackage{inconsolata}
75+
76+
% fix single quotes, for inconsolata. (does not work)
77+
%%\usepackage{textcomp}
78+
%%\begingroup
79+
%% \catcode`'=\active
80+
%% \g@addto@macro\@noligs{\let'\textsinglequote}
81+
%% \endgroup
82+
%%\endinput

docs/index.rst

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
:orphan:
2+
13
Welcome to Flask
24
================
35

@@ -25,4 +27,45 @@ following links:
2527
.. _Jinja2: http://jinja.pocoo.org/2/
2628
.. _Werkzeug: http://werkzeug.pocoo.org/
2729

28-
.. include:: contents.rst.inc
30+
User's Guide
31+
------------
32+
33+
This part of the documentation is written text and should give you an idea
34+
how to work with Flask. It's a series of step-by-step instructions for
35+
web development.
36+
37+
.. toctree::
38+
:maxdepth: 2
39+
40+
foreword
41+
installation
42+
quickstart
43+
tutorial/index
44+
testing
45+
errorhandling
46+
patterns/index
47+
deploying/index
48+
becomingbig
49+
50+
API Reference
51+
-------------
52+
53+
If you are looking for information on a specific function, class or
54+
method, this part of the documentation is for you:
55+
56+
.. toctree::
57+
:maxdepth: 2
58+
59+
api
60+
61+
Additional Notes
62+
----------------
63+
64+
Design notes, legal information and changelog are here for the interested:
65+
66+
.. toctree::
67+
:maxdepth: 2
68+
69+
design
70+
license
71+
changelog

docs/latexindex.rst

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,38 @@
1+
:orphan:
2+
13
Flask Documentation
24
===================
35

4-
.. include:: contents.rst.inc
6+
User's Guide
7+
------------
8+
9+
.. toctree::
10+
:maxdepth: 3
11+
12+
foreword
13+
installation
14+
quickstart
15+
tutorial/index
16+
testing
17+
errorhandling
18+
patterns/index
19+
deploying/index
20+
becomingbig
21+
22+
API Reference
23+
-------------
24+
25+
.. toctree::
26+
:maxdepth: 3
27+
28+
api
29+
30+
Additional Notes
31+
----------------
32+
33+
.. toctree::
34+
:maxdepth: 3
35+
36+
design
37+
license
38+
changelog

flask.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1097,6 +1097,8 @@ def make_response(self, rv):
10971097
10981098
The following types are allowed for `rv`:
10991099
1100+
.. tabularcolumns:: |p{3.5cm}|p{9.5cm}|
1101+
11001102
======================= ===========================================
11011103
:attr:`response_class` the object is returned unchanged
11021104
:class:`str` a response object is created with the
@@ -1222,3 +1224,8 @@ def __call__(self, environ, start_response):
12221224
request = LocalProxy(lambda: _request_ctx_stack.top.request)
12231225
session = LocalProxy(lambda: _request_ctx_stack.top.session)
12241226
g = LocalProxy(lambda: _request_ctx_stack.top.g)
1227+
1228+
1229+
# script interface to run a development server
1230+
if __name__ == '__main__':
1231+
sys.exit(main(sys.argv))

0 commit comments

Comments
 (0)