diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-10-18 22:18:06 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2009-10-18 22:18:06 +0300 |
commit | 4cb33c7c355491f602bbf09f97e90aa90afb4797 (patch) | |
tree | 4e1bc48daf11741aee001680de36d35f3589aa95 /doc | |
parent | 1e7e504d1e0f019348f2d222932b1a27c0718e6d (diff) | |
download | pies-4cb33c7c355491f602bbf09f97e90aa90afb4797.tar.gz pies-4cb33c7c355491f602bbf09f97e90aa90afb4797.tar.bz2 |
Imrove the docs.
* doc/Config: New file. Configuration for texi2html.
* doc/Makefile.am (manual): Update rule.
(man-tar): New rule.
* doc/gendocs_template: Rewrite using the new site
layout.
* doc/pies.texi: Minor changes.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/Config | 363 | ||||
-rw-r--r-- | doc/Makefile.am | 6 | ||||
-rwxr-xr-x | doc/gendocs_template | 114 | ||||
-rw-r--r-- | doc/pies.texi | 15 |
4 files changed, 418 insertions, 80 deletions
diff --git a/doc/Config b/doc/Config new file mode 100644 index 0000000..0e2742d --- /dev/null +++ b/doc/Config | |||
@@ -0,0 +1,363 @@ | |||
1 | # Texi2html configuration for Pies documentation. -*- perl-mode -*- | ||
2 | # Copyright (C) 2009 Sergey Poznyakoff | ||
3 | # | ||
4 | # Pies is free software; you can redistribute it and/or modify | ||
5 | # it under the terms of the GNU General Public License as published by | ||
6 | # the Free Software Foundation; either version 3, or (at your option) | ||
7 | # any later version. | ||
8 | # | ||
9 | # Pies is distributed in the hope that it will be useful, | ||
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | # GNU General Public License for more details. | ||
13 | # | ||
14 | # You should have received a copy of the GNU General Public License | ||
15 | # along with Pies. If not, see <http://www.gnu.org/licenses/>. | ||
16 | |||
17 | $top_html_dir="/software/pies"; | ||
18 | $graphics_dir="$top_html_dir/graphics"; | ||
19 | |||
20 | ## texi2html configuration | ||
21 | |||
22 | # Show TOC in place of the @contents directive. | ||
23 | $INLINE_CONTENTS = 1; | ||
24 | # Do not show Texinfo menus. | ||
25 | $SHOW_MENU = 0; | ||
26 | # Inhibit output of CSS lines in page headers. | ||
27 | $CSS_LINES=''; | ||
28 | # Print footnotes at the end of each file (if the document is split). | ||
29 | $SEPARATED_FOOTNOTES = 0; | ||
30 | |||
31 | $BODYTEXT = ""; | ||
32 | |||
33 | $EXTRA_HEAD="\ | ||
34 | <link rev=\"made\" href=\"mailto:gray@gnu.org.ua\">\ | ||
35 | <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/gray.css\">\ | ||
36 | <link rel=\"stylesheet\" type=\"text/css\" href=\"${top_html_dir}/texi.css\">\ | ||
37 | <link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-icon.png\">"; | ||
38 | |||
39 | $AFTER_BODY_OPEN="\ | ||
40 | <!--#include virtual=\"${top_html_dir}/inc/header.html\" -->\ | ||
41 | <table class='tabs'>\ | ||
42 | <tr>\ | ||
43 | <td><a href=\"$top_html_dir/pies.html\">Main</a></td>\ | ||
44 | <td><a href=\"$top_html_dir/example.html\">Examples</a></td>\ | ||
45 | <td><a href=\"$top_html_dir/download.html\">Downloads</a></td>\ | ||
46 | <td><a class=\"active\" href=\"$top_html_dir/manual.html\">Documentation</a></td>\ | ||
47 | </tr> | ||
48 | </table>"; | ||
49 | |||
50 | $PRE_BODY_CLOSE="Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved."; | ||
51 | |||
52 | $format_map{'multitable'}='table class="multitable"'; | ||
53 | |||
54 | $SMALL_RULE = ''; | ||
55 | $DEFAULT_RULE = ''; | ||
56 | $MIDDLE_RULE = ''; | ||
57 | # This is output at the end of a section. | ||
58 | $BIG_RULE = ''; | ||
59 | |||
60 | # Use navigation icons | ||
61 | $ICONS = 1; | ||
62 | %ACTIVE_ICONS = | ||
63 | ( | ||
64 | 'Top', "$graphics_dir/top.png", | ||
65 | 'Contents', "$graphics_dir/ctx.png", | ||
66 | 'Overview', '', | ||
67 | 'Index', "$graphics_dir/idx.png", | ||
68 | 'This', '', | ||
69 | 'Back', "$graphics_dir/left.png", | ||
70 | 'FastBack', "$graphics_dir/bwd.png", | ||
71 | 'Prev', "", | ||
72 | 'Up', "$graphics_dir/up.png", | ||
73 | 'Next', "$graphics_dir/right.png", | ||
74 | 'NodeUp', "$graphics_dir/left.png", | ||
75 | 'NodeNext', "$graphics_dir/up.png", | ||
76 | 'NodePrev', "$graphics_dir/right.png", | ||
77 | 'Following', "$graphics_dir/right.png", | ||
78 | 'Forward', "$graphics_dir/right.png", | ||
79 | 'FastForward', "$graphics_dir/fwd.png", | ||
80 | 'About' , '', | ||
81 | 'First', '', | ||
82 | 'Last', '', | ||
83 | ' ', '' | ||
84 | ); | ||
85 | |||
86 | @SECTION_BUTTONS = | ||
87 | ( | ||
88 | \&gray_document_title, | ||
89 | \&gray_sec_ref, | ||
90 | 'Back', 'Forward', | ||
91 | \&gray_chap_ref, 'FastBack', 'Up', 'FastForward', | ||
92 | \&gray_doc_ref, | ||
93 | 'Contents', 'Index', | ||
94 | ' ','About', | ||
95 | ); | ||
96 | |||
97 | @SECTION_FOOTER_BUTTONS = @SECTION_BUTTONS; | ||
98 | @NODE_FOOTER_BUTTONS = @SECTION_BUTTONS; | ||
99 | |||
100 | # buttons for misc stuff | ||
101 | @MISC_BUTTONS = ( | ||
102 | \&gray_document_title, | ||
103 | 'Contents', | ||
104 | 'Index', | ||
105 | ' ', | ||
106 | 'About' | ||
107 | ); | ||
108 | |||
109 | |||
110 | $print_section = \&gray_print_section; | ||
111 | $print_navigation = \&gray_print_navigation; | ||
112 | $print_head_navigation = \&gray_print_head_navigation; | ||
113 | $print_foot_navigation = \&gray_print_foot_navigation; | ||
114 | $print_About = \&gray_print_About; | ||
115 | $cell = \&gray_multitable_cell; | ||
116 | $print_page_foot = \&gray_print_page_foot; | ||
117 | |||
118 | sub gray_multitable_cell($$) | ||
119 | { | ||
120 | my $text = shift; | ||
121 | my $row_macro = shift; | ||
122 | |||
123 | $text =~ s/<p>//; | ||
124 | $text =~ s/<\/p>//; | ||
125 | if ($row_macro eq 'headitem') | ||
126 | { | ||
127 | return '<th>' . $text . '</th>'; | ||
128 | } | ||
129 | return '<td>' . $text . '</td>'; | ||
130 | } | ||
131 | |||
132 | sub gray_print_About | ||
133 | { | ||
134 | return &$print_misc(@_) if (!($SPLIT eq '') or $SECTION_NAVIGATION); | ||
135 | } | ||
136 | |||
137 | sub gray_split_status() | ||
138 | { | ||
139 | if ($SPLIT eq '') { | ||
140 | return ''; | ||
141 | } elsif ($SPLIT eq 'node') { | ||
142 | return ' <span class="splitstatus">(split by node)</span>'; | ||
143 | } elsif ($SPLIT eq 'section') { | ||
144 | return ' <span class="splitstatus">(split by section)</span>'; | ||
145 | } elsif ($SPLIT eq 'chapter') { | ||
146 | return ' <span class="splitstatus">(split by chapter)</span>'; | ||
147 | } | ||
148 | } | ||
149 | |||
150 | sub gray_document_title($$) | ||
151 | { | ||
152 | my $fh = shift; | ||
153 | my $vertical = shift; | ||
154 | my $status = gray_split_status(); | ||
155 | print $fh qq{<td class="title">} . $Texi2HTML::THISDOC{title} . $status . ":</td>\n"; | ||
156 | } | ||
157 | |||
158 | sub gray_node_ref($$) | ||
159 | { | ||
160 | my $fh = shift; | ||
161 | my $vertical = shift; | ||
162 | print $fh qq{<span class="navtext">Node:</span>}; | ||
163 | } | ||
164 | |||
165 | sub gray_sec_ref($$) | ||
166 | { | ||
167 | my $fh = shift; | ||
168 | my $vertical = shift; | ||
169 | print $fh qq{<span class="navtext">Section:</span>}; | ||
170 | } | ||
171 | |||
172 | sub gray_chap_ref($$) | ||
173 | { | ||
174 | my $fh = shift; | ||
175 | my $vertical = shift; | ||
176 | print $fh qq{<span class="navtext">Chapter:</span>}; | ||
177 | } | ||
178 | |||
179 | sub gray_doc_ref($$) | ||
180 | { | ||
181 | my $fh = shift; | ||
182 | my $vertical = shift; | ||
183 | print $fh qq{<span class="navtext">Doc:</span>}; | ||
184 | } | ||
185 | |||
186 | sub gray_print_navigation | ||
187 | { | ||
188 | my $fh = shift; | ||
189 | my $buttons = shift; | ||
190 | my $vertical = shift; | ||
191 | my $spacing = 1; | ||
192 | my $class="nav"; | ||
193 | |||
194 | print $fh qq{<table class="nav">\n}; | ||
195 | |||
196 | print $fh "<tr>" unless $vertical; | ||
197 | for my $button (@$buttons) | ||
198 | { | ||
199 | if ($button =~ /^\@class=(.*)/) { | ||
200 | $class = "$class $1"; | ||
201 | next; | ||
202 | } | ||
203 | print $fh "<tr>\n" if $vertical; | ||
204 | print $fh qq{<td class="$class">}; | ||
205 | |||
206 | if (ref($button) eq 'CODE') | ||
207 | { | ||
208 | &$button($fh, $vertical); | ||
209 | } | ||
210 | elsif (ref($button) eq 'SCALAR') | ||
211 | { | ||
212 | print $fh "$$button" if defined($$button); | ||
213 | } | ||
214 | elsif (ref($button) eq 'ARRAY') | ||
215 | { | ||
216 | my $text = $button->[1]; | ||
217 | my $button_href = $button->[0]; | ||
218 | # verify that $button_href is simple text and text is a reference | ||
219 | if (defined($button_href) and !ref($button_href) | ||
220 | and defined($text) and (ref($text) eq 'SCALAR') and defined($$text)) | ||
221 | { # use given text | ||
222 | if ($Texi2HTML::HREF{$button_href}) | ||
223 | { | ||
224 | print $fh "" . | ||
225 | &$anchor('', | ||
226 | $Texi2HTML::HREF{$button_href}, | ||
227 | $$text | ||
228 | ) | ||
229 | ; | ||
230 | } | ||
231 | else | ||
232 | { | ||
233 | print $fh $$text; | ||
234 | } | ||
235 | } | ||
236 | } | ||
237 | elsif ($button eq ' ') | ||
238 | { # handle space button | ||
239 | print $fh | ||
240 | ($ICONS && $ACTIVE_ICONS{' '}) ? | ||
241 | &$button_icon_img($BUTTONS_NAME{$button}, $ACTIVE_ICONS{' '}) : | ||
242 | $NAVIGATION_TEXT{' '}; | ||
243 |