FooBarWidget-mizuho 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +20 -0
- data/README.markdown +68 -0
- data/Rakefile +9 -0
- data/asciidoc/BUGS +34 -0
- data/asciidoc/BUGS.txt +28 -0
- data/asciidoc/CHANGELOG +1585 -0
- data/asciidoc/CHANGELOG.txt +1595 -0
- data/asciidoc/COPYING +339 -0
- data/asciidoc/COPYRIGHT +18 -0
- data/asciidoc/INSTALL +82 -0
- data/asciidoc/INSTALL.txt +71 -0
- data/asciidoc/README +46 -0
- data/asciidoc/README.txt +36 -0
- data/asciidoc/a2x +641 -0
- data/asciidoc/asciidoc.conf +404 -0
- data/asciidoc/asciidoc.py +4255 -0
- data/asciidoc/common.aap +9 -0
- data/asciidoc/dblatex/asciidoc-dblatex.sty +18 -0
- data/asciidoc/dblatex/asciidoc-dblatex.xsl +17 -0
- data/asciidoc/dblatex/dblatex-readme.txt +22 -0
- data/asciidoc/doc/a2x.1 +246 -0
- data/asciidoc/doc/a2x.1.txt +195 -0
- data/asciidoc/doc/article.css-embedded.html +579 -0
- data/asciidoc/doc/article.html +62 -0
- data/asciidoc/doc/article.pdf +0 -0
- data/asciidoc/doc/article.txt +124 -0
- data/asciidoc/doc/asciidoc-revhistory.xml +27 -0
- data/asciidoc/doc/asciidoc.1 +161 -0
- data/asciidoc/doc/asciidoc.1.css-embedded.html +562 -0
- data/asciidoc/doc/asciidoc.1.css.html +212 -0
- data/asciidoc/doc/asciidoc.1.html +190 -0
- data/asciidoc/doc/asciidoc.1.txt +118 -0
- data/asciidoc/doc/asciidoc.conf +8 -0
- data/asciidoc/doc/asciidoc.css-embedded.html +7954 -0
- data/asciidoc/doc/asciidoc.css.html +7553 -0
- data/asciidoc/doc/asciidoc.dict +673 -0
- data/asciidoc/doc/asciidoc.html +3502 -0
- data/asciidoc/doc/asciidoc.txt +4757 -0
- data/asciidoc/doc/asciimath.txt +47 -0
- data/asciidoc/doc/book-multi.css-embedded.html +575 -0
- data/asciidoc/doc/book-multi.html +72 -0
- data/asciidoc/doc/book-multi.txt +159 -0
- data/asciidoc/doc/book.css-embedded.html +585 -0
- data/asciidoc/doc/book.html +60 -0
- data/asciidoc/doc/book.txt +133 -0
- data/asciidoc/doc/customers.csv +18 -0
- data/asciidoc/doc/faq.txt +262 -0
- data/asciidoc/doc/latex-backend.html +224 -0
- data/asciidoc/doc/latex-backend.txt +193 -0
- data/asciidoc/doc/latexmath.txt +35 -0
- data/asciidoc/doc/main.aap +293 -0
- data/asciidoc/doc/music-filter.html +513 -0
- data/asciidoc/doc/music-filter.pdf +0 -0
- data/asciidoc/doc/music-filter.txt +158 -0
- data/asciidoc/doc/source-highlight-filter.html +183 -0
- data/asciidoc/doc/source-highlight-filter.pdf +0 -0
- data/asciidoc/doc/source-highlight-filter.txt +174 -0
- data/asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt +71 -0
- data/asciidoc/docbook-xsl/chunked.xsl +19 -0
- data/asciidoc/docbook-xsl/common.xsl +67 -0
- data/asciidoc/docbook-xsl/fo.xsl +117 -0
- data/asciidoc/docbook-xsl/htmlhelp.xsl +17 -0
- data/asciidoc/docbook-xsl/manpage.xsl +28 -0
- data/asciidoc/docbook-xsl/shaded-literallayout.patch +32 -0
- data/asciidoc/docbook-xsl/xhtml.xsl +14 -0
- data/asciidoc/docbook.conf +606 -0
- data/asciidoc/examples/website/CHANGELOG.html +3828 -0
- data/asciidoc/examples/website/INSTALL.html +163 -0
- data/asciidoc/examples/website/README-website.html +129 -0
- data/asciidoc/examples/website/README-website.txt +29 -0
- data/asciidoc/examples/website/README.html +125 -0
- data/asciidoc/examples/website/a2x.1.html +395 -0
- data/asciidoc/examples/website/asciidoc-docbook-xsl.html +165 -0
- data/asciidoc/examples/website/asciimath.html +157 -0
- data/asciidoc/examples/website/build-website.sh +25 -0
- data/asciidoc/examples/website/downloads.html +219 -0
- data/asciidoc/examples/website/downloads.txt +98 -0
- data/asciidoc/examples/website/faq.html +372 -0
- data/asciidoc/examples/website/index.html +398 -0
- data/asciidoc/examples/website/index.txt +222 -0
- data/asciidoc/examples/website/latex-backend.html +640 -0
- data/asciidoc/examples/website/latexmath.html +119 -0
- data/asciidoc/examples/website/layout1.conf +161 -0
- data/asciidoc/examples/website/layout1.css +65 -0
- data/asciidoc/examples/website/layout2.conf +158 -0
- data/asciidoc/examples/website/layout2.css +93 -0
- data/asciidoc/examples/website/manpage.html +266 -0
- data/asciidoc/examples/website/music-filter.html +242 -0
- data/asciidoc/examples/website/music1.abc +12 -0
- data/asciidoc/examples/website/music1.png +0 -0
- data/asciidoc/examples/website/music2.ly +9 -0
- data/asciidoc/examples/website/music2.png +0 -0
- data/asciidoc/examples/website/source-highlight-filter.html +251 -0
- data/asciidoc/examples/website/support.html +78 -0
- data/asciidoc/examples/website/support.txt +5 -0
- data/asciidoc/examples/website/userguide.html +7597 -0
- data/asciidoc/examples/website/version9.html +143 -0
- data/asciidoc/examples/website/version9.txt +48 -0
- data/asciidoc/filters/code-filter-readme.txt +37 -0
- data/asciidoc/filters/code-filter-test-c++.txt +7 -0
- data/asciidoc/filters/code-filter-test.txt +15 -0
- data/asciidoc/filters/code-filter.conf +8 -0
- data/asciidoc/filters/code-filter.py +239 -0
- data/asciidoc/filters/music-filter-test.txt +40 -0
- data/asciidoc/filters/music-filter.conf +40 -0
- data/asciidoc/filters/music2png.py +189 -0
- data/asciidoc/filters/source-highlight-filter-test.txt +19 -0
- data/asciidoc/filters/source-highlight-filter.conf +100 -0
- data/asciidoc/help.conf +213 -0
- data/asciidoc/html4.conf +363 -0
- data/asciidoc/images/highlighter.png +0 -0
- data/asciidoc/images/icons/README +5 -0
- data/asciidoc/images/icons/callouts/1.png +0 -0
- data/asciidoc/images/icons/callouts/10.png +0 -0
- data/asciidoc/images/icons/callouts/11.png +0 -0
- data/asciidoc/images/icons/callouts/12.png +0 -0
- data/asciidoc/images/icons/callouts/13.png +0 -0
- data/asciidoc/images/icons/callouts/14.png +0 -0
- data/asciidoc/images/icons/callouts/15.png +0 -0
- data/asciidoc/images/icons/callouts/2.png +0 -0
- data/asciidoc/images/icons/callouts/3.png +0 -0
- data/asciidoc/images/icons/callouts/4.png +0 -0
- data/asciidoc/images/icons/callouts/5.png +0 -0
- data/asciidoc/images/icons/callouts/6.png +0 -0
- data/asciidoc/images/icons/callouts/7.png +0 -0
- data/asciidoc/images/icons/callouts/8.png +0 -0
- data/asciidoc/images/icons/callouts/9.png +0 -0
- data/asciidoc/images/icons/caution.png +0 -0
- data/asciidoc/images/icons/example.png +0 -0
- data/asciidoc/images/icons/home.png +0 -0
- data/asciidoc/images/icons/important.png +0 -0
- data/asciidoc/images/icons/next.png +0 -0
- data/asciidoc/images/icons/note.png +0 -0
- data/asciidoc/images/icons/prev.png +0 -0
- data/asciidoc/images/icons/tip.png +0 -0
- data/asciidoc/images/icons/up.png +0 -0
- data/asciidoc/images/icons/warning.png +0 -0
- data/asciidoc/images/smallnew.png +0 -0
- data/asciidoc/images/tiger.png +0 -0
- data/asciidoc/install.sh +55 -0
- data/asciidoc/javascripts/ASCIIMathML.js +938 -0
- data/asciidoc/javascripts/LaTeXMathML.js +1223 -0
- data/asciidoc/javascripts/toc.js +69 -0
- data/asciidoc/lang-es.conf +15 -0
- data/asciidoc/latex.conf +663 -0
- data/asciidoc/linuxdoc.conf +285 -0
- data/asciidoc/math.conf +50 -0
- data/asciidoc/stylesheets/docbook-xsl.css +271 -0
- data/asciidoc/stylesheets/xhtml-deprecated-manpage.css +21 -0
- data/asciidoc/stylesheets/xhtml-deprecated.css +247 -0
- data/asciidoc/stylesheets/xhtml11-manpage.css +18 -0
- data/asciidoc/stylesheets/xhtml11-quirks.css +49 -0
- data/asciidoc/stylesheets/xhtml11.css +284 -0
- data/asciidoc/t.conf +20 -0
- data/asciidoc/text.conf +16 -0
- data/asciidoc/vim/ftdetect/asciidoc_filetype.vim +53 -0
- data/asciidoc/vim/syntax/asciidoc.vim +139 -0
- data/asciidoc/xhtml-deprecated-css.conf +235 -0
- data/asciidoc/xhtml-deprecated.conf +351 -0
- data/asciidoc/xhtml11-quirks.conf +57 -0
- data/asciidoc/xhtml11.conf +514 -0
- data/bin/mizuho +40 -0
- data/lib/mizuho/chapter.rb +54 -0
- data/lib/mizuho/generator.rb +106 -0
- data/lib/mizuho/heading.rb +46 -0
- data/lib/mizuho/parser.rb +99 -0
- data/lib/mizuho/template.rb +50 -0
- data/mizuho.gemspec +34 -0
- data/templates/asciidoc.css +358 -0
- data/templates/asciidoc.html.erb +86 -0
- data/templates/manualsonrails.css +165 -0
- data/templates/manualsonrails.html.erb +97 -0
- data/test/parser_spec.rb +190 -0
- data/test/spec_helper.rb +43 -0
- metadata +234 -0
data/bin/mizuho
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
$LOAD_PATH << File.expand_path(File.dirname(__FILE__) + "/../lib")
|
3
|
+
require 'optparse'
|
4
|
+
require 'mizuho/generator'
|
5
|
+
|
6
|
+
$KCODE = 'UTF-8'
|
7
|
+
options = {}
|
8
|
+
parser = OptionParser.new do |opts|
|
9
|
+
opts.banner = "Usage: mizuho [options] INPUT"
|
10
|
+
opts.separator ""
|
11
|
+
|
12
|
+
opts.separator "Options:"
|
13
|
+
opts.on("-t", "--template FILE", String, "Specify a template file to use.") do |value|
|
14
|
+
options[:template] = value
|
15
|
+
end
|
16
|
+
opts.on("-m", "--multi-page", "Generate one file per chapter.") do |value|
|
17
|
+
options[:multi_page] = value
|
18
|
+
end
|
19
|
+
opts.on("--icons-dir DIR", "Specify the directory in which icons\n" <<
|
20
|
+
"#{' ' * 37}should be searched. Defaults to\n" <<
|
21
|
+
"#{' ' * 37}'images/icons'.") do |value|
|
22
|
+
options[:icons_dir] = value
|
23
|
+
end
|
24
|
+
end
|
25
|
+
begin
|
26
|
+
parser.parse!
|
27
|
+
rescue OptionParser::ParseError => e
|
28
|
+
puts e
|
29
|
+
puts
|
30
|
+
puts "Please see '--help' for valid options."
|
31
|
+
exit 1
|
32
|
+
end
|
33
|
+
|
34
|
+
begin
|
35
|
+
Mizuho::Generator.new(ARGV[0], nil, options[:template],
|
36
|
+
options[:multi_page], options[:icons_dir]).start
|
37
|
+
rescue Mizuho::GenerationError
|
38
|
+
STDERR.puts "*** ERROR"
|
39
|
+
exit 2
|
40
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Mizuho
|
2
|
+
|
3
|
+
class Chapter
|
4
|
+
# This may be nil, indicating that this chapter is the preamble.
|
5
|
+
attr_accessor :heading
|
6
|
+
attr_accessor :filename
|
7
|
+
attr_accessor :contents
|
8
|
+
|
9
|
+
def is_preamble?
|
10
|
+
return heading.nil?
|
11
|
+
end
|
12
|
+
|
13
|
+
def title
|
14
|
+
if @heading
|
15
|
+
return @heading.title
|
16
|
+
else
|
17
|
+
return nil
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def title_without_numbers
|
22
|
+
if @heading
|
23
|
+
return @heading.title_without_numbers
|
24
|
+
else
|
25
|
+
return nil
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def plain_title
|
30
|
+
if @heading
|
31
|
+
return @heading.plain_title
|
32
|
+
else
|
33
|
+
return nil
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
def basename
|
38
|
+
return File.basename(filename)
|
39
|
+
end
|
40
|
+
|
41
|
+
def anchor
|
42
|
+
if @heading
|
43
|
+
return @heading.anchor
|
44
|
+
else
|
45
|
+
return nil
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
def anchor_id
|
50
|
+
return anchor.sub(/^#/, '')
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
end
|
@@ -0,0 +1,106 @@
|
|
1
|
+
require 'optparse'
|
2
|
+
require 'digest/sha1'
|
3
|
+
require 'mizuho/parser'
|
4
|
+
require 'mizuho/template'
|
5
|
+
|
6
|
+
module Mizuho
|
7
|
+
|
8
|
+
class GenerationError < StandardError
|
9
|
+
end
|
10
|
+
|
11
|
+
class Generator
|
12
|
+
def initialize(input, output = nil, template_name = nil, multi_page = false, icons_dir = nil)
|
13
|
+
@input = input
|
14
|
+
if output
|
15
|
+
@output_name = output
|
16
|
+
else
|
17
|
+
@output_name = File.expand_path(input.sub(/(.*)\..*$/, '\1'))
|
18
|
+
end
|
19
|
+
@template = locate_template_file(template_name)
|
20
|
+
@multi_page = multi_page
|
21
|
+
@icons_dir = icons_dir
|
22
|
+
end
|
23
|
+
|
24
|
+
def start
|
25
|
+
self.class.run_asciidoc(@input, "#{@output_name}.html", @icons_dir)
|
26
|
+
if @template
|
27
|
+
apply_template("#{@output_name}.html", @template, @multi_page)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.run_asciidoc(input, output, icons_dir = nil)
|
32
|
+
args = ["python", ASCIIDOC, "-a", "toc", "-a", "icons"]
|
33
|
+
if icons_dir
|
34
|
+
args << "-a"
|
35
|
+
args << "iconsdir=#{icons_dir}"
|
36
|
+
end
|
37
|
+
args += ["-n", "-o", output, input]
|
38
|
+
if !system(*args)
|
39
|
+
raise GenerationError, "Asciidoc failed."
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
private
|
44
|
+
ROOT = File.expand_path(File.dirname(__FILE__) + "/../..")
|
45
|
+
ASCIIDOC = "#{ROOT}/asciidoc/asciidoc.py"
|
46
|
+
|
47
|
+
def locate_template_file(template_name)
|
48
|
+
if template_name.nil?
|
49
|
+
return "#{ROOT}/templates/asciidoc.html.erb"
|
50
|
+
elsif template_name =~ %r{[/.]}
|
51
|
+
# Looks like a filename.
|
52
|
+
return template_name
|
53
|
+
else
|
54
|
+
return "#{ROOT}/templates/#{template_name}.html.erb"
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
def apply_template(asciidoc_file, template_file, multi_page)
|
59
|
+
parser = Parser.new(asciidoc_file)
|
60
|
+
if multi_page
|
61
|
+
File.unlink(asciidoc_file)
|
62
|
+
assign_chapter_filenames_and_heading_basenames(parser.chapters)
|
63
|
+
parser.chapters.each_with_index do |chapter, i|
|
64
|
+
template = Template.new(template_file,
|
65
|
+
:multi_page? => true,
|
66
|
+
:title => parser.title,
|
67
|
+
:table_of_contents => parser.table_of_contents,
|
68
|
+
:contents => chapter.contents,
|
69
|
+
:is_preamble? => chapter.heading.nil?,
|
70
|
+
:chapters => parser.chapters,
|
71
|
+
:prev_chapter => (i <= 1) ? nil : parser.chapters[i - 1],
|
72
|
+
:current_chapter => chapter,
|
73
|
+
:next_chapter => parser.chapters[i + 1])
|
74
|
+
template.save(chapter.filename)
|
75
|
+
end
|
76
|
+
else
|
77
|
+
template = Template.new(template_file,
|
78
|
+
:multi_page? => false,
|
79
|
+
:title => parser.title,
|
80
|
+
:table_of_contents => parser.table_of_contents,
|
81
|
+
:contents => parser.contents)
|
82
|
+
template.save(asciidoc_file)
|
83
|
+
end
|
84
|
+
rescue Template::Error => e
|
85
|
+
STDERR.puts("*** #{template_file}:\n#{e}")
|
86
|
+
exit 1
|
87
|
+
end
|
88
|
+
|
89
|
+
def assign_chapter_filenames_and_heading_basenames(chapters)
|
90
|
+
chapters.each_with_index do |chapter, i|
|
91
|
+
if chapter.is_preamble?
|
92
|
+
chapter.filename = "#{@output_name}.html"
|
93
|
+
else
|
94
|
+
title_sha1 = Digest::SHA1.hexdigest(chapter.title_without_numbers)
|
95
|
+
chapter.filename = sprintf("%s-%s.html", @output_name,
|
96
|
+
title_sha1.slice(0..7))
|
97
|
+
chapter.heading.basename = File.basename(chapter.filename)
|
98
|
+
chapter.heading.each_descendant do |h|
|
99
|
+
h.basename = File.basename(chapter.filename)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
|
3
|
+
module Mizuho
|
4
|
+
|
5
|
+
class Heading
|
6
|
+
# The heading title, as HTML. Non-HTML special characters are already escaped.
|
7
|
+
attr_accessor :title
|
8
|
+
attr_accessor :level
|
9
|
+
attr_accessor :basename
|
10
|
+
attr_accessor :anchor
|
11
|
+
attr_accessor :parent
|
12
|
+
attr_accessor :children
|
13
|
+
|
14
|
+
def initialize
|
15
|
+
@children = []
|
16
|
+
end
|
17
|
+
|
18
|
+
def find_parent_with_level(level)
|
19
|
+
h = self
|
20
|
+
while h && h.level != level
|
21
|
+
h = h.parent
|
22
|
+
end
|
23
|
+
return h
|
24
|
+
end
|
25
|
+
|
26
|
+
# The heading title without section number, as HTML. Non-HTML special characters
|
27
|
+
# are already escaped.
|
28
|
+
def title_without_numbers
|
29
|
+
return title.sub(/^(\d+\.)+ /, '')
|
30
|
+
end
|
31
|
+
|
32
|
+
# The heading title without section number, as plain text. Contains no HTML
|
33
|
+
# elements. Non-HTML special characters are NOT escaped.
|
34
|
+
def plain_title
|
35
|
+
return CGI::unescapeHTML(title_without_numbers.gsub(%r{</?[a-z]+>}i, ''))
|
36
|
+
end
|
37
|
+
|
38
|
+
def each_descendant(&block)
|
39
|
+
children.each do |h|
|
40
|
+
block.call(h)
|
41
|
+
h.each_descendant(&block)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
end
|
@@ -0,0 +1,99 @@
|
|
1
|
+
require 'cgi'
|
2
|
+
require 'mizuho/heading'
|
3
|
+
require 'mizuho/chapter'
|
4
|
+
|
5
|
+
module Mizuho
|
6
|
+
|
7
|
+
# This class can parse the raw Asciidoc XHTML output, and extract the title, raw
|
8
|
+
# contents (without layout) and other information from it.
|
9
|
+
class Parser
|
10
|
+
attr_reader :filename
|
11
|
+
|
12
|
+
# The document's title.
|
13
|
+
attr_reader :title
|
14
|
+
# The document's table of contents, represented in a tree structure
|
15
|
+
# by Heading objects.
|
16
|
+
attr_reader :table_of_contents
|
17
|
+
# The document's raw contents, without any layout.
|
18
|
+
attr_reader :contents
|
19
|
+
|
20
|
+
# Parse the given file.
|
21
|
+
def initialize(filename)
|
22
|
+
@filename = filename
|
23
|
+
|
24
|
+
@contents = File.read(filename)
|
25
|
+
|
26
|
+
# Extract the title.
|
27
|
+
@contents =~ %r{<title>(.*?)</title>}
|
28
|
+
@title = CGI::unescapeHTML($1)
|
29
|
+
|
30
|
+
# Get rid of the Asciidoc layout and unwanted elements.
|
31
|
+
@contents.sub!(/\A.*?(<div id="preamble">)/m, '\1')
|
32
|
+
@contents.sub!(/<div id="footer">.*/m, '')
|
33
|
+
@contents.gsub!(%r{<div style="clear:left"></div>}, '')
|
34
|
+
|
35
|
+
# Extract table of contents.
|
36
|
+
parse_table_of_contents(@contents)
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns the individual chapters as an array of Chapter objects. The
|
40
|
+
# first Chapter object represents the preamble.
|
41
|
+
def chapters
|
42
|
+
@chapters ||= parse_chapters(@contents)
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
def parse_table_of_contents(html)
|
47
|
+
@headings = []
|
48
|
+
current_heading = toplevel_heading = Heading.new
|
49
|
+
current_heading.title = @title
|
50
|
+
current_heading.level = 1
|
51
|
+
offset = 0
|
52
|
+
while true
|
53
|
+
offset = html.index(%r{<h(\d) id="(.*?)">(.*?)</h\d>}, offset)
|
54
|
+
break if offset.nil?
|
55
|
+
offset = $~.end(0)
|
56
|
+
level = $1.to_i
|
57
|
+
anchor = CGI::unescapeHTML($2)
|
58
|
+
title = $3
|
59
|
+
|
60
|
+
new_heading = Heading.new
|
61
|
+
new_heading.title = title
|
62
|
+
new_heading.level = level
|
63
|
+
new_heading.anchor = "##{anchor}"
|
64
|
+
new_heading.parent = current_heading.find_parent_with_level(level - 1)
|
65
|
+
new_heading.parent.children << new_heading
|
66
|
+
current_heading = new_heading
|
67
|
+
@headings << new_heading
|
68
|
+
end
|
69
|
+
@table_of_contents = toplevel_heading.children
|
70
|
+
end
|
71
|
+
|
72
|
+
def parse_chapters(html)
|
73
|
+
if !defined?(Hpricot)
|
74
|
+
require 'rubygems'
|
75
|
+
require 'hpricot'
|
76
|
+
end
|
77
|
+
doc = Hpricot(contents)
|
78
|
+
result = []
|
79
|
+
|
80
|
+
has_preamble = !(doc / '#preamble').empty?
|
81
|
+
|
82
|
+
# TODO: fix cross-references
|
83
|
+
(doc / 'div.sectionbody').each_with_index do |elem, i|
|
84
|
+
chapter = Chapter.new
|
85
|
+
if has_preamble
|
86
|
+
if i > 0
|
87
|
+
chapter.heading = @table_of_contents[i - 1]
|
88
|
+
end
|
89
|
+
else
|
90
|
+
chapter.heading = @table_of_contents[i]
|
91
|
+
end
|
92
|
+
chapter.contents = elem.inner_html
|
93
|
+
result << chapter
|
94
|
+
end
|
95
|
+
return result
|
96
|
+
end
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
@@ -0,0 +1,50 @@
|
|
1
|
+
require 'erb'
|
2
|
+
require 'mizuho/parser'
|
3
|
+
|
4
|
+
module Mizuho
|
5
|
+
|
6
|
+
class Template
|
7
|
+
class Error < StandardError
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize(template_file, options)
|
11
|
+
@template_file = template_file
|
12
|
+
@base_dir = File.expand_path(File.dirname(@template_file))
|
13
|
+
@options = options
|
14
|
+
options.each_key do |key|
|
15
|
+
raise "All option keys must be symbols." if !key.is_a?(Symbol)
|
16
|
+
raise "Invalid key name '#{key}'." if key.to_s !~ /\A[a-z0-9_]+\??\Z/i
|
17
|
+
eval %{
|
18
|
+
def #{key}
|
19
|
+
@options[:#{key}]
|
20
|
+
end
|
21
|
+
}
|
22
|
+
end
|
23
|
+
apply
|
24
|
+
end
|
25
|
+
|
26
|
+
def save(output_file)
|
27
|
+
File.open(output_file, 'w') do |f|
|
28
|
+
f.write(@output_contents)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
protected
|
33
|
+
include ERB::Util
|
34
|
+
|
35
|
+
def include_file(basename)
|
36
|
+
return File.read(File.join(@base_dir, basename))
|
37
|
+
end
|
38
|
+
|
39
|
+
private
|
40
|
+
def get_binding
|
41
|
+
return binding
|
42
|
+
end
|
43
|
+
|
44
|
+
def apply
|
45
|
+
erb = ERB.new(File.read(@template_file), nil, '-')
|
46
|
+
@output_contents = eval(erb.src, get_binding, @template_file)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
end
|
data/mizuho.gemspec
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = "mizuho"
|
3
|
+
s.version = "0.9.0"
|
4
|
+
s.date = "2008-07-21"
|
5
|
+
s.summary = "Mizuho documentation formatting tool"
|
6
|
+
s.email = "hongli@phusion.nl"
|
7
|
+
s.homepage = "http://github.com/FooBarWidget/mizuho/tree/master"
|
8
|
+
s.description = "A documentation formatting tool. Mizuho converts Asciidoc input files into nicely outputted HTML, possibly one file per chapter. Multiple templates are supported, so you can write your own."
|
9
|
+
s.has_rdoc = false
|
10
|
+
s.executables = ["mizuho"]
|
11
|
+
s.authors = ["Hongli Lai"]
|
12
|
+
s.add_dependency("hpricot")
|
13
|
+
|
14
|
+
s.files = [
|
15
|
+
"README.markdown", "LICENSE.txt", "mizuho.gemspec", "Rakefile",
|
16
|
+
"bin/mizuho",
|
17
|
+
"lib/mizuho/chapter.rb",
|
18
|
+
"lib/mizuho/generator.rb",
|
19
|
+
"lib/mizuho/heading.rb",
|
20
|
+
"lib/mizuho/parser.rb",
|
21
|
+
"lib/mizuho/template.rb",
|
22
|
+
"test/parser_spec.rb",
|
23
|
+
"test/spec_helper.rb",
|
24
|
+
"templates/asciidoc.css",
|
25
|
+
"templates/asciidoc.html.erb",
|
26
|
+
"templates/manualsonrails.css",
|
27
|
+
"templates/manualsonrails.html.erb",
|
28
|
+
|
29
|
+
"asciidoc/vim/syntax/asciidoc.vim", "asciidoc/vim/ftdetect/asciidoc_filetype.vim", "asciidoc/filters/code-filter.conf", "asciidoc/filters/source-highlight-filter-test.txt", "asciidoc/filters/music-filter.conf", "asciidoc/filters/code-filter-test-c++.txt", "asciidoc/filters/code-filter-test.txt", "asciidoc/filters/source-highlight-filter.conf", "asciidoc/filters/music-filter-test.txt", "asciidoc/filters/code-filter.py", "asciidoc/filters/music2png.py", "asciidoc/filters/code-filter-readme.txt", "asciidoc/stylesheets/xhtml11-manpage.css", "asciidoc/stylesheets/xhtml11-quirks.css", "asciidoc/stylesheets/docbook-xsl.css", "asciidoc/stylesheets/xhtml-deprecated.css", "asciidoc/stylesheets/xhtml-deprecated-manpage.css", "asciidoc/stylesheets/xhtml11.css", "asciidoc/help.conf", "asciidoc/examples/website/downloads.txt", "asciidoc/examples/website/README.html", "asciidoc/examples/website/layout2.conf", "asciidoc/examples/website/support.html", "asciidoc/examples/website/version9.txt", "asciidoc/examples/website/faq.html", "asciidoc/examples/website/index.html", "asciidoc/examples/website/layout2.css", "asciidoc/examples/website/source-highlight-filter.html", "asciidoc/examples/website/a2x.1.html", "asciidoc/examples/website/INSTALL.html", "asciidoc/examples/website/README-website.html", "asciidoc/examples/website/music1.abc", "asciidoc/examples/website/music1.png", "asciidoc/examples/website/music-filter.html", "asciidoc/examples/website/layout1.conf", "asciidoc/examples/website/index.txt", "asciidoc/examples/website/build-website.sh", "asciidoc/examples/website/userguide.html",
|
30
|
+
"asciidoc/examples/website/asciimath.html", "asciidoc/examples/website/layout1.css", "asciidoc/examples/website/music2.png", "asciidoc/examples/website/asciidoc-docbook-xsl.html", "asciidoc/examples/website/support.txt", "asciidoc/examples/website/latexmath.html", "asciidoc/examples/website/CHANGELOG.html", "asciidoc/examples/website/version9.html", "asciidoc/examples/website/music2.ly", "asciidoc/examples/website/manpage.html", "asciidoc/examples/website/latex-backend.html", "asciidoc/examples/website/downloads.html", "asciidoc/examples/website/README-website.txt", "asciidoc/BUGS", "asciidoc/asciidoc.py", "asciidoc/common.aap", "asciidoc/images/icons/up.png", "asciidoc/images/icons/warning.png", "asciidoc/images/icons/note.png", "asciidoc/images/icons/next.png", "asciidoc/images/icons/important.png", "asciidoc/images/icons/home.png", "asciidoc/images/icons/README", "asciidoc/images/icons/caution.png", "asciidoc/images/icons/tip.png", "asciidoc/images/icons/prev.png", "asciidoc/images/icons/callouts/10.png", "asciidoc/images/icons/callouts/12.png", "asciidoc/images/icons/callouts/3.png", "asciidoc/images/icons/callouts/2.png", "asciidoc/images/icons/callouts/5.png", "asciidoc/images/icons/callouts/7.png", "asciidoc/images/icons/callouts/8.png", "asciidoc/images/icons/callouts/11.png", "asciidoc/images/icons/callouts/9.png", "asciidoc/images/icons/callouts/1.png", "asciidoc/images/icons/callouts/4.png", "asciidoc/images/icons/callouts/6.png", "asciidoc/images/icons/callouts/13.png", "asciidoc/images/icons/callouts/15.png", "asciidoc/images/icons/callouts/14.png", "asciidoc/images/icons/example.png", "asciidoc/images/highlighter.png", "asciidoc/images/smallnew.png", "asciidoc/images/tiger.png", "asciidoc/CHANGELOG",
|
31
|
+
"asciidoc/doc/asciidoc.1.html", "asciidoc/doc/source-highlight-filter.pdf", "asciidoc/doc/latexmath.txt", "asciidoc/doc/customers.csv", "asciidoc/doc/book.css-embedded.html", "asciidoc/doc/asciidoc.css.html", "asciidoc/doc/article.html", "asciidoc/doc/source-highlight-filter.html", "asciidoc/doc/book.txt", "asciidoc/doc/asciidoc.1", "asciidoc/doc/a2x.1", "asciidoc/doc/asciidoc.txt", "asciidoc/doc/asciidoc-revhistory.xml", "asciidoc/doc/article.txt", "asciidoc/doc/music-filter.html", "asciidoc/doc/asciidoc.dict", "asciidoc/doc/article.pdf", "asciidoc/doc/asciidoc.html", "asciidoc/doc/source-highlight-filter.txt", "asciidoc/doc/asciidoc.css-embedded.html", "asciidoc/doc/asciidoc.1.css.html", "asciidoc/doc/latex-backend.txt", "asciidoc/doc/article.css-embedded.html", "asciidoc/doc/music-filter.txt", "asciidoc/doc/asciimath.txt", "asciidoc/doc/book-multi.html", "asciidoc/doc/book-multi.txt", "asciidoc/doc/asciidoc.1.css-embedded.html", "asciidoc/doc/faq.txt", "asciidoc/doc/music-filter.pdf", "asciidoc/doc/main.aap", "asciidoc/doc/asciidoc.1.txt", "asciidoc/doc/latex-backend.html", "asciidoc/doc/asciidoc.conf", "asciidoc/doc/book-multi.css-embedded.html", "asciidoc/doc/book.html", "asciidoc/doc/a2x.1.txt", "asciidoc/INSTALL.txt", "asciidoc/javascripts/LaTeXMathML.js", "asciidoc/javascripts/toc.js", "asciidoc/javascripts/ASCIIMathML.js", "asciidoc/BUGS.txt",
|
32
|
+
"asciidoc/text.conf", "asciidoc/CHANGELOG.txt", "asciidoc/xhtml-deprecated.conf", "asciidoc/INSTALL", "asciidoc/a2x", "asciidoc/README", "asciidoc/COPYING", "asciidoc/COPYRIGHT", "asciidoc/docbook-xsl/fo.xsl", "asciidoc/docbook-xsl/manpage.xsl", "asciidoc/docbook-xsl/asciidoc-docbook-xsl.txt", "asciidoc/docbook-xsl/chunked.xsl", "asciidoc/docbook-xsl/htmlhelp.xsl", "asciidoc/docbook-xsl/common.xsl", "asciidoc/docbook-xsl/shaded-literallayout.patch", "asciidoc/docbook-xsl/xhtml.xsl", "asciidoc/html4.conf", "asciidoc/dblatex/asciidoc-dblatex.xsl", "asciidoc/dblatex/asciidoc-dblatex.sty", "asciidoc/dblatex/dblatex-readme.txt", "asciidoc/linuxdoc.conf", "asciidoc/lang-es.conf", "asciidoc/install.sh", "asciidoc/xhtml11.conf", "asciidoc/README.txt", "asciidoc/t.conf", "asciidoc/xhtml11-quirks.conf", "asciidoc/docbook.conf", "asciidoc/math.conf", "asciidoc/asciidoc.conf", "asciidoc/latex.conf", "asciidoc/xhtml-deprecated-css.conf"
|
33
|
+
]
|
34
|
+
end
|
@@ -0,0 +1,358 @@
|
|
1
|
+
/**** Asciidoc default CSS. ****/
|
2
|
+
|
3
|
+
/* Debug borders */
|
4
|
+
p, li, dt, dd, div, pre, h1, h2, h3, h4, h5, h6 {
|
5
|
+
/*
|
6
|
+
border: 1px solid red;
|
7
|
+
*/
|
8
|
+
}
|
9
|
+
|
10
|
+
body {
|
11
|
+
margin: 1em 5% 1em 5%;
|
12
|
+
}
|
13
|
+
|
14
|
+
a {
|
15
|
+
color: blue;
|
16
|
+
text-decoration: underline;
|
17
|
+
}
|
18
|
+
a:visited {
|
19
|
+
color: fuchsia;
|
20
|
+
}
|
21
|
+
|
22
|
+
em {
|
23
|
+
font-style: italic;
|
24
|
+
color: navy;
|
25
|
+
}
|
26
|
+
|
27
|
+
strong {
|
28
|
+
font-weight: bold;
|
29
|
+
color: #083194;
|
30
|
+
}
|
31
|
+
|
32
|
+
tt {
|
33
|
+
color: navy;
|
34
|
+
}
|
35
|
+
|
36
|
+
h1, h2, h3, h4, h5, h6 {
|
37
|
+
color: #527bbd;
|
38
|
+
font-family: sans-serif;
|
39
|
+
margin-top: 1.2em;
|
40
|
+
margin-bottom: 0.5em;
|
41
|
+
line-height: 1.3;
|
42
|
+
}
|
43
|
+
|
44
|
+
h1, h2, h3 {
|
45
|
+
border-bottom: 2px solid silver;
|
46
|
+
}
|
47
|
+
h2 {
|
48
|
+
padding-top: 0.5em;
|
49
|
+
}
|
50
|
+
h3 {
|
51
|
+
float: left;
|
52
|
+
}
|
53
|
+
h3 + * {
|
54
|
+
clear: left;
|
55
|
+
}
|
56
|
+
|
57
|
+
div.sectionbody {
|
58
|
+
font-family: serif;
|
59
|
+
margin-left: 0;
|
60
|
+
}
|
61
|
+
|
62
|
+
hr {
|
63
|
+
border: 1px solid silver;
|
64
|
+
}
|
65
|
+
|
66
|
+
p {
|
67
|
+
margin-top: 0.5em;
|
68
|
+
margin-bottom: 0.5em;
|
69
|
+
}
|
70
|
+
|
71
|
+
ul, ol, li > p {
|
72
|
+
margin-top: 0;
|
73
|
+
}
|
74
|
+
|
75
|
+
pre {
|
76
|
+
padding: 0;
|
77
|
+
margin: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
span#author {
|
81
|
+
color: #527bbd;
|
82
|
+
font-family: sans-serif;
|
83
|
+
font-weight: bold;
|
84
|
+
font-size: 1.1em;
|
85
|
+
}
|
86
|
+
span#email {
|
87
|
+
}
|
88
|
+
span#revision {
|
89
|
+
font-family: sans-serif;
|
90
|
+
}
|
91
|
+
|
92
|
+
div#footer {
|
93
|
+
font-family: sans-serif;
|
94
|
+
font-size: small;
|
95
|
+
border-top: 2px solid silver;
|
96
|
+
padding-top: 0.5em;
|
97
|
+
margin-top: 4.0em;
|
98
|
+
}
|
99
|
+
div#footer-text {
|
100
|
+
float: left;
|
101
|
+
padding-bottom: 0.5em;
|
102
|
+
}
|
103
|
+
div#footer-badges {
|
104
|
+
float: right;
|
105
|
+
padding-bottom: 0.5em;
|
106
|
+
}
|
107
|
+
|
108
|
+
div#preamble,
|
109
|
+
div.tableblock, div.imageblock, div.exampleblock, div.verseblock,
|
110
|
+
div.quoteblock, div.literalblock, div.listingblock, div.sidebarblock,
|
111
|
+
div.admonitionblock {
|
112
|
+
margin-right: 10%;
|
113
|
+
margin-top: 1.5em;
|
114
|
+
margin-bottom: 1.5em;
|
115
|
+
}
|
116
|
+
div.admonitionblock {
|
117
|
+
margin-top: 2.5em;
|
118
|
+
margin-bottom: 2.5em;
|
119
|
+
}
|
120
|
+
|
121
|
+
div.content { /* Block element content. */
|
122
|
+
padding: 0;
|
123
|
+
}
|
124
|
+
|
125
|
+
/* Block element titles. */
|
126
|
+
div.title, caption.title {
|
127
|
+
color: #527bbd;
|
128
|
+
font-family: sans-serif;
|
129
|
+
font-weight: bold;
|
130
|
+
text-align: left;
|
131
|
+
margin-top: 1.0em;
|
132
|
+
margin-bottom: 0.5em;
|
133
|
+
}
|
134
|
+
div.title + * {
|
135
|
+
margin-top: 0;
|
136
|
+
}
|
137
|
+
|
138
|
+
td div.title:first-child {
|
139
|
+
margin-top: 0.0em;
|
140
|
+
}
|
141
|
+
div.content div.title:first-child {
|
142
|
+
margin-top: 0.0em;
|
143
|
+
}
|
144
|
+
div.content + div.title {
|
145
|
+
margin-top: 0.0em;
|
146
|
+
}
|
147
|
+
|
148
|
+
div.sidebarblock > div.content {
|
149
|
+
background: #ffffee;
|
150
|
+
border: 1px solid silver;
|
151
|
+
padding: 0.5em;
|
152
|
+
}
|
153
|
+
|
154
|
+
div.listingblock {
|
155
|
+
margin-right: 0%;
|
156
|
+
}
|
157
|
+
div.listingblock > div.content {
|
158
|
+
border: 1px solid silver;
|
159
|
+
background: #f4f4f4;
|
160
|
+
padding: 0.5em;
|
161
|
+
}
|
162
|
+
|
163
|
+
div.quoteblock {
|
164
|
+
padding-left: 2.0em;
|
165
|
+
}
|
166
|
+
div.quoteblock > div.attribution {
|
167
|
+
padding-top: 0.5em;
|
168
|
+
text-align: right;
|
169
|
+
}
|
170
|
+
|
171
|
+
div.verseblock {
|
172
|
+
padding-left: 2.0em;
|
173
|
+
}
|
174
|
+
div.verseblock > div.content {
|
175
|
+
white-space: pre;
|
176
|
+
}
|
177
|
+
div.verseblock > div.attribution {
|
178
|
+
padding-top: 0.75em;
|
179
|
+
text-align: left;
|
180
|
+
}
|
181
|
+
/* DEPRECATED: Pre version 8.2.7 verse style literal block. */
|
182
|
+
div.verseblock + div.attribution {
|
183
|
+
text-align: left;
|
184
|
+
}
|
185
|
+
|
186
|
+
div.admonitionblock .icon {
|
187
|
+
vertical-align: top;
|
188
|
+
font-size: 1.1em;
|
189
|
+
font-weight: bold;
|
190
|
+
text-decoration: underline;
|
191
|
+
color: #527bbd;
|
192
|
+
padding-right: 0.5em;
|
193
|
+
}
|
194
|
+
div.admonitionblock td.content {
|
195
|
+
padding-left: 0.5em;
|
196
|
+
border-left: 2px solid silver;
|
197
|
+
}
|
198
|
+
|
199
|
+
div.exampleblock > div.content {
|
200
|
+
border-left: 2px solid silver;
|
201
|
+
padding: 0.5em;
|
202
|
+
}
|
203
|
+
|
204
|
+
div.imageblock div.content { padding-left: 0; }
|
205
|
+
div.imageblock img { border: 1px solid silver; }
|
206
|
+
span.image img { border-style: none; }
|
207
|
+
|
208
|
+
dl {
|
209
|
+
margin-top: 0.8em;
|
210
|
+
margin-bottom: 0.8em;
|
211
|
+
}
|
212
|
+
dt {
|
213
|
+
margin-top: 0.5em;
|
214
|
+
margin-bottom: 0;
|
215
|
+
font-style: normal;
|
216
|
+
}
|
217
|
+
dd > *:first-child {
|
218
|
+
margin-top: 0.1em;
|
219
|
+
}
|
220
|
+
|
221
|
+
ul, ol {
|
222
|
+
list-style-position: outside;
|
223
|
+
}
|
224
|
+
div.olist > ol {
|
225
|
+
list-style-type: decimal;
|
226
|
+
}
|
227
|
+
div.olist2 > ol {
|
228
|
+
list-style-type: lower-alpha;
|
229
|
+
}
|
230
|
+
|
231
|
+
div.tableblock > table {
|
232
|
+
border: 3px solid #527bbd;
|
233
|
+
}
|
234
|
+
thead {
|
235
|
+
font-family: sans-serif;
|
236
|
+
font-weight: bold;
|
237
|
+
}
|
238
|
+
tfoot {
|
239
|
+
font-weight: bold;
|
240
|
+
}
|
241
|
+
|
242
|
+
div.hlist {
|
243
|
+
margin-top: 0.8em;
|
244
|
+
margin-bottom: 0.8em;
|
245
|
+
}
|
246
|
+
div.hlist td {
|
247
|
+
padding-bottom: 15px;
|
248
|
+
}
|
249
|
+
td.hlist1 {
|
250
|
+
vertical-align: top;
|
251
|
+
font-style: normal;
|
252
|
+
padding-right: 0.8em;
|
253
|
+
}
|
254
|
+
td.hlist2 {
|
255
|
+
vertical-align: top;
|
256
|
+
}
|
257
|
+
|
258
|
+
@media print {
|
259
|
+
div#footer-badges { display: none; }
|
260
|
+
}
|
261
|
+
|
262
|
+
div#toctitle {
|
263
|
+
color: #527bbd;
|
264
|
+
font-family: sans-serif;
|
265
|
+
font-size: 1.1em;
|
266
|
+
font-weight: bold;
|
267
|
+
margin-top: 1.0em;
|
268
|
+
margin-bottom: 0.1em;
|
269
|
+
}
|
270
|
+
|
271
|
+
div.toclevel1, div.toclevel2, div.toclevel3, div.toclevel4 {
|
272
|
+
margin-top: 0;
|
273
|
+
margin-bottom: 0;
|
274
|
+
}
|
275
|
+
div.toclevel2 {
|
276
|
+
margin-left: 2em;
|
277
|
+
font-size: 0.9em;
|
278
|
+
}
|
279
|
+
div.toclevel3 {
|
280
|
+
margin-left: 4em;
|
281
|
+
font-size: 0.9em;
|
282
|
+
}
|
283
|
+
div.toclevel4 {
|
284
|
+
margin-left: 6em;
|
285
|
+
font-size: 0.9em;
|
286
|
+
}
|
287
|
+
div.toclevel1.return_to_table_of_contents {
|
288
|
+
margin-bottom: 0.5em;
|
289
|
+
}
|
290
|
+
/* Workarounds for IE6's broken and incomplete CSS2. */
|
291
|
+
|
292
|
+
div.sidebar-content {
|
293
|
+
background: #ffffee;
|
294
|
+
border: 1px solid silver;
|
295
|
+
padding: 0.5em;
|
296
|
+
}
|
297
|
+
div.sidebar-title, div.image-title {
|
298
|
+
color: #527bbd;
|
299
|
+
font-family: sans-serif;
|
300
|
+
font-weight: bold;
|
301
|
+
margin-top: 0.0em;
|
302
|
+
margin-bottom: 0.5em;
|
303
|
+
}
|
304
|
+
|
305
|
+
div.listingblock div.content {
|
306
|
+
border: 1px solid silver;
|
307
|
+
background: #f4f4f4;
|
308
|
+
padding: 0.5em;
|
309
|
+
overflow: auto;
|
310
|
+
overflow-x: auto;
|
311
|
+
}
|
312
|
+
|
313
|
+
div.quoteblock-attribution {
|
314
|
+
padding-top: 0.5em;
|
315
|
+
text-align: right;
|
316
|
+
}
|
317
|
+
|
318
|
+
div.verseblock-content {
|
319
|
+
white-space: pre;
|
320
|
+
}
|
321
|
+
div.verseblock-attribution {
|
322
|
+
padding-top: 0.75em;
|
323
|
+
text-align: left;
|
324
|
+
}
|
325
|
+
|
326
|
+
div.exampleblock-content {
|
327
|
+
border-left: 2px solid silver;
|
328
|
+
padding-left: 0.5em;
|
329
|
+
}
|
330
|
+
|
331
|
+
/* IE6 sets dynamically generated links as visited. */
|
332
|
+
div#toc a:visited { color: blue; }
|
333
|
+
|
334
|
+
/* Because IE6 child selector is broken. */
|
335
|
+
div.olist2 ol {
|
336
|
+
list-style-type: lower-alpha;
|
337
|
+
}
|
338
|
+
div.olist2 div.olist ol {
|
339
|
+
list-style-type: decimal;
|
340
|
+
}
|
341
|
+
|
342
|
+
#chapter_navigation {
|
343
|
+
border-top: solid 1px #9999cc;
|
344
|
+
width: 100%;
|
345
|
+
margin-top: 1.5em;
|
346
|
+
margin-bottom: 1em;
|
347
|
+
}
|
348
|
+
#chapter_navigation td {
|
349
|
+
padding-top: 1.5em;
|
350
|
+
width: 33%;
|
351
|
+
vertical-align: top;
|
352
|
+
}
|
353
|
+
#chapter_navigation .center {
|
354
|
+
text-align: center;
|
355
|
+
}
|
356
|
+
#chapter_navigation .right-floaty {
|
357
|
+
text-align: right;
|
358
|
+
}
|