kitabu 1.0.0.rc1 → 1.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. data/Gemfile.lock +14 -20
  2. data/README.rdoc +54 -23
  3. data/kitabu.gemspec +1 -1
  4. data/lib/kitabu.rb +11 -4
  5. data/lib/kitabu/cli.rb +49 -6
  6. data/lib/kitabu/dependency.rb +19 -0
  7. data/lib/kitabu/exporter.rb +4 -5
  8. data/lib/kitabu/generator.rb +12 -15
  9. data/lib/kitabu/parser.rb +27 -2
  10. data/lib/kitabu/parser/epub.rb +96 -83
  11. data/lib/kitabu/parser/html.rb +51 -16
  12. data/lib/kitabu/parser/mobi.rb +1 -4
  13. data/lib/kitabu/parser/pdf.rb +23 -20
  14. data/lib/kitabu/parser/txt.rb +1 -5
  15. data/lib/kitabu/syntax.rb +5 -3
  16. data/lib/kitabu/syntax/highlight.rb +22 -0
  17. data/lib/kitabu/toc.rb +4 -78
  18. data/lib/kitabu/toc/epub.rb +41 -0
  19. data/lib/kitabu/toc/html.rb +78 -0
  20. data/lib/kitabu/version.rb +1 -1
  21. data/spec/kitabu/cli/export_spec.rb +2 -2
  22. data/spec/kitabu/cli/new_spec.rb +1 -1
  23. data/spec/kitabu/cli/permalinks_spec.rb +1 -1
  24. data/spec/kitabu/cli/version_spec.rb +1 -1
  25. data/spec/kitabu/extensions/redcloth_spec.rb +6 -6
  26. data/spec/kitabu/extensions/string_spec.rb +1 -1
  27. data/spec/kitabu/parser/epub_spec.rb +5 -1
  28. data/spec/kitabu/parser/html_spec.rb +15 -15
  29. data/spec/kitabu/parser/pdf_spec.rb +4 -4
  30. data/spec/kitabu/syntax_spec.rb +78 -74
  31. data/spec/kitabu/{toc_spec.rb → toc/html_spec.rb} +5 -5
  32. data/spec/spec_helper.rb +3 -1
  33. data/spec/support/mybook/output/mybook.pdf.html +83 -0
  34. data/spec/support/mybook/templates/{cover.erb → epub/cover.erb} +1 -1
  35. data/spec/support/mybook/templates/{epub.erb → epub/page.erb} +1 -1
  36. data/spec/support/mybook/templates/epub/style.css +0 -0
  37. data/spec/support/mybook/templates/html/layout.css +353 -0
  38. data/spec/support/mybook/templates/html/layout.erb +50 -0
  39. data/spec/support/mybook/templates/html/syntax.css +58 -0
  40. data/spec/support/mybook/templates/html/user.css +1 -0
  41. data/spec/support/shared.rb +48 -15
  42. data/templates/cover.erb +1 -1
  43. data/templates/cover.png +0 -0
  44. data/templates/epub.css +1 -0
  45. data/templates/epub.erb +1 -1
  46. data/templates/sample.md +6 -0
  47. data/templates/syntax.css +58 -0
  48. metadata +32 -44
  49. data/spec/support/mybook/templates/epub.css +0 -1
  50. data/spec/support/mybook/templates/layout.css +0 -137
  51. data/spec/support/mybook/templates/layout.erb +0 -46
  52. data/spec/support/mybook/templates/syntax.css +0 -186
  53. data/spec/support/mybook/templates/user.css +0 -1
  54. data/templates/styles/active4d.css +0 -114
  55. data/templates/styles/all_hallows_eve.css +0 -72
  56. data/templates/styles/amy.css +0 -147
  57. data/templates/styles/blackboard.css +0 -88
  58. data/templates/styles/brilliance_black.css +0 -605
  59. data/templates/styles/brilliance_dull.css +0 -599
  60. data/templates/styles/cobalt.css +0 -149
  61. data/templates/styles/dawn.css +0 -121
  62. data/templates/styles/eiffel.css +0 -121
  63. data/templates/styles/espresso_libre.css +0 -109
  64. data/templates/styles/idle.css +0 -62
  65. data/templates/styles/iplastic.css +0 -80
  66. data/templates/styles/lazy.css +0 -73
  67. data/templates/styles/mac_classic.css +0 -123
  68. data/templates/styles/magicwb_amiga.css +0 -104
  69. data/templates/styles/pastels_on_dark.css +0 -188
  70. data/templates/styles/slush_poppies.css +0 -85
  71. data/templates/styles/spacecadet.css +0 -51
  72. data/templates/styles/sunburst.css +0 -180
  73. data/templates/styles/twilight.css +0 -137
  74. data/templates/styles/zenburnesque.css +0 -91
@@ -4,91 +4,95 @@ require "spec_helper"
4
4
  describe Kitabu::Syntax do
5
5
  INLINE = <<-CODE
6
6
  @@@ ruby
7
- class Sample
8
- def hello(name)
9
- puts "hi, #{name}"
10
- end
11
- end
12
- @@@
13
- CODE
7
+ class Sample
8
+ def hello(name)
9
+ puts "hi, #{name}"
10
+ end
11
+ end
12
+ @@@
13
+ CODE
14
14
 
15
- let(:root) { SPECDIR.join("support/mybook") }
15
+ before do
16
+ Kitabu::Dependency.stub :pygments_rb? => false
17
+ end
16
18
 
17
- it "should render inline code" do
18
- content = Kitabu::Syntax.render(root, :markdown, INLINE)
19
- content.should have_tag("pre", 1)
20
- Nokogiri::HTML(content).text.should match(/class Sample/)
21
- end
19
+ let(:root) { SPECDIR.join("support/mybook") }
22
20
 
23
- it "should render line range" do
24
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb:3,5 @@@")
25
- content.should have_tag("pre", 1)
26
- html = Nokogiri::HTML(content)
27
- html.text.should_not match(/class HelloWorld/)
28
- html.text.should match(/def self\.say/)
29
- end
21
+ it "renders inline code" do
22
+ content = Kitabu::Syntax.render(root, :markdown, INLINE)
23
+ content.should have_tag("pre", 1)
24
+ Nokogiri::HTML(content).text.should match(/class Sample/)
25
+ end
30
26
 
31
- it "should render first block by its name" do
32
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#method @@@")
33
- content.should have_tag("pre", 1)
34
- html = Nokogiri::HTML(content)
35
- html.text.should_not match(/class HelloWorld/)
36
- html.text.should_not match(/def self\.shout/)
37
- html.text.should match(/def self\.say/)
38
- end
27
+ it "renders line range" do
28
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb:3,5 @@@")
29
+ content.should have_tag("pre", 1)
30
+ html = Nokogiri::HTML(content)
31
+ html.text.should_not match(/class HelloWorld/)
32
+ html.text.should match(/def self\.say/)
33
+ end
39
34
 
40
- it "should render second block by its name" do
41
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#another_method @@@")
42
- content.should have_tag("pre", 1)
43
- html = Nokogiri::HTML(content)
44
- html.text.should_not match(/class HelloWorld/)
45
- html.text.should_not match(/def self\.say/)
46
- html.text.should match(/def self\.shout/)
47
- end
35
+ it "renders first block by its name" do
36
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#method @@@")
37
+ content.should have_tag("pre", 1)
38
+ html = Nokogiri::HTML(content)
39
+ html.text.should_not match(/class HelloWorld/)
40
+ html.text.should_not match(/def self\.shout/)
41
+ html.text.should match(/def self\.say/)
42
+ end
48
43
 
49
- it "should render missing block message" do
50
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#invalid @@@")
51
- content.should have_tag("pre", 1)
52
- html = Nokogiri::HTML(content)
53
- html.text.should_not match(/class HelloWorld/)
54
- html.text.should_not match(/def self\.say/)
55
- html.text.should_not match(/def self\.shout/)
56
- html.text.should match(/\[missing 'invalid' block name\]/)
57
- end
44
+ it "renders second block by its name" do
45
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#another_method @@@")
46
+ content.should have_tag("pre", 1)
47
+ html = Nokogiri::HTML(content)
48
+ html.text.should_not match(/class HelloWorld/)
49
+ html.text.should_not match(/def self\.say/)
50
+ html.text.should match(/def self\.shout/)
51
+ end
58
52
 
59
- it "should render missing file message" do
60
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby invalid.rb @@@")
61
- content.should have_tag("pre", 1)
62
- html = Nokogiri::HTML(content)
63
- html.text.should_not match(/class HelloWorld/)
64
- html.text.should_not match(/def self\.say/)
65
- html.text.should_not match(/def self\.shout/)
66
- html.text.should match(/\[missing 'code\/invalid.rb' file\]/)
67
- end
53
+ it "renders missing block message" do
54
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb#invalid @@@")
55
+ content.should have_tag("pre", 1)
56
+ html = Nokogiri::HTML(content)
57
+ html.text.should_not match(/class HelloWorld/)
58
+ html.text.should_not match(/def self\.say/)
59
+ html.text.should_not match(/def self\.shout/)
60
+ html.text.should match(/\[missing 'invalid' block name\]/)
61
+ end
68
62
 
69
- it "should render file" do
70
- content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@")
71
- html = Nokogiri::HTML(content)
72
- html.text.should match(/class HelloWorld/)
73
- html.text.should match(/def self\.say/)
74
- end
63
+ it "renders missing file message" do
64
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby invalid.rb @@@")
65
+ content.should have_tag("pre", 1)
66
+ html = Nokogiri::HTML(content)
67
+ html.text.should_not match(/class HelloWorld/)
68
+ html.text.should_not match(/def self\.say/)
69
+ html.text.should_not match(/def self\.shout/)
70
+ html.text.should match(/\[missing 'code\/invalid.rb' file\]/)
71
+ end
75
72
 
76
- it "should add highlight class" do
77
- Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@").should have_tag("div.highlight", 1)
78
- end
73
+ it "renders file" do
74
+ content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@")
75
+ html = Nokogiri::HTML(content)
76
+ html.text.should match(/class HelloWorld/)
77
+ html.text.should match(/def self\.say/)
78
+ end
79
+
80
+ it "adds CodeRay class" do
81
+ Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@").should have_tag("div.CodeRay", 1)
82
+ end
79
83
 
80
- it "should wrap code in pre tag" do
81
- Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@").should have_tag("pre", 1)
82
- end
84
+ it "wraps code in pre tag" do
85
+ Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@").should have_tag("pre", 1)
86
+ end
83
87
 
84
- it "should wrap code in notextile tag" do
85
- Kitabu::Syntax.render(root, :textile, "@@@ ruby code.rb @@@").should have_tag("notextile", 1)
86
- end
88
+ it "wraps code in notextile tag" do
89
+ Kitabu::Syntax.render(root, :textile, "@@@ ruby code.rb @@@").should have_tag("notextile", 1)
90
+ end
87
91
 
88
- it "should remove block annotations" do
92
+ it "removes block annotations" do
89
93
  content = Kitabu::Syntax.render(root, :markdown, "@@@ ruby code.rb @@@")
90
- html = Nokogiri::HTML(content)
91
- html.text.should_not match(/@begin/)
92
- html.text.should_not match(/@end/)
93
- end
94
+ html = Nokogiri::HTML(content)
95
+ html.text.should_not match(/@begin/)
96
+ html.text.should_not match(/@end/)
97
+ end
94
98
  end
@@ -1,7 +1,7 @@
1
1
  # -*- encoding: utf-8 -*-
2
2
  require "spec_helper"
3
3
 
4
- describe Kitabu::Toc do
4
+ describe Kitabu::TOC::HTML do
5
5
  HTML = <<-HTML
6
6
  <h1>Item 1</h1>
7
7
  <h2>Item 1.2</h2>
@@ -17,15 +17,15 @@ describe Kitabu::Toc do
17
17
 
18
18
  HTML.force_encoding("utf-8")
19
19
 
20
- let(:toc) { Kitabu::Toc.generate(HTML) }
20
+ let(:toc) { described_class.generate(HTML) }
21
21
  let(:html) { toc.to_html }
22
22
  let(:content) { toc.content }
23
23
 
24
- it "should not have body tag" do
24
+ it "has no body tag" do
25
25
  content.should_not match(/<body>/)
26
26
  end
27
27
 
28
- it "should generate toc" do
28
+ it "generates toc" do
29
29
  html.should have_tag("div.level2.item-1-2", "Item 1.2")
30
30
  html.should have_tag("div.level3.item-1-1-3", "Item 1.1.3")
31
31
  html.should have_tag("div.level4.item-1-1-1-4", "Item 1.1.1.4")
@@ -38,7 +38,7 @@ describe Kitabu::Toc do
38
38
  html.should have_tag("div.level2.internacionalizacao", "Internacionalização")
39
39
  end
40
40
 
41
- it "should add ID attribute to content" do
41
+ it "adds id attribute to content" do
42
42
  content.should have_tag("h2#item-1-2", "Item 1.2")
43
43
  content.should have_tag("h3#item-1-1-3", "Item 1.1.3")
44
44
  content.should have_tag("h4#item-1-1-1-4", "Item 1.1.1.4")
@@ -11,7 +11,7 @@ RSpec.configure do |config|
11
11
  config.include(SpecHelper)
12
12
  config.include(Matchers)
13
13
 
14
- config.around do
14
+ cleaner = proc do
15
15
  [
16
16
  TMPDIR,
17
17
  SPECDIR.join("support/mybook/output/mybook.pdf"),
@@ -22,5 +22,7 @@ RSpec.configure do |config|
22
22
  end
23
23
  end
24
24
 
25
+ config.before(&cleaner)
26
+ config.after(&cleaner)
25
27
  config.before { FileUtils.mkdir_p(TMPDIR) }
26
28
  end
@@ -0,0 +1,83 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
2
+ <html xmlns="http://www.w3.org/1999/xhtml">
3
+ <head>
4
+ <title>Testing Kitabu</title>
5
+ <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
6
+ <link rel="stylesheet" type="text/css" href="../templates/html/layout.css" />
7
+ <link rel="stylesheet" type="text/css" href="../templates/html/syntax.css" />
8
+ <link rel="stylesheet" type="text/css" href="../templates/html/user.css" />
9
+ <meta name="author" content="John Doe, Mary Doe" />
10
+ <meta name="subject" content="Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua." />
11
+ <meta name="keywords" content="demo, book, pdf, epub, kitabu, textile, html, markdown" />
12
+ <meta name="date" content="2010-12-19" />
13
+ </head>
14
+ <body>
15
+ <div class="frontcover container">
16
+ <div>
17
+ <h1>Testing Kitabu</h1>
18
+ <p class="description">Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
19
+ <p class="authors">John Doe and Mary Doe</p>
20
+ </div>
21
+ </div>
22
+
23
+ <div class="table-of-contents">
24
+ <h2 class="no-toc">Content</h2>
25
+ <div id="toc">
26
+ <div class="level2 markdown"><a href="#markdown"><span>Markdown</span></a></div><div class="level2 textile"><a href="#textile"><span>Textile</span></a></div><div class="level2 html"><a href="#html"><span>HTML</span></a></div><div class="level2 some-chapter"><a href="#some-chapter"><span>Some Chapter</span></a></div>
27
+ </div>
28
+ </div>
29
+
30
+ <div id="chapters">
31
+ <div class="chapter">
32
+ <h2 id="markdown">Markdown</h2>
33
+
34
+ <p>This chapter was written with <a href="http://daringfireball.net/projects/markdown/">Markdown</a>.</p>
35
+
36
+ <div class="CodeRay">
37
+ <div class="code"><pre>nice to hear that!</pre></div>
38
+ </div>
39
+
40
+
41
+
42
+
43
+
44
+ </div>
45
+ <div class="chapter">
46
+ <h2 id="textile">Textile</h2>
47
+ <p>This chapter was written with <a href="http://www.textism.com/tools/textile/">Textile</a>.</p>
48
+
49
+ </div>
50
+ <div class="chapter">
51
+ <h2 id="html">HTML</h2>
52
+
53
+ <p>This chapter was written with HTML.</p>
54
+
55
+
56
+ </div>
57
+ <div class="chapter">
58
+ <h2 id="some-chapter">Some Chapter</h2>
59
+
60
+ <p>Some chapter organized in a directory.</p>
61
+
62
+
63
+ </div>
64
+ </div>
65
+
66
+ <div class="imprint container">
67
+ <div>
68
+ <h2>Testing Kitabu</h2>
69
+ <p>John Doe and Mary Doe</p>
70
+ <p>Copyright (C) 2010 John Doe.</p>
71
+ </div>
72
+ </div>
73
+
74
+
75
+ <div class="container changelog">
76
+ <h2>Revisions</h2>
77
+ <h3>Version 1</h3>
78
+ <ul><li>Some text fixes</li>
79
+ <li>Added chapter about something</li>
80
+ </ul></div>
81
+
82
+ </body>
83
+ </html>
@@ -5,7 +5,7 @@
5
5
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<%= language %>">
6
6
  <head>
7
7
  <title><%= title %></title>
8
- <link rel="stylesheet" href="epub.css" type="text/css" />
8
+ <link rel="stylesheet" href="style.css" type="text/css" />
9
9
  <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
10
10
  </head>
11
11
  <body>
@@ -4,7 +4,7 @@
4
4
  <head>
5
5
  <title></title>
6
6
  <meta http-equiv="Content-type" content="text/html; charset=utf-8" />
7
- <link rel="stylesheet" type="text/css" href="epub.css"/>
7
+ <link rel="stylesheet" type="text/css" href="style.css"/>
8
8
  </head>
9
9
 
10
10
  <body>
@@ -0,0 +1,353 @@
1
+ /* ============ */
2
+ /* = DEFAULTS = */
3
+ /* ============ */
4
+ html * {
5
+ font: normal normal normal 12pt/normal Constantia, Palatino, "Palatino Linotype", "Palatino LT STD", Georgia, serif;
6
+ }
7
+
8
+ /* ========= */
9
+ /* = PAGES = */
10
+ /* ========= */
11
+ @page {
12
+ margin: 12mm 16mm 10mm 16mm;
13
+ size: 7in 9.25in landscape;
14
+
15
+ @footnotes {
16
+ border-top: thin solid black;
17
+ margin-left: 30%;
18
+ margin-top: 0.6em;
19
+ padding-top: 0.3em;
20
+ }
21
+
22
+ @bottom-right {
23
+ color: #000;
24
+ content: counter(page);
25
+ font-family: helvetica, arial, sans-serif;
26
+ font-size: 12px;
27
+ margin-top: -10px;
28
+ margin-right: -40px;
29
+ }
30
+ }
31
+
32
+ @page toc {
33
+ margin-right: 6mm;
34
+
35
+ @bottom-right {
36
+ content: "";
37
+ }
38
+ }
39
+
40
+ @page cover {
41
+ margin: 0;
42
+
43
+ @bottom-right {
44
+ content: "";
45
+ }
46
+ }
47
+
48
+ /* ============= */
49
+ /* = BOOKMARKS = */
50
+ /* ============= */
51
+ h1, h2, h3, h4, h5, h6 {
52
+ prince-bookmark-level: none;
53
+ }
54
+
55
+ .frontcover h1 { prince-bookmark-level: 1; }
56
+ .chapter h2 { prince-bookmark-level: 2; }
57
+ .chapter h3 { prince-bookmark-level: 3; }
58
+ .chapter h4 { prince-bookmark-level: 4; }
59
+ .chapter h5 { prince-bookmark-level: 5; }
60
+ .chapter h6 { prince-bookmark-level: 6; }
61
+
62
+ /* ============= */
63
+ /* = CONTAINER = */
64
+ /* ============= */
65
+ div.container {
66
+ height: 7in;
67
+ left: 0;
68
+ page: cover;
69
+ position: absolute;
70
+ top: 0;
71
+ width: 9.25in;
72
+ z-index: -1;
73
+ }
74
+
75
+ /* ============== */
76
+ /* = FRONTCOVER = */
77
+ /* ============== */
78
+ div.frontcover {
79
+ background: #fff;
80
+ }
81
+
82
+ div.frontcover div {
83
+ left: 1in;
84
+ padding-top: 0.25in;
85
+ position: absolute;
86
+ top: 2.5in;
87
+ width: 7.25in;
88
+ }
89
+
90
+ div.frontcover h1 {
91
+ color: #f00;
92
+ font-size: 46pt;
93
+ }
94
+
95
+ div.frontcover p {
96
+ font-size: 18pt;
97
+ }
98
+
99
+ div.frontcover p.description {
100
+ color: #666;
101
+ font: italic normal normal 14pt/normal Baskerville, "Hoefler Text", Garamond, "Times New Roman", serif;
102
+ margin-top: -.1in;
103
+ }
104
+
105
+ div.frontcover p.authors {
106
+ color: #000;
107
+ font-style: italic;
108
+ position: absolute;
109
+ top: 0;
110
+ }
111
+
112
+ div.frontcover * {
113
+ margin: 0;
114
+ }
115
+
116
+ /* =========== */
117
+ /* = CHAPTER = */
118
+ /* =========== */
119
+ #chapters {
120
+ counter-reset: page 1;
121
+ counter-reset: chapter 1;
122
+ page-break-before: always;
123
+ }
124
+
125
+ .chapter {
126
+ color: #444;
127
+ counter-reset: footnote 0;
128
+ page-break-after: always;
129
+ }
130
+
131
+ .chapter a {
132
+ color: #0AE;
133
+ text-decoration: none;
134
+ }
135
+
136
+ .chapter h2,
137
+ .chapter h3,
138
+ .chapter h4,
139
+ .chapter h5 {
140
+ margin: 25pt 0 15pt 0;
141
+ }
142
+
143
+ .chapter h2 {
144
+ color: #222;
145
+ counter-increment: chapter;
146
+ font-size: 36pt;
147
+ line-height: 1;
148
+ string-set: header "Chapter " counter(chapter) ": " content();
149
+ }
150
+
151
+ .chapter h2::before {
152
+ content: "Chapter " counter(chapter);
153
+ color: #999;
154
+ display: block;
155
+ font-size: 18pt;
156
+ letter-spacing: 0;
157
+ margin-bottom: .2em;
158
+ white-space: pre;
159
+ }
160
+
161
+ .chapter h3,
162
+ .chapter h5 {
163
+ font-family: "helvetica", arial, sans-serif;
164
+ }
165
+
166
+ .chapter h3 {
167
+ color: #b62f32;
168
+ font-size: 28px;
169
+ }
170
+
171
+ .chapter h4 {
172
+ font-size: 18px;
173
+ font-family: "helvetica neue", "arial narrow", sans-serif;
174
+ }
175
+
176
+ .chapter h5 {
177
+ font-size: 15px;
178
+ }
179
+
180
+ .chapter h6 {
181
+ font-size: 15px;
182
+ font-weight: normal;
183
+ text-transform: uppercase;
184
+ }
185
+
186
+ /* =========== */
187
+ /* = IMPRINT = */
188
+ /* =========== */
189
+ .imprint {
190
+ background: #E2E7E2;
191
+ page: cover;
192
+ string-set: header "";
193
+ }
194
+
195
+ .imprint, .imprint * {
196
+ color: #5b5b5b;
197
+ }
198
+
199
+ .imprint * {
200
+ font-family: "Lucida Grande", arial, sans-serif;
201
+ font-size: 10pt;
202
+ margin: 0 0 2pt 0;
203
+ }
204
+
205
+ .imprint div {
206
+ left: 0.5in;
207
+ position: absolute;
208
+ bottom: 0.3in;
209
+ }
210
+
211
+ /* ========== */
212
+ /* = CODING = */
213
+ /* ========== */
214
+ pre, code {
215
+ color: #090;
216
+ font-family: monaco, monospace;
217
+ font-size: 9pt;
218
+ }
219
+
220
+ pre, pre code {
221
+ font-size: 8pt;
222
+ line-height: 1.4;
223
+ padding-left: 25pt;
224
+ }
225
+
226
+ /* ========= */
227
+ /* = TABLE = */
228
+ /* ========= */
229
+ table {
230
+ border-collapse: collapse;
231
+ }
232
+
233
+ thead th {
234
+ background: #e9e9e9;
235
+ }
236
+
237
+ th, td {
238
+ border: 1px solid #ccc;
239
+ font-size: 11pt;
240
+ padding: 5pt;
241
+ }
242
+
243
+ /* ========= */
244
+ /* = LISTS = */
245
+ /* ========= */
246
+ li {
247
+ margin-bottom: 8pt;
248
+ }
249
+
250
+ li ul,
251
+ li ol {
252
+ margin-left: 15pt;
253
+ }
254
+
255
+ /* ========== */
256
+ /* = FIGURE = */
257
+ /* ========== */
258
+ .figure img:after {
259
+ content: attr("alt");
260
+ display: block;
261
+ font-size: 10pt;
262
+ }
263
+
264
+ img {
265
+ max-width: none;
266
+ prince-image-resolution: 96dpi;
267
+ }
268
+
269
+ .figure {
270
+ float: right;
271
+ margin: 0 0 20pt 20pt;
272
+ overflow: auto;
273
+ text-align: center;
274
+ }
275
+
276
+ /* ===================== */
277
+ /* = TABLE OF CONTENTS = */
278
+ /* ===================== */
279
+ div.table-of-contents {
280
+ page: toc;
281
+ }
282
+
283
+ div.table-of-contents h2 {
284
+ font-size: 36pt;
285
+ }
286
+
287
+ div.table-of-contents a {
288
+ font-size: 11pt;
289
+ text-decoration: none;
290
+ }
291
+
292
+ div.table-of-contents div.level2 a {
293
+ color: #000;
294
+ font-weight: bold;
295
+ }
296
+
297
+ div.table-of-contents #toc {
298
+ column-count: 2;
299
+ column-fill: auto;
300
+ column-gap: 5%;
301
+ column-rule: none;
302
+ column-width: 45%;
303
+ }
304
+
305
+ div.table-of-contents #toc div {
306
+ padding-bottom: 10px;
307
+ }
308
+
309
+ div.table-of-contents div.level3 {
310
+ margin-left: 20px;
311
+ }
312
+
313
+ div.table-of-contents #toc div.level3 a {
314
+ color: #555;
315
+ }
316
+
317
+ div.table-of-contents div a::before {
318
+ color: #888;
319
+ content: target-counter(attr(href), page) " ";
320
+ float: left;
321
+ font-weight: normal;
322
+ font-size: 11pt !important;
323
+ margin-right: 4px;
324
+ width: 40px;
325
+ }
326
+
327
+ div.table-of-contents div.level3 a::before {
328
+ width: 20px;
329
+ }
330
+
331
+ div.table-of-contents div.level4,
332
+ div.table-of-contents div.level5,
333
+ div.table-of-contents div.level6 {
334
+ display: none;
335
+ }
336
+
337
+ /* ===================== */
338
+ /* = OTHER TEXT TWEAKS = */
339
+ /* ===================== */
340
+ acronym:after {
341
+ content: " (" attr(title) ")";
342
+ }
343
+
344
+ /* ============= */
345
+ /* = HIGHLIGHT = */
346
+ /* ============= */
347
+ .highlight {
348
+ font-size: 20pt;
349
+ }
350
+
351
+ .highlight strong {
352
+ color: #b62f32;
353
+ }