Skip to content

Commit 1177189

Browse files
committed
ebook: remove the ugly grey background calibre ebook-convert adds by default
1 parent 03be1d9 commit 1177189

2 files changed

Lines changed: 21 additions & 24 deletions

File tree

‎scripts/ebook/html.css‎

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
/* start html.css */
22

33
p {
4-
text-align: justify;
5-
line-height: 1.25;
4+
text-align: justify;
5+
line-height: 1.25;
66
}
77

88
em {
9-
font-style: italic;
9+
font-style: italic;
1010
}
1111

1212
em em {
13-
font-style: normal;
13+
font-style: normal;
1414
}
1515

1616
em em em {
17-
font-style: italic;
17+
font-style: italic;
1818
}
1919

2020
/* V1: using custom fonts */
@@ -80,45 +80,41 @@ span.writtenNote {
8080
}
8181
*/
8282

83-
8483
/* V2: no custom font to increase compatibility (modi seems not to support fonts, and char ß is missing in some of the fonts */
8584

86-
87-
8885
span.lettrine {
89-
font-size: 150%;
86+
font-size: 150%;
9087
}
9188

9289
span.parsel {
93-
font-style: italic;
90+
font-style: italic;
9491
}
9592

9693
div.parsel {
97-
font-style: italic;
94+
font-style: italic;
9895
}
9996

10097
div.writtenNote {
101-
font-style: italic;
102-
margin-left: 1em;
98+
font-style: italic;
99+
margin-left: 1em;
103100
}
104101

105102
span.writtenNote {
106-
font-style: italic;
107-
margin-left: 1em;
103+
font-style: italic;
104+
margin-left: 1em;
108105
}
109106

110107
div.McGonagallWhiteBoard p {
111-
color: #cc3333;
112-
text-align: center;
113-
text-transform: uppercase;
114-
text-decoration: underline;
115-
text-decoration-color: #3333cc;
116-
/* text-decoration-thickness: 1px; */
108+
color: #cc3333;
109+
text-align: center;
110+
text-transform: uppercase;
111+
text-decoration: underline;
112+
text-decoration-color: #3333cc;
113+
/* text-decoration-thickness: 1px; */
117114
}
118115

119116
span.headline {
120-
font-variant: small-caps;
117+
font-variant: small-caps;
121118
}
122119

123-
124120
/* end html.css */

‎scripts/ebook/step_7.sh‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ target_file="hpmor.epub"
1717

1818
echo ==== 7.1b calibre: html -\> epub ====
1919
# calibre is a bit better in ebook generation than pandoc and the result can be converted to mobi and docx
20-
ebook-convert $source_file $target_file --language en-US --no-default-epub-cover --cover "tmp/title.jpg" --book-producer "Torben Menke" --level1-toc "//h:h1" --level2-toc "//h:h2" --level3-toc "//h:h3"
20+
ebook-convert $source_file $target_file --language en-US --no-default-epub-cover --cover "tmp/title.jpg" --book-producer "Torben Menke" --level1-toc "//h:h1" --level2-toc "//h:h2" --level3-toc "//h:h3" --filter-css "background-color"
21+
# --filter-css "background-color" is needed to remove the ugly gray background color calibre adds by default.
2122

2223
source_file="hpmor.epub"
2324
echo ==== 7.2 calibre: epub -\> mobi ====

0 commit comments

Comments
 (0)