- commit
- ccabcc6
- parent
- d086d3f
- author
- cruft
- date
- 2009-11-18 19:30:56 -0700 MST
Now with style sheet
2 files changed,
+45,
-2
+26,
-0
1@@ -0,0 +1,26 @@
2+body {
3+ max-width: 40em;
4+ font-family: Antykwa Torunska;
5+}
6+
7+img {
8+ max-width: 100%;
9+ max-height: 100%;
10+}
11+
12+.part {
13+ padding: 40% 0;
14+ page-break-before: always;
15+ page-break-after: always;
16+ font-size: 400%;
17+ text-align: center;
18+}
19+
20+.chapter {
21+ page-break-before: always;
22+ margin-top: 40%;
23+}
24+
25+.author {
26+ border-bottom: 2px solid black;
27+}
R toepub.py =>
toxhtml.py
+19,
-2
1@@ -93,9 +93,10 @@ def art(artist, url, title=None):
2 print('<div class="art">')
3 print('<img src="%s" alt="%s" />' % (url, alt))
4 if title:
5- print('<em>%s</em> by %s' % (title, artist))
6+ atxt = '<em>%s</em> by %s' % (title, artist)
7 else:
8- print(alt)
9+ atxt = alt
10+ print('<p class="artist">%s</p>' % (atxt))
11 print('</div>')
12
13 outbuf = ''
14@@ -198,6 +199,22 @@ for l in f:
15 if l.startswith('\\begin{document'):
16 break
17
18+print('''<?xml version="1.0" encoding="UTF-8"?>
19+<!DOCTYPE html PUBLIC
20+ "-//W3C//DTD XHTML 1.0 Strict//EN"
21+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
22+<html xmlns="http://www.w3.org/1999/xhtml">
23+ <head>
24+ <title>Horrors 2</title>
25+ <link rel="stylesheet" href="style.css" type="text/css" />
26+ </head>
27+
28+ <body>
29+''')
30+
31 for l in f:
32 outline(l)
33
34+print('''</body>
35+</html>
36+''')