Skip to content

Commit 472e7e1

Browse files
committed
Format online documentation
Main goal to be more readable. Specifically: - Make pages look more paper-like by * having margins for the text to the "paper", * having margins for the "paper" to the borders of the screen, and * applying a maximum width for the "paper". - Change fonts to the free fonts FreeSerif, FreeSans and Mononoki. - Change to: * Serif in body text. * Sans-serif almost everywhere else. I did this as I think it is easier to read texts with serif in comparison to sans-serif, and since it looks better when switching to and from the math Computer Modern Roman used by MathJax which is of serif-type. - Reduce size of headers as they were overwhelmingly large. - Remove box around inline code. As the documentation is written as a text, code should only be considered as another font family, similar to how italic/oblique is used to emphasize things and how italic symbols are used in mathematics: It is simply another "mode" in the text. - Insert spacing between items in the sidebar as they were too close to each other. - Reduce size of term in description list. NOTE: Some things in the documentation should be changed in order to look the best. One of these is to use monospace/inline code when referring to a computer variable. Another thing is to use monospace for C-files (*.c, *.h) in the headers. Optionally, one can also start using monospace when referring to websites and emails; I need to think about how to do this in practice first (there are multiple options).
1 parent ab5e81c commit 472e7e1

7 files changed

+142
-1
lines changed

doc/source/_static/default.css

+87-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,94 @@ ul .toctree-l1 {
1313

1414
div.body {
1515
min-width: 450px;
16-
max-width: 100%;
16+
max-width: 900px;
17+
padding: 5% 7% 5% 7%;
18+
margin-left: auto;
19+
margin-right: auto;
1720
}
1821

1922
li p { margin: 0.2em; }
2023

24+
25+
26+
@import url("importfonts.css");
27+
28+
29+
/*
30+
################################################################################
31+
# set fonts
32+
################################################################################
33+
*/
34+
35+
/* set standard for everything else */
36+
div.body
37+
{
38+
font-family: FreeSerif, serif;
39+
font-size: 110%;
40+
}
41+
b
42+
{
43+
font-family: FreeSerif, serif;
44+
font-style: normal;
45+
font-weight: bold;
46+
font-size: 105%;
47+
}
48+
em
49+
{
50+
font-family: FreeSerif, serif;
51+
font-style: italic;
52+
font-size: 105%;
53+
}
54+
pre
55+
{
56+
font-family: Mononoki, monospace;
57+
font-size: 87%;
58+
}
59+
kbd, code /* Code and inputs */
60+
{
61+
background-color: rgba(0, 0, 0, 0); /* Transparent */
62+
font-family: Mononoki, monospace;
63+
font-size: 87%;
64+
padding: 0px;
65+
}
66+
67+
/* headings */
68+
h1, h2, h3, h4, h5, h6
69+
{
70+
font-family: FreeSans, sans-serif;
71+
}
72+
h1 code
73+
{
74+
font-family: Mononoki, monospace;
75+
font-size: 92%;
76+
font-weight: bold; /* Typeset C-files as bold in main header */
77+
}
78+
h2 code, h3 code, h4 code, h5 code, h6 code
79+
{
80+
font-family: Mononoki, monospace;
81+
font-size: 92%;
82+
font-weight: normal; /* Don't make it bold in other headers*/
83+
}
84+
div.body h1 { font-size: 180%; }
85+
div.body h2 { font-size: 140%; }
86+
div.body h3 { font-size: 125%; }
87+
div.body h4 { font-size: 115%; }
88+
div.body h5 { font-size: 110%; }
89+
div.body h6 { font-size: 100%; }
90+
91+
/* sidebar */
92+
.sphinxsidebarwrapper { font-size: 110%; }
93+
.sphinxsidebarwrapper li { margin: 3px 0; }
94+
95+
/* toctree */
96+
div[class="toctree-wrapper compound"]
97+
{
98+
font-family: FreeSans, sans-serif; font-size: 92%;
99+
}
100+
div[class="toctree-wrapper compound"] code
101+
{
102+
font-family: Mononoki, monospace; font-size: 92%;
103+
}
104+
105+
/* description lists */
106+
dt { font-size: 90%; }
21.4 KB
Binary file not shown.
53.7 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
31.7 KB
Binary file not shown.

doc/source/_static/importfonts.css

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
@font-face
2+
{
3+
font-family: FreeSans;
4+
src: url(fonts/FreeSans-small.woff);
5+
}
6+
7+
/* These two should never be used in our typesetting */
8+
/* @font-face */
9+
/* { */
10+
/* font-family: FreeSans; */
11+
/* src: url(fonts/FreeSansBold-small.woff); */
12+
/* font-weight: bold; */
13+
/* } */
14+
15+
/* @font-face */
16+
/* { */
17+
/* font-family: FreeSans; */
18+
/* src: url(fonts/FreeSansOblique.woff); */
19+
/* font-style: oblique; */
20+
/* } */
21+
22+
@font-face
23+
{
24+
font-family: FreeSerif;
25+
src: url(fonts/FreeSerif-small.woff);
26+
}
27+
28+
@font-face
29+
{
30+
font-family: FreeSerif;
31+
src: url(fonts/FreeSerifItalic-small.woff);
32+
font-style: italic;
33+
}
34+
35+
@font-face
36+
{
37+
font-family: FreeSerif;
38+
src: url(fonts/FreeSerifBold-small.woff);
39+
font-weight: bold;
40+
}
41+
42+
/* Neither should this one */
43+
/* @font-face */
44+
/* { */
45+
/* font-family: FreeSerif; */
46+
/* src: url(fonts/FreeSerifBoldItalic-small.woff); */
47+
/* font-style: italic; */
48+
/* font-weight: bold; */
49+
/* } */
50+
51+
@font-face
52+
{
53+
font-family: Mononoki;
54+
src: url(fonts/mononoki-Regular.woff2);
55+
}

0 commit comments

Comments
 (0)