-
Notifications
You must be signed in to change notification settings - Fork 71
/
NOTES
58 lines (35 loc) · 1.1 KB
/
NOTES
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Sphinx Cheatsheet
=================
Sections
--------
I plan to use the following order for characters for book structure:
* `*` - Chapters
* `=` - Sections
* `-` - Subsections
* `^' - Subsubsections
Sidebars
--------
.. sidebar:: title
content
Someone who write a book with Sphinx:
http://blog.dehlia.in/2010/11/professional-book-like-structure-with-sphinx/
"Asides"
I figured out a nice LaTeX style for asides, etc. Use the notice class in LaTeX and make the
enclosed sub-section unnumbered. So something like this:
\begin{notice}{caution}{}
\subsection*{Aside on States}
...
\end{notice}
I hacked this together by hand, so it would need to be added to the LaTeX handling.
On the HTML side, it is simple enough to give the aside a reference by preceeding the
section with a label and then adding the label to the "addclass_id_map" and give it
a different appearence in the HTML (by assigning a new class to it). For Bootstrap,
this looks like:
# equations.rst
.. _aside-on-states:
Aside on States
===============
# conf.py
addclass_id_map = {
"aside-on-states": ["alert", "alert-info"]
}