* src/tools/docmaker/tohtml.py: Remove remaining `width' attributes. For `Index' and `TOC' links, we now simply use the `text-align' CSS property of `<td>' to enforce flush-left and flush-right, eliminating the hack with an empty, full-width `<td>' element inbetween. The change also enforces the same (smaller) size for all index and TOC links.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165
diff --git a/ChangeLog b/ChangeLog
index 540b18c..cb15dd3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2014-11-27 Werner Lemberg <wl@gnu.org>
+
+ * src/tools/docmaker/tohtml.py: Remove remaining `width' attributes.
+
+ For `Index' and `TOC' links, we now simply use the `text-align' CSS
+ property of `<td>' to enforce flush-left and flush-right,
+ eliminating the hack with an empty, full-width `<td>' element
+ inbetween.
+
+ The change also enforces the same (smaller) size for all index and
+ TOC links.
+
2014-11-27 suzuki toshiya <mpsuzuki@hiroshima-u.ac.jp>
* src/cff/cf2font.c: Include `ftcalc.h' to use FT_MSB(),
diff --git a/src/tools/docmaker/tohtml.py b/src/tools/docmaker/tohtml.py
index 6a45aac..e2759d8 100644
--- a/src/tools/docmaker/tohtml.py
+++ b/src/tools/docmaker/tohtml.py
@@ -65,14 +65,23 @@ html_header_2 = """\
table.center { margin: auto; }
table.fill { width: 100%; }
+ table.index-toc-link { width: 100%; }
+ table.index-toc-link td.left { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: left; }
+ table.index-toc-link td.right { padding: 0 0.5em 0 0.5em;
+ font-size: 83%;
+ text-align: right; }
+ table.synopsis { margin: auto;
+ border: 0;
+ border-collapse: separate;
+ border-spacing: 1em 1ex; }
+ table.synopsis tr { padding: 0; }
+ table.synopsis td { padding: 0; }
td { padding: 0 0.5em 0 0.5em; }
td.left { padding: 0 0.5em 0 0.5em;
text-align: left; }
- td.small { padding: 0 0.5em 0 0.5em;
- font-size: 83%; }
- td.tiny { padding: 0 0.5em 0 0.5em;
- font-size: 69%; }
tr.mark { background-color: #EEEEFF; }
tr.code { background-color: #D6E8FF; }
@@ -83,19 +92,17 @@ html_header_2 = """\
<body>
"""
-html_header_3 = """
-<table class="center"><tr><td class="small">[<a href="\
+html_header_3l = """
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
-html_header_3i = """
-<table class="center"><tr><td width="100%"></td>
-<td class="small">[<a href="\
+html_header_3r = """
+<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
html_header_4 = """\
">Index</a>]</td>
-<td width="100%"></td>
-<td class="small">[<a href="\
+<td class="right">[<a href="\
"""
html_header_5 = """\
@@ -103,12 +110,6 @@ html_header_5 = """\
<h1>\
"""
-html_header_5t = """\
-">Index</a>]</td>
-<td width="100%"></td></tr></table>
-<h1>\
-"""
-
html_header_6 = """\
API Reference</h1>
"""
@@ -136,12 +137,11 @@ para_footer = "</p>"
block_header = '<div class="indent2">'
block_footer_start = """\
<hr>
-<table><tr><td class="small">[<a href="\
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
block_footer_middle = """\
">Index</a>]</td>
-<td width="100%"></td>
-<td class="small">[<a href="\
+<td class="right">[<a href="\
"""
block_footer_end = """\
">TOC</a>]</td></tr></table></div>
@@ -172,8 +172,7 @@ chapter_footer = '</li></ul></div>'
# Index footer.
index_footer_start = """\
<hr>
-<table><tr><td width="100%"></td>
-<td class="tiny">[<a href="\
+<table class="index-toc-link"><tr><td class="right">[<a href="\
"""
index_footer_end = """\
">TOC</a>]</td></tr></table>
@@ -182,12 +181,10 @@ index_footer_end = """\
# TOC footer.
toc_footer_start = """\
<hr>
-<table><tr><td class="tiny">[<a href="\
+<table class="index-toc-link"><tr><td class="left">[<a href="\
"""
toc_footer_end = """\
-">Index</a>]</td>
-<td width="100%"></td>
-</tr></table>
+">Index</a>]</td></tr></table>
"""
@@ -232,21 +229,21 @@ class HtmlFormatter( Formatter ):
self.html_header = (
html_header_1 + project_title
+ html_header_2
- + html_header_3 + file_prefix + "index.html"
+ + html_header_3l + file_prefix + "index.html"
+ html_header_4 + file_prefix + "toc.html"
+ html_header_5 + project_title
+ html_header_6 )
self.html_index_header = (
html_header_1 + project_title
+ html_header_2
- + html_header_3i + file_prefix + "toc.html"
+ + html_header_3r + file_prefix + "toc.html"
+ html_header_5 + project_title
+ html_header_6 )
self.html_toc_header = (
html_header_1 + project_title
+ html_header_2
- + html_header_3 + file_prefix + "index.html"
- + html_header_5t + project_title
+ + html_header_3l + file_prefix + "index.html"
+ + html_header_5 + project_title
+ html_header_6 )
self.html_footer = (
'<div class="timestamp">generated on '
@@ -526,7 +523,7 @@ class HtmlFormatter( Formatter ):
if maxwidth <> 0:
# print section synopsis
print section_synopsis_header
- print '<table class="center" cellspacing="5" cellpadding="0" border="0">'
+ print '<table class="synopsis">'
columns = width / maxwidth
if columns < 1: