2 # -*- coding: utf-8; -*-
4 ### texi2html customization script for LilyPond
5 ### Author: Reinhold Kainhofer <reinhold@kainhofer.com>, 2008.
6 ### Some code parts copied from texi2html and adapted. These functions
7 ### were written mainly by Patrice Dumas
11 ### Features implemented here:
12 ### -) For split manuals, the main page is index.html.
13 ### -) All @unnumbered* sections are placed into the same file
14 ### (implemented by split_at_numbered_sections)
15 ### -) Use our custom CSS file, with IE-specific fixes in another CSS file,
16 ### implemented by lilypond_css_lines
17 ### -) TOC (folded, with the current page highlighted) in an overflown <div>
18 ### is added to every page; implemented by:
19 ### lilypond_print_element_header -- building of the TOC
20 ### lilypond_toc_body -- generation of customized TOC output
21 ### lilypond_print_page_head -- start <div id="main">
22 ### print_lilypond_page_foot -- closing id=main, output of footer & TOC
23 ### -) External refs are formatted only as "Text of the node" (not as >>see
24 ### "NODE" section "SECTION" in "BOOK"<< like with default texi2html). Also,
25 ### the leading "(book-name)" is removed.
26 ### Implemented by overriding lilypond_external_ref
27 ### -) Navigation bars on top/bottom of the page and between sections are not
28 ### left-aligned, but use a combination of left/center/right aligned table
29 ### cells; For this, I heavily extend the texi2html code to allow for
30 ### differently aligned cells and for multi-line tables);
31 ### Implemented in lilypond_print_navigation
32 ### -) Different formatting than the default: example uses the same formatting
34 ### -) Allow translated section titles: All section titles can be translated,
35 ### the original (English) title is associated with @translationof. This is
36 ### needed, because the file name / anchor is generated from the original
37 ### English title, since otherwise language-autoselection would break with
39 ### Since it is then no longer possible to obtain the file name from the
40 ### section title, I keep a sectionname<=>filename/anchor around. This way,
41 ### xrefs from other manuals can simply load that map and retrieve the
42 ### correct file name for the link. Implemented in:
43 ### lilypond_unknown (handling of @translationof, in case
44 ### extract_texi_filenames.py messes up...)
45 ### lilypond_element_file_name (correct file name: use the map)
46 ### lilypond_element_target_name (correct anchor: use the map)
47 ### lilypond_init_map (read in the externally created map from disk)
48 ### lilypond_external_href (load the map for xrefs, use the correct
50 ### -) The HTML anchors for all sections are derived from the node name /
51 ### section title (pre-generated in the .xref-map file). Implemented by:
52 ### lilypond_element_target_name (adjust section anchors)
53 ### -) Use the standard footnote format "<sup>nr</sup> text" instead of the
54 ### ugly format of texi2html (<h3>(nr)</h3><p>text</p>). Implemented in
55 ### makeinfo_like_foot_line_and_ref
56 ### makeinfo_like_foot_lines
57 ### makeinfo_like_paragraph
58 ### -) In tables, don't wrap <p> around the contents. Implemented in
59 ### makeinfo_like_paragraph
62 ### Useful helper functions:
63 ### -) texinfo_file_name($node_name): returns a texinfo-compatible file name
64 ### for the given string $node_name (whitespace trimmed/replaced by -,
65 ### non-standard chars replaced by _xxxx (ascii char code) and forced to
66 ### start with a letter by prepending t_g if necessary)
69 $original_normalise_node = \&normalise_node;
71 sub t2h_default_normalise_node($)
74 $original_normalise_node->($text);
77 *normalise_node = sub($)
80 return &$Texi2HTML::Config::normalise_node($text);
83 package Texi2HTML::Config;
84 ##$normalise_node = \&t2h_default_normalise_node;
85 $normalise_node = \&lilypond_normalise_node;
89 use Encode qw(decode);
91 #############################################################################
93 #############################################################################
95 my $LY_LANGUAGES = {};
96 $LY_LANGUAGES->{'ca'} = {
97 'Back to Documentation Index' => 'Torna a l\'índex de la documentació',
98 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>Agraïm a ${webdev_link} l\'allotjament de ${lily_site}.',
101 $LY_LANGUAGES->{'cs'} = {
102 'Back to Documentation Index' => '',
103 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '',
106 $LY_LANGUAGES->{'de'} = {
107 'Back to Documentation Index' => 'Zur Dokumentationsübersicht',
108 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '',
111 $LY_LANGUAGES->{'es'} = {
112 'Back to Documentation Index' => 'Volver al índice de la documentación',
113 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>Agradecemos a ${webdev_link} el alojamiento de ${lily_site}.',
116 $LY_LANGUAGES->{'fr'} = {
117 'Back to Documentation Index' => 'Retour à l\'accueil de la documentation',
118 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>Remerciements à ${webdev_link} pour l\'hébergement de ${lily_site}.',
122 $LY_LANGUAGES->{'hu'} = {
123 'Back to Documentation Index' => 'Vissza a dokumentációk jegyzékéhez',
124 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>Köszönet a ${webdev_link} részére a ${lily_site} tárhelyért.',
127 $LY_LANGUAGES->{'it'} = {
128 'Back to Documentation Index' => 'Torna all\'indice della documentazione',
129 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => 'Grazie a ${webdev_link} per l\'hosting di ${lily_site}.',
132 $LY_LANGUAGES->{'ja'} = {
133 'Back to Documentation Index' => 'ドキュメント インデックスに戻る',
134 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>${lily_site} をホスティングしてくれている ${webdev_link} に感謝します。',
138 $LY_LANGUAGES->{'nl'} = {
139 'Back to Documentation Index' => 'Terug naar de Documentatieindex',
140 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>Met dank aan ${webdev_link} voor het hosten van ${lily_site}.',
143 $LY_LANGUAGES->{'zh'} = {
144 'Back to Documentation Index' => '回到文档索引',
145 '<p>Thanks to ${webdev_link} for hosting ${lily_site}.' => '<p>非常感谢 ${webdev_link} 提供 ${lily_site} 的主机空间。',
148 # FIXME: request the translations below then send them to texi2html/texinfo devs
150 $LANGUAGES->{'ca'} = {
151 ' The buttons in the navigation panels have the following meaning:' => ' Els botons als panells de navegació tenen els significats següents:',
152 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' on l\'@strong{exemple} suposa que la posició actual és a la @strong{ Subsubsecció U-Dos-Tres } d\'un document a l\'estructura següent:',
154 '(outside of any element)' => '(fora de qualsevol element)',
155 '(outside of any node)' => '(fora de qualsevol node)',
156 '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
157 '@cite{{book}}' => '@cite{{book}}',
158 '@{No value for `{value}\'@}' => '@{Cap valor per a `{value}\'@}',
159 'About' => 'Quant a',
160 'About (help)' => 'Quant a (ajuda)',
161 'About This Document' => 'Quant a aquest document',
165 'Back section in previous file' => 'Secció enrere al fitxer previ',
166 'Beginning of this chapter or previous chapter' => 'Inici d\'aquest capítol o capítul previ',
168 'Contents' => 'Continguts',
169 'Cover (top) of document' => 'Portada (part superior) del document',
170 'Current' => 'Actual',
171 'Current Position' => 'Posició actual',
172 'Current section' => 'Secció actual',
173 'December' => 'Desembre',
174 'FastBack' => 'Enrere ràpid',
175 'FastForward' => 'Endavant ràpid',
176 'February' => 'Febrer',
177 'First' => 'Primera',
178 'First section in reading order' => 'Primera secció en ordre de lectura',
179 'Following' => 'Següent',
180 'Following node' => 'Node següent',
181 'Footnotes' => 'Notes a peu de pàgina',
182 'Forward' => 'Endavant',
183 'Forward section in next file' => 'Secció següent al fitxer següent',
184 'From 1.2.3 go to' => 'De 1.2.3 ves a',
187 'Index Entry' => 'Entrada de l\'índex',
188 'January' => 'Gener',
190 'Jump to' => 'Salta a',
193 'Last section in reading order' => 'Última secció en ordre de lectura',
199 'Next chapter' => 'Capítol segúent',
200 'Next file' => 'Fitxer següent',
201 'Next node' => 'Node següent',
202 'Next section in reading order' => 'Secció següent en ordre de lectura',
203 'Next section on same level' => 'Secció següent al mateix nivell',
204 'NextFile' => 'Fitxer següent',
205 'Node following in node reading order' => 'Node següent en ordre de lectura',
206 'Node up' => 'Node amunt',
207 'NodeNext' => 'Node següent',
208 'NodePrev' => 'Node anterior',
209 'NodeUp' => 'Node superior',
210 'November' => 'Novembre',
211 'October' => 'Octubre',
212 'Overview' => 'Panoràmica',
214 'PrevFile' => 'Fitxer previ',
215 'Previous' => 'Anterior',
216 'Previous file' => 'Fitxer anterior',
217 'Previous node' => 'Node anterior',
218 'Previous section in reading order' => 'Secció anterior en ordre de lectura',
219 'Previous section on same level' => 'Secció prèvia al mateix nivell',
220 'Section' => 'Secció',
221 'Section One' => 'Secció u',
223 'See @cite{{book}}' => 'Vegeu @cite{{book}}',
224 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'Vegeu la secció `@asis{}`{section_name}\'@asis{}\' a @cite{{book}}',
225 'See section `{section}\' in @cite{{book}}' => 'Vegeu la secció `{section}\' a @cite{{book}}',
226 'See section {reference_name}' => 'Vegeu la secció {reference_name}',
227 'See {node_file_href}' => 'Vegeu {node_file_href}',
228 'See {node_file_href} @cite{{book}}' => 'Vegeu {node_file_href} @cite{{book}}',
229 'See {node_file_href} section `{section}\' in @cite{{book}}' => 'Vegeu {node_file_href} a la secció `{section}\' a @cite{{book}}',
230 'See {reference_name}' => 'Vegeu {reference_name}',
231 'See {ref}' => 'Vegeu {ref}',
232 'See {title_ref}' => 'Vegeu {title_ref}',
233 'September' => 'Setembre',
234 'Short Table of Contents' => 'Índex brevu',
235 'Short table of contents' => 'Índex breu',
236 'Subsection One-Four' => 'Subsecció U-Quatre',
237 'Subsection One-One' => 'Subsecció U-U',
238 'Subsection One-Three' => 'Subsecció U-Tres',
239 'Subsection One-Two' => 'Subsecció U-Dos',
240 'Subsubsection One-Two-Four' => 'Subsubseció U-Dos-Quatre',
241 'Subsubsection One-Two-One' => 'Subsubsecció U-Dos-U',
242 'Subsubsection One-Two-Three' => 'Subsubsecció U-Dos-Tres',
243 'Subsubsection One-Two-Two' => 'Subsubsecció U-Dos-Dos',
244 'T2H_today' => '%s, %d %d',
245 'Table of Contents' => 'Índex',
246 'Table of contents' => 'Índex',
247 'The node you are looking for is at {href}.' => 'El node que esteu buscant és {href}',
249 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'Aquest document s\'ha generat el @i{{date}} amb @uref{{program_homepage}, @i{{program}}}.',
250 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'Aquest document sha generat amb @uref{{program_homepage}, @emph{{program}}}.',
252 'Untitled Document' => 'Document sense títol',
254 'Up node' => 'Node superior',
255 'Up section' => 'Secció supeior',
256 'current' => 'actual',
257 'on @emph{{date}}' => 'el @emph{{date}}',
258 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'secció `@asis{}`{section_name}\'@asis{}\' a @cite{{book}}',
259 'section `{section}\' in @cite{{book}}' => 'secció `{section}\' a @cite{{book}}',
261 'see @cite{{book}}' => 'vegeu @cite{{book}}',
262 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'vegeu la secció `@asis{}`{section_name}\'@asis{}\' a @cite{{book}}',
263 'see section `{section}\' in @cite{{book}}' => 'vegeu la secció `{section}\' a @cite{{book}}',
264 'see section {reference_name}' => 'vegeu la secció {reference_name}',
265 'see {node_file_href}' => 'vegeu {node_file_href}',
266 'see {node_file_href} @cite{{book}}' => 'vegeu {node_file_href} @cite{{book}}',
267 'see {node_file_href} section `{section}\' in @cite{{book}}' => 'vegeu {node_file_href} a la secció `{section}\' a @cite{{book}}',
268 'see {reference_name}' => 'vegeu {reference_name}',
269 'see {ref}' => 'vegeu {ref}',
270 'see {title_ref}' => 'vegeu {title_ref}',
271 '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
272 '{name} of {class}' => '{name} de {class}',
273 '{name} on {class}' => '{name} a {class}',
274 '{node_file_href}' => '{node_file_href}',
275 '{node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}}',
276 '{node_file_href} section `{section}\' in @cite{{book}}' => '{node_file_href} a la secció `{section}\' a @cite{{book}}',
277 '{reference_name}' => '{reference_name}',
279 '{style} {number}' => '{style} {number}',
280 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
281 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
282 '{title_ref}' => '{title_ref}'
285 $LANGUAGES->{'it'} = {
286 ' The buttons in the navigation panels have the following meaning:' => ' I bottoni nei pannelli di navigazione hanno il seguente significato:',
287 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' dove @strong{ Esempio } assume che l\'attuale posizione è alla @strong{ Sottosottosezione Uno-Due-Tre } di un documento che ha la seguente struttura:',
289 '(outside of any element)' => '(fuori da qualsiasi elemento)',
290 '(outside of any node)' => '(fuori da qualsiasi nodo)',
291 '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
292 '@cite{{book}}' => '@cite{{book}}',
293 '@{No value for `{value}\'@}' => '@{Nessun valore per `{value}\'@}',
294 'About' => 'Informazioni',
295 'About (help)' => 'Informazioni (aiuto)',
296 'About This Document' => 'Informazioni su questo documento',
298 'August' => 'Agosto',
299 'Back' => 'Indietro',
300 'Back section in previous file' => '',
301 'Beginning of this chapter or previous chapter' => 'Inizio di questo capitolo o capitolo precedente',
302 'Button' => 'Bottone',
303 'Contents' => 'Contenuti',
304 'Cover (top) of document' => 'Copertina (inizio) del documento',
305 'Current' => 'Attuale',
306 'Current Position' => 'Posizione Attuale',
307 'Current section' => 'Sezione attuale',
308 'December' => 'Dicembre',
309 'FastBack' => 'Indietro veloce',
310 'FastForward' => 'Avanti veloce',
311 'February' => 'Febbraio',
313 'First section in reading order' => 'Prima sezione in ordine di lettura',
314 'Following' => 'Seguente',
315 'Following node' => 'Nodo seguente',
316 'Footnotes' => 'Note a piè di pagina',
317 'Forward' => 'Avanti',
318 'Forward section in next file' => 'Sezione successiva nel prossimo file',
319 'From 1.2.3 go to' => 'Da 1.2.3 vai a',
322 'Index Entry' => 'Voce dell\'indice',
323 'January' => 'Gennaio',
325 'Jump to' => 'Salta a',
328 'Last section in reading order' => 'Ultima sezione in ordine di lettura',
333 'Next' => 'Successivo',
334 'Next chapter' => 'Capitolo successivo',
335 'Next file' => 'File successivo',
336 'Next node' => 'Nodo successivo',
337 'Next section in reading order' => 'Sezione successiva in ordine di lettura',
338 'Next section on same level' => 'Sezione successiva sullo stesso livello',
339 'NextFile' => 'File successivo',
340 'Node following in node reading order' => 'Nodo seguente in ordine di lettura',
341 'Node up' => 'Nodo superiore',
342 'NodeNext' => 'Nodo successivo',
343 'NodePrev' => 'Nodo precedente',
344 'NodeUp' => 'Nodo superiore',
345 'November' => 'Novembre',
346 'October' => 'Ottobre',
347 'Overview' => 'Panoramica',
349 'PrevFile' => 'File precedente',
350 'Previous' => 'Precedente',
351 'Previous file' => 'File precedente',
352 'Previous node' => 'Nodo precedente',
353 'Previous section in reading order' => 'Sezione precedente in ordine di lettura',
354 'Previous section on same level' => 'Sezione precedente sullo stesso livello',
355 'Section' => 'Sezione',
356 'Section One' => 'Sezione uno',
358 'See @cite{{book}}' => 'Vedi @cite{{book}}',
359 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'Vedi la sezione `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}',
360 'See section `{section}\' in @cite{{book}}' => 'Vedi la sezione `{section}\' in @cite{{book}}',
361 'See section {reference_name}' => 'Vedi la sezione {reference_name}',
362 'See {node_file_href}' => 'Vedi {node_file_href}',
363 'See {node_file_href} @cite{{book}}' => 'Vedi {node_file_href} @cite{{book}}',
364 'See {node_file_href} section `{section}\' in @cite{{book}}' => 'Vedi {node_file_href} nella sezione `{section}\' in @cite{{book}}',
365 'See {reference_name}' => 'Vedi {reference_name}',
366 'See {ref}' => 'Vedi {ref}',
367 'See {title_ref}' => 'Vedi {title_ref}',
368 'September' => 'Settembre',
369 'Short Table of Contents' => 'Indice breve',
370 'Short table of contents' => 'Indice breve',
371 'Subsection One-Four' => 'Sottosezione Uno-Quattro',
372 'Subsection One-One' => 'Sottosezione Uno-Uno',
373 'Subsection One-Three' => 'Sottosezione Uno-Tre',
374 'Subsection One-Two' => 'Sottosezione Uno-Due',
375 'Subsubsection One-Two-Four' => 'Sottosottosezione Uno-Due-Quattro',
376 'Subsubsection One-Two-One' => 'Sottosottosezione Uno-Due-Uno',
377 'Subsubsection One-Two-Three' => 'Sottosottosezione Uno-Due-Tre',
378 'Subsubsection One-Two-Two' => 'Sottosottosezione Uno-Due-Due',
379 'T2H_today' => '%s, %d %d',
380 'Table of Contents' => 'Indice',
381 'Table of contents' => 'Indice',
382 'The node you are looking for is at {href}.' => 'Il nodo che stai cercando è {href}',
384 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'Questo documento è stato generato il @i{{date}} con @uref{{program_homepage}, @i{{program}}}.',
385 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'Questo documento è stato generato con @uref{{program_homepage}, @emph{{program}}}.',
387 'Untitled Document' => 'Documento senza titolo',
389 'Up node' => 'Nodo superiore',
390 'Up section' => 'Sezione superiore',
391 'current' => 'attuale',
392 'on @emph{{date}}' => 'il @emph{{date}}',
393 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'sezione `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}',
394 'section `{section}\' in @cite{{book}}' => 'sezione `{section}\' in @cite{{book}}',
396 'see @cite{{book}}' => 'vedi @cite{{book}}',
397 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'vedi la sezione `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}',
398 'see section `{section}\' in @cite{{book}}' => 'vedi la sezione `{section}\' in @cite{{book}}',
399 'see section {reference_name}' => 'vedi la sezione {reference_name}',
400 'see {node_file_href}' => 'vedi {node_file_href}',
401 'see {node_file_href} @cite{{book}}' => 'vedi {node_file_href} @cite{{book}}',
402 'see {node_file_href} section `{section}\' in @cite{{book}}' => 'vedi {node_file_href} nella sezione `{section}\' in @cite{{book}}',
403 'see {reference_name}' => 'vedi {reference_name}',
404 'see {ref}' => 'vedi {ref}',
405 'see {title_ref}' => 'vedi {title_ref}',
406 '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
407 '{name} of {class}' => '{name} di {class}',
408 '{name} on {class}' => '{name} in {class}',
409 '{node_file_href}' => '{node_file_href}',
410 '{node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}}',
411 '{node_file_href} section `{section}\' in @cite{{book}}' => '{node_file_href} nella sezione `{section}\' in @cite{{book}}',
412 '{reference_name}' => '{reference_name}',
414 '{style} {number}' => '{style} {number}',
415 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
416 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
417 '{title_ref}' => '{title_ref}'
420 $LANGUAGES->{'hu'} = {
421 ' The buttons in the navigation panels have the following meaning:' => ' A navigációs panelen levő gombok jelentése a következő:',
422 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' @strong{ Példánkban } az aktuális pozíció az @strong{ 1.2.3 alalszakasz } egy olyan dokumentumban, melynek szerkezete a következő:',
424 '(outside of any element)' => '(bármelyik elemen kívül)',
425 '(outside of any node)' => '(bármelyik csomóponton kívül)',
426 '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
427 '@cite{{book}}' => '@cite{{book}}',
428 '@{No value for `{value}\'@}' => '@{Nincs értéke ennek: `{value}\'@}',
430 'About (help)' => 'Segítség a navigációhoz',
431 'About This Document' => 'A navigációs panel használata',
432 'April' => 'április',
433 'August' => 'augusztus',
435 'Back section in previous file' => 'Előző fájl hátsó szakasza',
436 'Beginning of this chapter or previous chapter' => 'Fejezet eleje vagy előző fejezet',
438 'Contents' => 'Tartalom',
439 'Cover (top) of document' => 'Dokumentum címoldala',
440 'Current' => 'Aktuális',
441 'Current Position' => 'Aktuális pozíció',
442 'Current section' => 'Aktuális szakasz',
443 'December' => 'december',
444 'FastBack' => 'Visszaugrás',
445 'FastForward' => 'Előreugrás',
446 'February' => 'február',
448 'First section in reading order' => 'Első szakasz az olvasási sorrendben',
449 'Following' => 'Következő',
450 'Following node' => 'Következő csomópont',
451 'Footnotes' => 'Lábjegyzet',
452 'Forward' => 'Előre',
453 'Forward section in next file' => 'Következő fájl elülső szakasza',
454 'From 1.2.3 go to' => '1.2.3-ból ide jutunk',
456 'Index' => 'Tárgymutató',
457 'Index Entry' => 'Tárgymutató-bejegyzés',
458 'January' => 'január',
460 'Jump to' => 'Ugorj ide',
463 'Last section in reading order' => 'Utolsó szakasz az olvasási sorrendben',
464 'March' => 'március',
468 'Next' => 'Következő',
469 'Next chapter' => 'Következő fejezet',
470 'Next file' => 'Következő fájl',
471 'Next node' => 'Következő csomópont',
472 'Next section in reading order' => 'Következő szakasz az olvasási sorrendben',
473 'Next section on same level' => 'Következő szakasz ugyanazon a szinten',
474 'NextFile' => 'KövetkezőFájl',
475 'Node following in node reading order' => 'Következő csomópont az olvasási sorrendben',
476 'Node up' => 'Szülő csomópont',
477 'NodeNext' => 'KövetkezőCsomópont',
478 'NodePrev' => 'ElőzőCsomópont',
479 'NodeUp' => 'SzülőCsomópont',
480 'November' => 'november',
481 'October' => 'október',
482 'Overview' => 'Áttekintés',
484 'PrevFile' => 'ElőzőFájl',
485 'Previous' => 'Előző',
486 'Previous file' => 'Előző fájl',
487 'Previous node' => 'Előző csomópont',
488 'Previous section in reading order' => 'Előző szakasz az olvasási sorrendben',
489 'Previous section on same level' => 'Előző szakasz ugyanazon a szinten',
490 'Section' => 'Szakasz',
491 'Section One' => 'szakasz',
493 'See @cite{{book}}' => 'Ld. @cite{{book}}',
494 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'Ld. ezt a szakaszt: `@asis{}`{section_name}\'@asis{}\' itt: @cite{{book}}',
495 'See section `{section}\' in @cite{{book}}' => 'Ld. ezt a szakaszt: `{section}\' itt: @cite{{book}}',
496 'See section {reference_name}' => 'Ld. ezt a szakaszt: {reference_name}',
497 'See {node_file_href}' => 'Ld. {node_file_href}',
498 'See {node_file_href} @cite{{book}}' => 'See {node_file_href} @cite{{book}}',
499 'See {node_file_href} section `{section}\' in @cite{{book}}' => 'Ld. {node_file_href} ezt a szakaszt: `{section}\' itt: @cite{{book}}',
500 'See {reference_name}' => 'Ld. {reference_name}',
501 'See {ref}' => 'Ld. {ref}',
502 'See {title_ref}' => 'Ld. {title_ref}',
503 'September' => 'szeptember',
504 'Short Table of Contents' => 'Rövid tartalomjegyzék',
505 'Short table of contents' => 'Rövid tartalomjegyzék',
506 'Subsection One-Four' => 'alszakasz',
507 'Subsection One-One' => 'alszakasz',
508 'Subsection One-Three' => 'alszakasz',
509 'Subsection One-Two' => 'alszakasz',
510 'Subsubsection One-Two-Four' => 'alalszakasz',
511 'Subsubsection One-Two-One' => 'alalszakasz',
512 'Subsubsection One-Two-Three' => 'alalszakasz',
513 'Subsubsection One-Two-Two' => 'alalszakasz',
514 'T2H_today' => '%s, %d %d',
515 'Table of Contents' => 'Tartalomjegyzék',
516 'Table of contents' => 'Tartalomjegyzék',
517 'The node you are looking for is at {href}.' => 'A keresett csomópont itt található: {href}.',
519 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'Ezt a dokumentumot @i{{date}} napon generálta a(z) @uref{{program_homepage}, @i{{program}}}.',
520 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'Ezt a dokumentumot a(z) @uref{{program_homepage}, @emph{{program}}} generálta.',
522 'Untitled Document' => 'Névtelen dokumentum',
524 'Up node' => 'Szülő csomópont',
525 'Up section' => 'Szülő szakasz',
526 'current' => 'aktuális',
527 'on @emph{{date}}' => 'ekkor: @emph{{date}}',
528 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'szakasz: `@asis{}`{section_name}\'@asis{}\' itt: @cite{{book}}',
529 'section `{section}\' in @cite{{book}}' => 'szakasz: `{section}\' itt: @cite{{book}}',
531 'see @cite{{book}}' => 'ld. @cite{{book}}',
532 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'ld. ezt a szakaszt: `@asis{}`{section_name}\'@asis{}\' itt: @cite{{book}}',
533 'see section `{section}\' in @cite{{book}}' => 'ld. ezt a szakaszt: `{section}\' itt: @cite{{book}}',
534 'see section {reference_name}' => 'ld. ezt a szakaszt: {reference_name}',
535 'see {node_file_href}' => 'ld. {node_file_href}',
536 'see {node_file_href} @cite{{book}}' => 'ld. {node_file_href} @cite{{book}}',
537 'see {node_file_href} section `{section}\' in @cite{{book}}' => 'ld. {node_file_href} ezt a szakaszt: `{section}\' itt: @cite{{book}}',
538 'see {reference_name}' => 'ld. {reference_name}',
539 'see {ref}' => 'ld. {ref}',
540 'see {title_ref}' => 'ld. {title_ref}',
541 '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
542 '{name} of {class}' => '{name} típusa: {class}',
543 '{name} on {class}' => '{name} ezen: {class}',
544 '{node_file_href}' => '{node_file_href}',
545 '{node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}}',
546 '{node_file_href} section `{section}\' in @cite{{book}}' => '{node_file_href} szakasz: `{section}\' itt: @cite{{book}}',
547 '{reference_name}' => '{reference_name}',
549 '{style} {number}' => '{style} {number}',
550 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
551 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
552 '{title_ref}' => '{title_ref}'
555 $LANGUAGES->{'ja'} = {
556 ' The buttons in the navigation panels have the following meaning:' => ' ナビゲーション パネルの中にあるボタンには以下のような意味があります:',
557 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' この表で、@strong{ 行き先 } は、現在の位置が以下のような構造を持つドキュメントの @strong{ サブサブセクション 1-2-3 } であると仮定しています:',
559 '(outside of any element)' => '(outside of any element)',
560 '(outside of any node)' => '(outside of any node)',
561 '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
562 '@cite{{book}}' => '@cite{{book}}',
563 '@{No value for `{value}\'@}' => '@{No value for `{value}\'@}',
565 'About (help)' => '情報 (ヘルプ)',
566 'About This Document' => 'このドキュメントについて',
570 'Back section in previous file' => '前のファイルのセクションに戻る',
571 'Beginning of this chapter or previous chapter' => 'この章あるいは前の章の先頭',
574 'Cover (top) of document' => 'ドキュメントの表紙 (先頭)',
576 'Current Position' => '現在の位置',
577 'Current section' => '現在のセクション',
578 'December' => '12 月',
579 'FastBack' => '大きく戻る',
580 'FastForward' => '大きく進む',
583 'First section in reading order' => '最初のセクション',
585 'Following node' => '次のノード',
588 'Forward section in next file' => '次のファイルのセクションに進む',
589 'From 1.2.3 go to' => '1.2.3 からの行き先',
592 'Index Entry' => 'インデックス エントリ',
598 'Last section in reading order' => '最後のセクション',
604 'Next chapter' => '次の章',
605 'Next file' => '次のファイル',
606 'Next node' => '次のノード',
607 'Next section in reading order' => '次のセクション',
608 'Next section on same level' => '次のセクション',
609 'NextFile' => '次のファイル',
610 'Node following in node reading order' => '次のノード',
611 'Node up' => '上のノード',
612 'NodeNext' => '次のノード',
613 'NodePrev' => '前のノード',
615 'November' => '11 月',
619 'PrevFile' => '前のファイル',
621 'Previous file' => '前のファイル',
622 'Previous node' => '前のノード',
623 'Previous section in reading order' => '前のセクション',
624 'Previous section on same level' => '前のセクション',
625 'Section' => 'セクション',
626 'Section One' => 'セクション 1',
628 'See @cite{{book}}' => '@cite{{book}} を参照してください',
629 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '@cite{{book}} のセクション `@asis{}`{section_name}\'@asis{}\' を参照してください',
630 'See section `{section}\' in @cite{{book}}' => '@cite{{book}} のセクション `{section}\' を参照してください',
631 'See section {reference_name}' => 'セクション {reference_name} を参照してください',
632 'See {node_file_href}' => '{node_file_href} を参照してください',
633 'See {node_file_href} @cite{{book}}' => '@cite{{book}} の {node_file_href} を参照してください',
634 'See {node_file_href} section `{section}\' in @cite{{book}}' => '@cite{{book}} の {node_file_href} セクション `{section}\' を参照してください',
635 'See {reference_name}' => '{reference_name} を参照してください',
636 'See {ref}' => '{ref} を参照してください',
637 'See {title_ref}' => '{title_ref} を参照してください',
638 'September' => '9 月',
639 'Short Table of Contents' => '簡単な目次',
640 'Short table of contents' => '簡単な目次',
641 'Subsection One-Four' => 'サブセクション 1-4',
642 'Subsection One-One' => 'サブセクション 1-1',
643 'Subsection One-Three' => 'サブセクション 1-3',
644 'Subsection One-Two' => 'サブセクション 1-2',
645 'Subsubsection One-Two-Four' => 'サブサブセクション 1-2-4',
646 'Subsubsection One-Two-One' => 'サブサブセクション 1-2-1',
647 'Subsubsection One-Two-Three' => 'サブサブセクション 1-2-3',
648 'Subsubsection One-Two-Two' => 'サブサブセクション 1-2-2',
649 'T2H_today' => '%s, %d %d',
650 'Table of Contents' => '目次',
651 'Table of contents' => '目次',
652 'The node you are looking for is at {href}.' => 'あなたが探しているノードは {href} にあります。',
654 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'このドキュメントは @i{{date}} に、@uref{{program_homepage}, @i{{program}}} を用いて生成されました。',
655 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'このドキュメントは @uref{{program_homepage}, @emph{{program}}} を用いて生成されました。',
657 'Untitled Document' => '無題のドキュメント',
659 'Up node' => '上のノード',
660 'Up section' => '上のセクション',
662 'on @emph{{date}}' => '@emph{{date}} に',
663 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '@cite{{book}} のセクション `@asis{}`{section_name}\'@asis{}\'',
664 'section `{section}\' in @cite{{book}}' => '@cite{{book}} のセクション `{section}\'',
666 'see @cite{{book}}' => '@cite{{book}} を参照してください',
667 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '@cite{{book}} のセクション `@asis{}`{section_name}\'@asis{}\' を参照してください',
668 'see section `{section}\' in @cite{{book}}' => '@cite{{book}} のセクション `{section}\' を参照してください',
669 'see section {reference_name}' => 'セクション {reference_name} を参照してください',
670 'see {node_file_href}' => '{node_file_href} を参照してください',
671 'see {node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}} を参照してください',
672 'see {node_file_href} section `{section}\' in @cite{{book}}' => '@cite{{book}} の {node_file_href} section `{section}\' を参照してください',
673 'see {reference_name}' => '{reference_name} を参照してください',
674 'see {ref}' => '{ref} を参照してくださ',
675 'see {title_ref}' => '{title_ref} を参照してくださ',
676 '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
677 '{name} of {class}' => '{class} の {name}',
678 '{name} on {class}' => '{class} の {name}',
679 '{node_file_href}' => '{node_file_href}',
680 '{node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}}',
681 '{node_file_href} section `{section}\' in @cite{{book}}' => '@cite{{book}} の {node_file_href} セクション `{section}\'',
682 '{reference_name}' => '{reference_name}',
684 '{style} {number}' => '{style} {number}',
685 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
686 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
687 '{title_ref}' => '{title_ref}'
690 $LANGUAGES->{'cs'} = {
691 ' The buttons in the navigation panels have the following meaning:' => '',
692 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => '',
694 '(outside of any element)' => '',
695 '(outside of any node)' => '',
696 '@b{{quotation_arg}:} ' => '',
697 '@cite{{book}}' => '',
698 '@{No value for `{value}\'@}' => '',
700 'About (help)' => '',
701 'About This Document' => '',
705 'Back section in previous file' => '',
706 'Beginning of this chapter or previous chapter' => '',
709 'Cover (top) of document' => '',
711 'Current Position' => '',
712 'Current section' => '',
718 'First section in reading order' => '',
720 'Following node' => '',
723 'Forward section in next file' => '',
724 'From 1.2.3 go to' => '',
733 'Last section in reading order' => '',
739 'Next chapter' => '',
742 'Next section in reading order' => '',
743 'Next section on same level' => '',
745 'Node following in node reading order' => '',
756 'Previous file' => '',
757 'Previous node' => '',
758 'Previous section in reading order' => '',
759 'Previous section on same level' => '',
763 'See @cite{{book}}' => '',
764 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
765 'See section `{section}\' in @cite{{book}}' => '',
766 'See section {reference_name}' => '',
767 'See {node_file_href}' => '',
768 'See {node_file_href} @cite{{book}}' => '',
769 'See {node_file_href} section `{section}\' in @cite{{book}}' => '',
770 'See {reference_name}' => '',
772 'See {title_ref}' => '',
774 'Short Table of Contents' => '',
775 'Short table of contents' => '',
776 'Subsection One-Four' => '',
777 'Subsection One-One' => '',
778 'Subsection One-Three' => '',
779 'Subsection One-Two' => '',
780 'Subsubsection One-Two-Four' => '',
781 'Subsubsection One-Two-One' => '',
782 'Subsubsection One-Two-Three' => '',
783 'Subsubsection One-Two-Two' => '',
785 'Table of Contents' => '',
786 'Table of contents' => '',
787 'The node you are looking for is at {href}.' => '',
789 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => '',
790 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => '',
792 'Untitled Document' => '',
797 'on @emph{{date}}' => '',
798 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
799 'section `{section}\' in @cite{{book}}' => '',
801 'see @cite{{book}}' => '',
802 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
803 'see section `{section}\' in @cite{{book}}' => '',
804 'see section {reference_name}' => '',
805 'see {node_file_href}' => '',
806 'see {node_file_href} @cite{{book}}' => '',
807 'see {node_file_href} section `{section}\' in @cite{{book}}' => '',
808 'see {reference_name}' => '',
810 'see {title_ref}' => '',
811 '{acronym_like} ({explanation})' => '',
812 '{name} of {class}' => '',
813 '{name} on {class}' => '',
814 '{node_file_href}' => '',
815 '{node_file_href} @cite{{book}}' => '',
816 '{node_file_href} section `{section}\' in @cite{{book}}' => '',
817 '{reference_name}' => '',
819 '{style} {number}' => '',
820 '{style}: {caption_first_line}' => '',
821 '{style}: {shortcaption_first_line}' => '',
822 '{title_ref}' => '{title_ref}'
825 $LANGUAGES->{'ca'} = {
826 ' The buttons in the navigation panels have the following meaning:' => ' Els botons dels plafons de navegació tenen els significat següent:',
827 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' on l\'@strong{ Exemple } suposa que la posició actual està a @strong{ Subsubsecció U-Dos-tres } d\'un document a l\'estructura següent:',
829 '(outside of any element)' => '(fora de qualsevol element)',
830 '(outside of any node)' => '(fora de qualsevol node)',
831 '@b{{quotation_arg}:} ' => '@{{quotation_arg}:}',
832 '@cite{{book}}' => '@cite{{book}}',
833 '@{No value for `{value}\'@}' => '@{No hi ha cap valor per a `{value}\'@}',
834 'About' => 'Quant a',
835 'About (help)' => 'Quant a (ajuda)',
836 'About This Document' => 'Quant a aquest document',
839 'Back' => 'Endarrere',
840 'Back section in previous file' => 'Endarrere una secció al fitxer previ',
841 'Beginning of this chapter or previous chapter' => 'Inici d\'aquest capítol o capítol previ',
843 'Contents' => 'Continguts',
844 'Cover (top) of document' => 'Portada (inici) del document',
845 'Current' => 'Actual',
846 'Current Position' => 'Posició actual',
847 'Current section' => 'Secció actual',
848 'December' => 'Desembre',
849 'FastBack' => 'Endarrere ràpid',
850 'FastForward' => 'Endavant ràpid',
851 'February' => 'Febrer',
852 'First' => 'Primera',
853 'First section in reading order' => 'Primera secció a l\'orde de lectura',
854 'Following' => 'Següent',
855 'Following node' => 'Node següent',
856 'Footnotes' => 'Notes a peu de pàgina',
857 'Forward' => 'Endavant',
858 'Forward section in next file' => 'Endavant una secció al fitxer següent',
859 'From 1.2.3 go to' => 'De 1.2.3 ves a',
862 'Index Entry' => 'Entrada d\'índex',
863 'January' => 'Gener',
865 'Jump to' => 'Salta a',
868 'Last section in reading order' => 'Última secció en ordre de lectura',
874 'Next chapter' => 'Capítol següent',
875 'Next file' => 'Fitxer següent',
876 'Next node' => 'Node següent',
877 'Next section in reading order' => 'Secció següent en ordre de lectura',
878 'Next section on same level' => 'Secció següent al mateix nivell',
879 'NextFile' => 'Fitxer següent',
880 'Node following in node reading order' => 'Node següent en ordre de lectura de nodes',
881 'Node up' => 'Node amunt',
882 'NodeNext' => 'Node següent',
883 'NodePrev' => 'Node previ',
884 'NodeUp' => 'Node Amunt',
885 'November' => 'Novembre',
886 'October' => 'Octobre',
887 'Overview' => 'Panoràmica',
889 'PrevFile' => 'Fitxer previ',
890 'Previous' => 'Previ',
891 'Previous file' => 'Fitxer previ',
892 'Previous node' => 'Node previ',
893 'Previous section in reading order' => 'Secció prèvia en ordre de lectura',
894 'Previous section on same level' => 'Secció prèvia al mateix nivell',
895 'Section' => 'Secció',
896 'Section One' => 'Secció u',
898 'See @cite{{book}}' => 'Vegeu @cite{{book}}',
899 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'Vegeu secció @asis{}`{section_name}\'@asis{}\' a @cite{{book}}',
900 'See section `{section}\' in @cite{{book}}' => 'Vegeu la secció `{section}\' a @cite{{book}}',
901 'See section {reference_name}' => 'Vegeu la secció {reference_name}',
902 'See {node_file_href}' => 'Vegeu {node_file_href}',
903 'See {node_file_href} @cite{{book}}' => 'Vegeu {node_file_href} @cite{{book}}',
904 'See {node_file_href} section `{section}\' in @cite{{book}}' => 'Vegeu {node_file_href} secció `{secion}\' a @cite{{book}}',
905 'See {reference_name}' => 'Vegeu {reference_name}',
906 'See {ref}' => 'Vegeu {ref}',
907 'See {title_ref}' => 'Vegeu {title_ref}',
908 'September' => 'Septembre',
909 'Short Table of Contents' => 'Taula de continguts breu',
910 'Short table of contents' => 'Taula de continguts breu',
911 'Subsection One-Four' => 'Subsecció U-Quatre',
912 'Subsection One-One' => 'Subsecció U-U',
913 'Subsection One-Three' => 'Subsecció U-Tres',
914 'Subsection One-Two' => 'Subsecció U-Dos',
915 'Subsubsection One-Two-Four' => 'Subsubsecció U-Dos-Quatre',
916 'Subsubsection One-Two-One' => 'Subsubsecció U-Dos-U',
917 'Subsubsection One-Two-Three' => 'Subsubsecció U-Dos-Tres',
918 'Subsubsection One-Two-Two' => 'Subsubsecció U-Dos-Dos',
919 'T2H_today' => 'T2H_today',
920 'Table of Contents' => 'Taula de contingus',
921 'Table of contents' => 'Taula de continguts',
922 'The node you are looking for is at {href}.' => 'El node que esteu buscant està a {href}.',
924 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => 'Aquest document es va generar a @i{{date}} usant @uref{{program_homepage}, @i{{program}}}',
925 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => 'Aquest document es va generar usant @uref{{program_homepage}, @empf{{program}}}.',
926 'Top' => 'Part superior',
927 'Untitled Document' => 'Document sense títol',
929 'Up node' => 'Amunt node',
930 'Up section' => 'Amunt secció',
931 'current' => 'actual',
932 'on @emph{{date}}' => 'el @empf{{date}}',
933 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'secció `@asis{}`{secion_name}\'@asis{}\' a @cite{{book}}',
934 'section `{section}\' in @cite{{book}}' => 'secció `{section}\' a @cite{{book}}',
936 'see @cite{{book}}' => 'vegeu @cite{{book}}',
937 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => 'vegeu secció `@asis{}`{secion_name}\'@asis{}\' a @cite{{book}}',
938 'see section `{section}\' in @cite{{book}}' => 'vegeu secció `{section}\' a @cite{{book}}',
939 'see section {reference_name}' => 'vegeu secció {reference_name}',
940 'see {node_file_href}' => 'vegeu {node_file_href}',
941 'see {node_file_href} @cite{{book}}' => 'vegeu {node_file_href} @cite{{book}}',
942 'see {node_file_href} section `{section}\' in @cite{{book}}' => 'vegeu {node_file_href} secció `{seciont}\' a @cite{{book}}',
943 'see {reference_name}' => 'vegeu {reference_name}',
944 'see {ref}' => 'vegeu {ref}',
945 'see {title_ref}' => 'vegeu {title_ref}',
946 '{acronym_like} ({explanation})' => '{acronym_lie} ({explanation})',
947 '{name} of {class}' => '{name} de {class}',
948 '{name} on {class}' => '{name} a {class}',
949 '{node_file_href}' => '{node_file_href}',
950 '{node_file_href} @cite{{book}}' => '{node_file_href} @cite{{book}}',
951 '{node_file_href} section `{section}\' in @cite{{book}}' => '{node_file_href} secció `{secció}\' a @cite{{book}}',
952 '{reference_name}' => '{reference_name}',
954 '{style} {number}' => '{style} {number}',
955 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
956 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
957 '{title_ref}' => '{title_ref}'
960 $LANGUAGES->{'zh'} = {
961 ' The buttons in the navigation panels have the following meaning:' => ' 在导航面板上按钮有以下含意:',
962 ' where the @strong{ Example } assumes that the current position is at @strong{ Subsubsection One-Two-Three } of a document of the following structure:' => ' 这里的@strong{ 例子 } 假设当前的位置是在紧接着的结构的文档中的 @strong{ 小分段 1-2-3 }:',
964 '(outside of any element)' => '(任何元素外面)',
965 '(outside of any node)' => '(任何节点外面)',
966 '@b{{quotation_arg}:} ' => '@b{{quotation_arg}:} ',
967 '@cite{{book}}' => '@cite{{book}}',
968 '@{No value for `{value}\'@}' => '@{没有值 `{value}\'@}',
970 'About (help)' => '关于 (帮助)',
971 'About This Document' => '关于本文档',
975 'Back section in previous file' => '返回到前一个文件',
976 'Beginning of this chapter or previous chapter' => '本章开头或前一章',
979 'Cover (top) of document' => '文档的封面(首页)',
981 'Current Position' => '当前的位置',
982 'Current section' => '当前的段',
983 'December' => '12 月',
984 'FastBack' => '快速返回',
985 'FastForward' => '快速向前',
988 'First section in reading order' => '看的第一段',
989 'Following' => '紧接着的',
990 'Following node' => '紧接着的节点',
993 'Forward section in next file' => '向前到下一个文件的段',
994 'From 1.2.3 go to' => '从1.2.3 到',
997 'Index Entry' => '索引条目',
1003 'Last section in reading order' => '看的最后一段',
1009 'Next chapter' => '下一章',
1010 'Next file' => '下一个文件',
1011 'Next node' => '下一个节点',
1012 'Next section in reading order' => '看的下一段',
1013 'Next section on same level' => '同级的下一段',
1014 'NextFile' => '下一个文件',
1015 'Node following in node reading order' => '看的下一个节点',
1016 'Node up' => '向上一个节点',
1017 'NodeNext' => '下一个节点',
1018 'NodePrev' => '前一个节点',
1019 'NodeUp' => '向上一个节点',
1020 'November' => '11 月',
1021 'October' => '10 月',
1024 'PrevFile' => '前一个文件',
1025 'Previous' => '前一个',
1026 'Previous file' => '前一个文件',
1027 'Previous node' => '前一个节点',
1028 'Previous section in reading order' => '看的前一段',
1029 'Previous section on same level' => '同级的前一段',
1031 'Section One' => '段 1',
1033 'See @cite{{book}}' => '见 @cite{{book}}',
1034 'See section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
1035 'See section `{section}\' in @cite{{book}}' => '',
1036 'See section {reference_name}' => '见段 {reference_name}',
1037 'See {node_file_href}' => '见 {node_file_href}',
1038 'See {node_file_href} @cite{{book}}' => '见 {node_file_href} @cite{{book}}',
1039 'See {node_file_href} section `{section}\' in @cite{{book}}' => '见在@cite{{book}} 中的 {node_file_href} 段 `{section}\' ',
1040 'See {reference_name}' => '见 {reference_name}',
1041 'See {ref}' => '见 {ref}',
1042 'See {title_ref}' => '见 {title_ref}',
1043 'September' => '9 月',
1044 'Short Table of Contents' => '短目录',
1045 'Short table of contents' => '短目录',
1046 'Subsection One-Four' => '分段 1-4',
1047 'Subsection One-One' => '分段 1-1',
1048 'Subsection One-Three' => '分段 1-3',
1049 'Subsection One-Two' => '分段 1-2',
1050 'Subsubsection One-Two-Four' => '小分段 1-2-4',
1051 'Subsubsection One-Two-One' => '小分段 1-2-1',
1052 'Subsubsection One-Two-Three' => '小分段 1-2-3',
1053 'Subsubsection One-Two-Two' => '小分段 1-2-2',
1055 'Table of Contents' => '目录',
1056 'Table of contents' => '目录',
1057 'The node you are looking for is at {href}.' => '你查找的节点在{href}。',
1059 'This document was generated on @i{{date}} using @uref{{program_homepage}, @i{{program}}}.' => '本文档在 @i{{date}} 上用 @uref{{program_homepage}, @i{{program}}} 生成的。',
1060 'This document was generated using @uref{{program_homepage}, @emph{{program}}}.' => '本文档用 @uref{{program_homepage}, @emph{{program}}} 生成的。',
1062 'Untitled Document' => '没有标题的文档',
1064 'Up node' => '上一节点',
1065 'Up section' => '上一段',
1067 'on @emph{{date}}' => '@emph{{date}} 上',
1068 'section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '',
1069 'section `{section}\' in @cite{{book}}' => '',
1071 'see @cite{{book}}' => '见 @cite{{book}}',
1072 'see section `@asis{}`{section_name}\'@asis{}\' in @cite{{book}}' => '见在@cite{{book}}里的段`@asis{}`{section_name}\'@asis{}\'',
1073 'see section `{section}\' in @cite{{book}}' => '见在@cite{{book}}里的段`{section}\'',
1074 'see section {reference_name}' => '见段 {reference_name}',
1075 'see {node_file_href}' => '见 {node_file_href}',
1076 'see {node_file_href} @cite{{book}}' => '见 {node_file_href} @cite{{book}}',
1077 'see {node_file_href} section `{section}\' in @cite{{book}}' => '见在@cite{{book}}里的{node_file_href} 段`{section}\'',
1078 'see {reference_name}' => '见 {reference_name}',
1079 'see {ref}' => '见 {ref}',
1080 'see {title_ref}' => '见 {title_ref}',
1081 '{acronym_like} ({explanation})' => '{acronym_like} ({explanation})',
1082 '{name} of {class}' => '{class} 的 {name}',
1083 '{name} on {class}' => '在{class} 上的 {name}',
1084 '{node_file_href}' => '',
1085 '{node_file_href} @cite{{book}}' => '',
1086 '{node_file_href} section `{section}\' in @cite{{book}}' => '{node_file_href} 段 `{section}\' 在 @cite{{book}}里',
1087 '{reference_name}' => '',
1089 '{style} {number}' => '{style} {number}',
1090 '{style}: {caption_first_line}' => '{style}: {caption_first_line}',
1091 '{style}: {shortcaption_first_line}' => '{style}: {shortcaption_first_line}',
1092 '{title_ref}' => '{title_ref}'
1096 sub ly_get_string () {
1097 my $lang = $Texi2HTML::THISDOC{current_lang};
1099 if ($lang and $lang ne "en" and $LY_LANGUAGES->{$lang}->{$string}) {
1100 return $LY_LANGUAGES->{$lang}->{$string};
1107 #############################################################################
1108 ### FUNCTIONALITY FOR MAIN WEB PAGES
1109 #############################################################################
1113 #############################################################################
1114 ### SETTINGS FOR TEXI2HTML
1115 #############################################################################
1117 # Validation fix for texi2html<=1.82
1118 $Texi2HTML::Config::DOCTYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">';
1120 @Texi2HTML::Config::CSS_REFS = (
1121 {FILENAME => "lilypond-manuals.css", TITLE => "Default style"}
1123 @Texi2HTML::Config::ALT_CSS_REFS = (
1126 sub web_settings() {
1127 print STDERR "Processing web site: [$Texi2HTML::THISDOC{current_lang}]\n";
1128 $Texi2HTML::Config::BODYTEXT = "";
1129 @Texi2HTML::Config::CSS_REFS = (
1130 {FILENAME => "lilypond-website.css", TITLE => "Default style"}
1132 @Texi2HTML::Config::ALT_CSS_REFS = (
1136 $Texi2HTML::Config::USE_ACCESSKEY = 1;
1137 $Texi2HTML::Config::USE_LINKS = 1;
1138 $Texi2HTML::Config::USE_REL_REV = 1;
1139 $Texi2HTML::Config::SPLIT_INDEX = 0;
1140 $Texi2HTML::Config::SEPARATED_FOOTNOTES = 0; # Print footnotes on same page, not separated
1143 my $have_index_entries = 0;
1144 if ($Texi2HTML::Config::SPLIT eq 'section' or
1145 $Texi2HTML::Config::SPLIT eq 'node') {
1146 $Texi2HTML::Config::element_file_name = \&lilypond_element_file_name;
1152 $Texi2HTML::Config::anchor = \&lilypond_anchor;
1153 $Texi2HTML::Config::element_target_name = \&lilypond_element_target_name;
1154 $default_print_element_header = $Texi2HTML::Config::print_element_header;
1155 $Texi2HTML::Config::print_element_header = \&lilypond_print_element_header;
1156 $Texi2HTML::Config::print_page_foot = \&print_lilypond_page_foot;
1157 $Texi2HTML::Config::print_navigation = \&lilypond_print_navigation;
1158 $Texi2HTML::Config::external_ref = \&lilypond_external_ref;
1159 $default_external_href = $Texi2HTML::Config::external_href;
1160 $Texi2HTML::Config::external_href = \&lilypond_external_href;
1161 $default_toc_body = $Texi2HTML::Config::toc_body;
1162 $Texi2HTML::Config::toc_body = \&lilypond_toc_body;
1163 $Texi2HTML::Config::css_lines = \&lilypond_css_lines;
1164 $default_unknown = $Texi2HTML::Config::unknown;
1165 $Texi2HTML::Config::unknown = \&lilypond_unknown;
1166 $default_print_page_head = $Texi2HTML::Config::print_page_head;
1167 $Texi2HTML::Config::print_page_head = \&lilypond_print_page_head;
1168 # $Texi2HTML::Config::foot_line_and_ref = \&lilypond_foot_line_and_ref;
1169 $Texi2HTML::Config::foot_line_and_ref = \&makeinfo_like_foot_line_and_ref;
1170 $Texi2HTML::Config::foot_lines = \&makeinfo_like_foot_lines;
1171 $Texi2HTML::Config::paragraph = \&makeinfo_like_paragraph;
1175 # Examples should be formatted similar to quotes:
1176 $Texi2HTML::Config::complex_format_map->{'example'} = {
1177 'begin' => q{"<blockquote>"},
1178 'end' => q{"</blockquote>\n"},
1182 %Texi2HTML::config::misc_pages_targets = (
1183 'Overview' => 'Overview',
1184 'Contents' => 'Contents',
1189 my @section_to_filename;
1194 #############################################################################
1196 #############################################################################
1199 $Data::Dumper::Maxdepth = 2;
1201 sub print_element_info($)
1203 my $element = shift;
1204 print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
1205 print "Element: $element\n";
1206 print Dumper($element);
1213 #############################################################################
1214 ### HELPER FUNCTIONS
1215 #############################################################################
1217 # only lc() the last portion of an href
1221 my @hrefsplit = split('/', $href);
1222 # change the last portion (the filename), if it exists;
1223 # if it is a plain filename with no path, change the string as a whole
1224 if ($#hrefsplit > 0) {
1225 @hrefsplit[$#hrefsplit] = lc( @hrefsplit[$#hrefsplit] );
1226 $href = join("/", @hrefsplit);
1233 # Convert a given node name to its proper file name (normalization as explained
1234 # in the texinfo manual:
1235 # http://www.gnu.org/software/texinfo/manual/texinfo/html_node/HTML-Xref-Node-Name-Expansion.html
1236 sub texinfo_file_name($)
1240 # File name normalization by texinfo:
1241 # 1/2: letters and numbers are left unchanged
1242 # 3/4: multiple, leading and trailing whitespace is removed
1243 $text = main::normalise_space($text);
1244 # 5/6: all remaining spaces are converted to '-', all other 7- or 8-bit
1245 # chars are replaced by _xxxx (xxxx=ascii character code)
1246 while ($text ne '') {
1247 if ($text =~ s/^([A-Za-z0-9]+)//o) { # number or letter stay unchanged
1249 } elsif ($text =~ s/^ //o) { # space -> '-'
1251 } elsif ($text =~ s/^(.)//o) { # Otherwise use _xxxx (ascii char code)
1252 my $ccode = ord($1);
1253 if ( $ccode <= 0xFFFF ) {
1254 $result .= sprintf("_%04x", $ccode);
1256 $result .= sprintf("__%06x", $ccode);
1260 # 7: if name does not begin with a letter, prepend 't_g' (so it starts with a letter)
1261 if ($result !~ /^[a-zA-Z]/) {
1262 $result = 't_g' . $result;
1265 return lc_last($result)
1268 # Load a file containing a nodename<=>filename map (tab-sepatared, i.e.
1269 # NODENAME\tFILENAME\tANCHOR
1270 # Returns a ref to a hash "Node title" => ["FilenameWithoutExt", "Anchor"]
1271 sub load_map_file ($)
1273 my $mapfile = shift;
1276 # For some unknown reason, Perl on my system (5.10.0 on Fedora 12)
1277 # refuses to open map files of translated documents with
1278 # '<:encoding(utf8)', but decoding from UTF-8 line by line works. -jm
1279 if (open(XREFFILE,'<', $mapfile)) {
1281 # print STDERR "*** PRINTING MAP FILE LINES ***\n";
1282 while ( $line = decode ('UTF-8', <XREFFILE>) ) {
1283 # parse the tab-separated entries and insert them into the map:
1285 my @entries = split(/\t/, $line);
1286 if (scalar (@entries) == 3) {
1287 $node_map->{$entries[0]} = [$entries[1], $entries[2]];
1289 # print STDERR @entries;
1290 # print STDERR "\n";
1292 print STDERR "Invalid entry in the node file $mapfile: $line\n";
1297 print STDERR "WARNING: Unable to load the map file $mapfile\n";
1303 # Split the given path into dir and basename (with .texi removed). Used mainly
1304 # to get the path/basename of the original texi input file
1305 sub split_texi_filename ($)
1308 my ($docu_dir, $docu_name);
1309 if ($docu =~ /(.*\/)/) {
1310 chop($docu_dir = $1);
1312 $docu_name =~ s/.*\///;
1317 $docu_name =~ s/\.te?x(i|info)?$//;
1318 return ($docu_dir, $docu_name);
1325 #############################################################################
1327 #############################################################################
1329 # Include our standard CSS file, not hard-coded CSS code directly in the HTML!
1330 # For IE, add a second conditionally included CSS file.
1331 sub lilypond_css_lines ($$)
1333 my $import_lines = shift;
1334 my $rule_lines = shift;
1335 return if (defined($Texi2HTML::THISDOC{'CSS_LINES'}));
1336 if (@$rule_lines or @$import_lines)
1338 $Texi2HTML::THISDOC{'CSS_LINES'} = "<style type=\"text/css\">\n<!--\n";
1339 $Texi2HTML::THISDOC{'CSS_LINES'} .= join('',@$import_lines) . "\n" if (@$import_lines);
1340 $Texi2HTML::THISDOC{'CSS_LINES'} .= join('',@$rule_lines) . "\n" if (@$rule_lines);
1341 $Texi2HTML::THISDOC{'CSS_LINES'} .= "-->\n</style>\n";
1343 foreach my $ref (@CSS_REFS)
1345 $Texi2HTML::THISDOC{'CSS_LINES'} .=
1346 "<link rel=\"stylesheet\" type=\"text/css\" title=\"$ref->{TITLE}\" href=\"css/$ref->{FILENAME}\">\n";
1348 foreach my $ref (@Texi2HTML::Config::ALT_CSS_REFS)
1350 $Texi2HTML::THISDOC{'CSS_LINES'} .=
1351 "<link rel=\"alternate stylesheet\" type=\"text/css\" href=\"css/$ref->{FILENAME}\" title=\"$ref->{TITLE}\">\n";
1354 # Add a conditionally included CSS file for IE, for either the docs or the website
1356 $Texi2HTML::THISDOC{'CSS_LINES'} .=
1357 "<!--[if lte IE 9]>\n<link href=\"css/lilypond-website-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
1359 $Texi2HTML::THISDOC{'CSS_LINES'} .=
1360 "<!--[if lte IE 7]>\n<link href=\"css/lilypond-manuals-ie-fixes.css\" rel=\"stylesheet\" type=\"text/css\">\n<![endif]-->\n";
1363 if ($ENV{'AJAX_SEARCH'} == 1) {
1364 # Add the JavaScript file only if we have an index.
1365 # Unfortunately, init_out is called after css_lines, so as a workaround
1366 # here we have to check again for the existence of an index...
1367 my $ix = main::get_index ("cp");
1368 $have_index_entries = (scalar $ix > 0);
1370 $reldir = "../" unless $bigpage;
1371 if ($have_index_entries) {
1372 $Texi2HTML::THISDOC{'CSS_LINES'} .= "<script language=\"JavaScript\" src=\"${reldir}lily_search.js\"></script>\n";
1376 ## This section makes the manual name visible to CSS through the body tag
1377 ## so that styles can be applied per manual. It will add the manual
1378 ## directory name (e.g., 'notation' or 'learning') as a CSS class, as well
1379 ## as a development status.
1381 # Parse the input file name to determine the manual we're dealing with.
1382 my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
1384 # Hard-coded value to indicate if this is a development version
1385 # ('devStatus') or stable version ('stableStatus')
1386 # TODO: Figure out how to automatically set this value based on the even/odd minor revision number or some other mechanism.
1387 $documentstatus = 'devStatus';
1389 # Create the extra information for the <body> tag.
1390 # For example, the development Notation reference in English
1391 # will output in HTML as <body lang='en' class='notation devStatus'>
1392 $Texi2HTML::Config::BODYTEXT = 'lang="' . $Texi2HTML::THISDOC{current_lang} . '" class="' . $docu_name . ' ' . $documentstatus . '"';
1400 #############################################################################
1401 ### SPLITTING BASED ON NUMBERED SECTIONS
1402 #############################################################################
1406 my $node_to_filename_map = ();
1407 $source_to_translationof_map = ();
1410 # This function makes sure that files are only generated for numbered sections,
1411 # but not for unnumbered ones. It is called after texi2html has done its own
1412 # splitting and simply returns the filename for the node given as first argument
1413 # Nodes with the same filename will be printed out to the same filename, so
1414 # this really all we need. Also, make sure that the file names for sections
1415 # are derived from the section title. We also might want to name the anchors
1416 # according to node titles, which works by simply overriding the id element of
1417 # the $element hash.
1418 # If an external nodename<=>filename/anchor map file is found (loaded in
1419 # the command handler, use the externally created values, otherwise use the
1421 sub lilypond_element_file_name($$$)
1423 my $element = shift;
1425 my $docu_name = shift;
1426 my $docu_ext = $Texi2HTML::Config::EXTENSION;
1428 my $node_name = main::remove_texi($element->{'node_ref'}->{'texi'});
1429 # the snippets page does not use nodes for the snippets, so in this case
1430 # we'll have to use the section name!
1431 if ($node_name eq '') {
1432 $node_name = main::remove_texi($element->{'texi'});
1435 # If we have an entry in the section<=>filename map, use that one, otherwise
1436 # generate the filename/anchor here. In the latter case, external manuals
1437 # will not be able to retrieve the file name for xrefs!!! Still, I already
1438 # had that code, so I'll leave it in in case something goes wrong with the
1439 # extract_texi_filenames.py script in the lilypond build process!
1440 if (exists ($node_to_filename_map->{$node_name})) {
1441 (my $filename, my $anchor) = @{$node_to_filename_map->{$node_name}};
1442 $filename .= ".$docu_ext" if (defined($docu_ext));
1443 # don't do lc_last here, otherwise the colors are messed up!
1444 $filename = lc($filename);
1446 # unnumbered sections (except those at top-level!) always go to the same
1447 # file as the previous numbered section
1448 if (not ($web_manual) and not ($element->{number})
1449 and not ($lastfilename eq '') and ($element->{level} > 1)) {
1450 $filename = $lastfilename;
1452 if (($filename eq $lastfilename)) {
1453 $$element{doc_nr} = $docnr;
1456 $$element{doc_nr} = $docnr;
1457 $lastfilename = $filename;
1459 #print STDERR "Output file name: $filename\n";
1460 $filename = lc_last($filename);
1463 } elsif ($type eq "top" or $type eq "toc" or $type eq "doc" or
1464 $type eq "stoc" or $type eq "foot" or $type eq "about") {
1467 print STDERR "WARNING: Node '$node_name' was NOT found in the map\n"
1468 unless ($node_name eq '') or ($element->{'tag'} eq 'unnumberedsec')
1469 or ($node_name =~ /NOT REALLY USED/);
1471 # Numbered sections will get a filename Node_title, unnumbered sections will use
1472 # the file name of the previous numbered section:
1473 if (($element->{number}) or ($lastfilename eq '') or ($element->{level} == 1)) {
1474 # normalize to the same file name as texinfo
1475 if ($element->{translationof}) {
1476 $node_name = main::remove_texi($element->{translationof});
1478 my $filename = texinfo_file_name($node_name);
1479 $filename .= ".$docu_ext" if (defined($docu_ext));
1480 $filename = lc_last($filename);
1482 $$element{doc_nr} = $docnr;
1483 $lastfilename = $filename;
1484 print STDERR "File name: $filename\n";
1487 $$element{doc_nr} = $docnr;
1488 $filename = lc_last($filename);
1489 print STDERR "File name: $filename\n";
1497 sub lilypond_normalise_node($)
1500 my $norm = main::t2h_default_normalise_node($text);
1501 if (exists ($source_to_translationof_map->{$text})) {
1502 my $original = $source_to_translationof_map->{$text};
1503 $norm = main::t2h_default_normalise_node($original);
1509 # This function produces an anchor.
1512 # $name : anchor name
1513 # $href : anchor href
1514 # text : text displayed
1515 # extra_attribs : added to anchor attributes list
1516 sub lilypond_anchor($;$$$)
1521 my $attributes = shift;
1522 $href = remove_unneeded_anchor($href);
1523 if (!defined($attributes) or ($attributes !~ /\S/))
1529 $attributes = ' ' . $attributes;
1531 $name = '' if (!defined($name) or ($name !~ /\S/));
1532 $href = '' if (!defined($href) or ($href !~ /\S/));
1533 $text = '' if (!defined($text));
1534 return $text if (($name eq '') and ($href eq ''));
1535 $name = "name=\"$name\"" if ($name ne '');
1536 $href = "href=\"$href\"" if ($href ne '');
1537 $href = ' ' . $href if (($name ne '') and ($href ne ''));
1538 return "<a ${name}${href}${attributes}>$text</a>";
1542 sub lilypond_element_target_name($$$)
1544 my $element = shift;
1547 # Target is based on node name (or sec name for secs without node attached)
1548 my $node_name = main::remove_texi($element->{'node_ref'}->{'texi'});
1549 if ($node_name eq '') {
1550 $node_name = main::remove_texi($element->{'texi'});
1553 # If we have an entry in the section<=>filename map, use that one, otherwise
1554 # generate the anchor here.
1555 if (exists ($node_to_filename_map->{$node_name})) {
1556 (my $filename, $target) = @{$node_to_filename_map->{$node_name}};
1558 my $anchor = $node_name;
1559 if ($element->{translationof}) {
1560 $anchor = main::remove_texi($element->{translationof});
1562 # normalize to the same file name as texinfo
1563 $target = texinfo_file_name($anchor);
1565 # TODO: Once texi2html correctly prints out the target and not the id for
1566 # the sections, change this back to ($id, $target)
1567 # I don't understand this comment, so I'm reluctant to delete it -gp
1568 $target = lc_last($target);
1570 # $id =~ s/-1$//i; # remove any trailing "-1"
1571 return ($target, $id);
1575 ## Load the map file for the corrently processed texi file. We do this
1576 # using a command init handler, since texi2html does not have any
1577 # other hooks that are called after THISDOC is filled but before phase 2
1578 # of the texi2html conversion.
1579 sub lilypond_init_map ()
1581 my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
1582 my $map_filename = main::locate_include_file ("${docu_name}.$Texi2HTML::THISDOC{current_lang}.xref-map")
1583 || main::locate_include_file ("${docu_name}.xref-map");
1584 #print STDERR "Map filename is: $map_filename\nDocu name is $docu_name\n";
1585 if ($docu_name eq 'web') {
1589 $node_to_filename_map = load_map_file ($map_filename);
1591 push @Texi2HTML::Config::command_handler_init, \&lilypond_init_map;
1595 #############################################################################
1596 ### CLEANER LINK TITLE FOR EXTERNAL REFS
1597 #############################################################################
1599 # The default formatting of external refs returns e.g.
1600 # "(lilypond-internals)Timing_translator", so we remove all (...) from the
1601 # file_and_node argument. Also, we want only a very simple format, so we don't
1602 # even call the default handler!
1603 sub lilypond_external_ref($$$$$$)
1606 my $section = shift;
1608 my $file_node = shift;
1611 $href = lc_last($href);
1613 my $cross_ref = shift;
1615 my $displaytext = '';
1617 # 1) if we have a cross ref name, that's the text to be displayed:
1618 # 2) For the top node, use the (printable) name of the manual, unless we
1619 # have an explicit cross ref name
1620 # 3) In all other cases use the section name
1621 if ($cross_ref ne '') {
1622 $displaytext = $cross_ref;
1623 } elsif (($section eq '') or ($section eq 'Top')) {
1624 $displaytext = $book;
1626 $displaytext = $section;
1629 $displaytext = &$anchor('', $href, $displaytext) if ($displaytext ne '');
1630 return &$I('%{node_file_href}', { 'node_file_href' => $displaytext });
1637 #############################################################################
1638 ### HANDLING TRANSLATED SECTIONS: handle @translationof, secname<->filename
1639 ### map stored on disk, xrefs in other manuals load that map
1640 #############################################################################
1643 # Try to make use of @translationof to generate files according to the original
1644 # English section title...
1645 sub lilypond_unknown($$$$$)
1653 # the @translationof macro provides the original English section title,
1654 # which should be used for file/anchor naming, while the title will be
1655 # translated to each language
1656 # It is already used by extract_texi_filenames.py, so this should not be
1657 # necessary here at all. Still, I'll leave the code in just in case the
1658 # python script messed up ;-)
1659 if ($pass == 1 and $macro eq "translationof") {
1660 if (ref($state->{'element'}) eq 'HASH') {
1661 $state->{'element'}->{'translationof'} = main::normalise_space($line);
1662 my $source = main::normalise_space ($line);
1663 if (ref($state->{'node_ref'}) eq 'HASH') {
1664 my $translationof = $state->{'node_ref'}->{'texi'};
1665 our %source_to_translationof_map;
1666 $source_to_translationof_map->{$source} = $translationof;
1669 return ('', 1, undef, undef);
1671 return &$default_unknown($macro, $line, $pass, $stack, $state);
1676 my %translated_books = ();
1677 # Construct a href to an external source of information.
1678 # node is the node with texinfo @-commands
1679 # node_id is the node transliterated and transformed as explained in the
1681 # node_xhtml_id is the node transformed such that it is unique and can
1682 # be used to make an html cross ref as explained in the texinfo manual
1683 # file is the file in '(file)node'
1684 sub lilypond_external_href($$$)
1687 my $node_id = shift;
1688 my $node_xhtml_id = shift;
1691 # 1) Keep a hash of book->section_map
1692 # 2) if not file in keys hash => try to load the map (assign empty map if
1693 # non-existent => will load only once!)
1694 # 3) if node in the section=>(file, anchor) map, replace node_id and
1695 # node_xhtml_id by the map's values
1696 # 4) call the default_external_href with these values (or the old ones if not found)
1698 if (($node_id ne '') and defined($file) and ($node_id ne 'Top')) {
1699 my $map_name = $file;
1700 $map_name =~ s/-big-page//;
1702 # Load the map if we haven't done so already
1703 if (!exists($translated_books{$map_name})) {
1704 my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
1705 my $map_filename = main::locate_include_file ("${map_name}.$Texi2HTML::THISDOC{current_lang}.xref-map")
1706 || main::locate_include_file ("${map_name}.xref-map");
1707 $translated_books{$map_name} = load_map_file ($map_filename);
1710 # look up translation. use these values instead of the old filename/anchor
1711 my $section_name_map = $translated_books{$map_name};
1712 my $node_text = main::remove_texi($node);
1713 if (defined($section_name_map->{$node_text})) {
1714 ($node_id, $node_xhtml_id) = @{$section_name_map->{$node_text}};
1716 print STDERR "WARNING: Unable to find node '$node_text' in book $map_name.\n";
1720 if (defined $file) {
1721 $href = &$default_external_href($node, $node_id, $node_xhtml_id, lc_last($file));
1722 $href = remove_unneeded_anchor($href);
1725 my $only_web_version = $ENV{ONLY_WEB_VERSION};
1726 if ($only_web_version) {
1727 $href = "../../doc/".$only_web_version."/Documentation/web/".$href;
1733 $href = &$default_external_href($node, $node_id, $node_xhtml_id);
1734 $href = remove_unneeded_anchor($href);
1739 sub remove_unneeded_anchor($)
1742 my @hrefsplit = split("/", $href);
1743 for ($i = 0; $i < @hrefsplit; $i++) {
1744 $item = @hrefsplit[$i];
1746 @split = split(".html#", $item);
1747 if (@split[0] eq @split[1]) {
1748 @hrefsplit[$i] = @split[0] . ".html";
1752 $href = join("/", @hrefsplit);
1758 #############################################################################
1759 ### CUSTOM TOC FOR EACH PAGE (in a frame on the left)
1760 #############################################################################
1762 my $page_toc_depth = 2;
1763 my @default_toc = [];
1765 # Initialize the toc_depth to 1 if the command-line option -D=short_toc is given
1766 sub lilypond_init_toc_depth ()
1768 if (exists($main::value{'short_toc'}) and not exists($main::value{'bigpage'})
1769 and not $web_manual) {
1770 $page_toc_depth = 1;
1773 # Set the TOC-depth (depending on a texinfo variable short_toc) in a
1774 # command-handler, so we have them available when creating the pages
1775 push @Texi2HTML::Config::command_handler_process, \&lilypond_init_toc_depth;
1779 # recursively generate the TOC entries for the element and its children (which
1780 # are only shown up to maxlevel. All ancestors of the current element are also
1781 # shown with their immediate children, irrespective of their level.
1782 # Unnumbered entries are only printed out if they are at top-level or 2nd level
1783 # or their parent element is an ancestor of the currently viewed node.
1784 # The conditions to call this method to print the entry for a child node is:
1785 # -) the parent is an ancestor of the current page node
1786 # -) the parent is a numbered element at top-level toplevel (i.e. show numbered
1787 # and unnumbered 2nd-level children of numbered nodes)
1788 # -) the child element is a numbered node below level maxlevel
1789 sub generate_ly_toc_entries($$$$$)
1791 my $element = shift;
1792 my $element_path = shift;
1793 my $maxlevel = shift;
1797 my $child_count = shift;
1798 my $current_element = shift;
1799 # Skip undefined sections, plus all sections generated by index splitting
1800 return() if (not defined($element) or exists($element->{'index_page'}));
1802 my $level = $element->{'toc_level'};
1803 my $is_parent_of_current = $element->{'id'} && $element_path->{$element->{'id'}};
1804 my $ind = ' ' x $level;
1805 my $this_css_class = " class=\"";
1806 $this_css_class .= $is_parent_of_current ? ' toc_current"' : '"';
1807 my $entry = "$ind<li$this_css_class>" .
1808 &$anchor ($element->{'tocid'},
1809 "$element->{'file'}#$element->{'target'}",
1810 $element->{'text'});
1812 push (@result, $entry);
1813 my $children = $element->{'section_childs'};
1814 if (defined($children) and (ref($children) eq "ARRAY")) {
1815 my $force_children = $is_parent_of_current or ($level == 1 and $element->{'number'});
1816 my @child_result = ();
1817 my $sub_child_count = 0;
1818 foreach my $c (@$children) {
1819 my $is_numbered_child = defined ($c->{'number'});
1820 my $below_maxlevel = $c->{'toc_level'} le $maxlevel;
1821 if ($force_children or ($is_numbered_child and $below_maxlevel)) {
1823 generate_ly_toc_entries($c, $element_path, $maxlevel, $sub_child_count, $current_element);
1824 push (@child_result, @child_res);
1825 $sub_child_count += 1;
1828 # if no child nodes were generated, e.g. for the index, where expanded pages
1829 # are ignored, don't generate a list at all...
1830 if (@child_result) {
1831 push (@result, "\n$ind<ul$NO_BULLET_LIST_ATTRIBUTE>\n");
1833 push (@result, "$ind<li class=\"colorDefault" .
1834 ($element->{'text'} eq $current_element->{'text'} ?
1835 ' toc_current">' : '">') .
1836 &$anchor ($element->{'tocid'},
1837 "$element->{'file'}#$element->{'target'}",
1838 $element->{'text'}) . "</li>\n");
1840 push (@result, @child_result);
1841 push (@result, "$ind</ul>\n");
1844 push (@result, "$ind</li>\n");
1849 # Print a customized TOC, containing only the first two levels plus the whole
1850 # path to the current page
1851 sub lilypond_generate_page_toc_body($)
1853 my $element = shift;
1854 my $current_element = $element;
1856 $parentelements{$element->{'id'}} = 1;
1857 # Find the path to the current element
1858 while ( defined($current_element->{'sectionup'}) and
1859 ($current_element->{'sectionup'} ne $current_element) )
1861 $parentelements{$current_element->{'sectionup'}->{'id'}} = 1
1862 if ($current_element->{'sectionup'}->{'id'} ne '');
1863 $current_element = $current_element->{'sectionup'};
1865 if (exists($main::value{'shallow_toc'})) {
1870 return () if not defined($current_element);
1871 # Create the toc entries recursively
1872 my @toc_entries = "";
1874 @toc_entries = "<ul$NO_BULLET_LIST_ATTRIBUTE>\n";
1875 # FIXME: add link to main page, really hackily.
1876 if ($element->{'sectionup'}) {
1877 # it's not the top element
1878 push (@toc_entries, "<li><a href=\"index.html\"><span>LilyPond</span></a></li>\n");
1881 "<li class=\"toc_current\"><a href=\"index.html\"><span>LilyPond</span></a></li>\n");
1884 push (@toc_entries, "<div class=\"contents\">\n");
1885 push (@toc_entries, "<ul$NO_BULLET_LIST_ATTRIBUTE>\n");
1887 my $children = $current_element->{'section_childs'};
1888 foreach ( @$children ) {
1889 push (@toc_entries, generate_ly_toc_entries($_, \%parentelements, $page_toc_depth, 0, $element));
1892 # I'm assuming that we wouldn't keep the google search box? -gp
1893 if (!($ENV{AJAX_SEARCH} == 1)) {
1895 my $name = "search-box";
1896 $lang = $Texi2HTML::THISDOC{current_lang};
1897 open FILE, "$ENV{TOP_SRC_DIR}/Documentation/$lang/$name.ihtml" or
1898 open FILE, "$ENV{TOP_SRC_DIR}/Documentation/$name.ihtml" or
1899 die "no such file: $name.ihtml: $!";
1900 my $search_string = decode ('UTF-8', <FILE>);
1901 $search_string = "<li>\n" . $search_string . "</li>\n";
1902 push (@toc_entries, $search_string);
1906 push (@toc_entries, "</ul>\n");
1908 push (@toc_entries, "\n");
1910 push (@toc_entries, "</div>\n");
1912 return @toc_entries;
1915 sub lilypond_print_toc_div ($$)
1919 my @lines = @$tocref;
1920 # use default TOC if no custom lines have been generated
1921 @lines = @default_toc if (not @lines);
1924 print $fh "\n\n<div id=\"tocframe\">\n";
1926 # Remove the leading "GNU LilyPond --- " from the manual title
1927 my $topname = $Texi2HTML::NAME{'Top'};
1928 $topname =~ s/^GNU LilyPond(:| &[mn]dash;) //;
1930 # construct the top-level Docs index (relative path and including language!)
1931 my $lang = $Texi2HTML::THISDOC{current_lang};
1932 if ($lang and $lang ne "en") {
1937 my $reldir = $ENV{DEPTH};
1938 # strip one depth level for translations
1939 if ($lang and $lang ne "en" and substr ($reldir, 0, 3) eq '../') {
1940 $reldir = substr ($reldir, 3);
1942 # add a / at the end if there isn't one.
1943 if (substr ($reldir, -1) ne '/') {
1946 my $uplink = $reldir."Documentation/web/manuals.${lang}html";
1948 if (not $web_manual) {
1949 print $fh "<p class=\"toc_uplink\"><a href=\"$uplink\"
1950 title=\"Documentation Index\"><< " .
1951 &ly_get_string ('Back to Documentation Index') .
1954 # AJAX search box, written in JavaScript
1955 if ($ENV{'AJAX_SEARCH'} == 1) {
1956 if ($have_index_entries) {
1957 my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
1958 print $fh '<script language="JavaScript">print_search_field ("' .
1959 $Texi2HTML::THISDOC{current_lang} . '", "' .
1960 $docu_name . "\", " . $bigpage . ")</script>\n";
1964 print $fh '<h4 class="toc_header"> ' . &$anchor('',
1965 $Texi2HTML::HREF{'Top'},
1966 $topname . " <!-- Sidebar Version Tag --> ",
1967 'title="Start of the manual"'
1971 foreach my $line (@lines) {
1974 print $fh "</div>\n\n";
1978 # Create the custom TOC for this page (partially folded, current page is
1979 # highlighted) and store it in a global variable. The TOC is written out after
1980 # the html contents (but positioned correctly using CSS), so that browsers with
1981 # css turned off still show the contents first.
1982 our @this_page_toc = ();
1983 sub lilypond_print_element_header
1985 my $first_in_page = shift;
1986 my $previous_is_top = shift;
1987 if ($first_in_page and not @this_page_toc) {
1988 if (defined($Texi2HTML::THIS_ELEMENT)) {
1989 # Create the TOC for this page
1990 @this_page_toc = lilypond_generate_page_toc_body($Texi2HTML::THIS_ELEMENT);
1993 return &$default_print_element_header( $first_in_page, $previous_is_top);
1996 # Generate the HTML output for the TOC
1997 sub lilypond_toc_body($)
1999 my $elements_list = shift;
2000 # Generate a default TOC for pages without THIS_ELEMENT
2001 @default_toc = lilypond_generate_page_toc_body(@$elements_list[0]);
2002 return &$default_toc_body($elements_list);
2005 # Print out the TOC in a <div> at the beginning of the page
2006 sub lilypond_print_page_head($)
2009 &$default_print_page_head($fh);
2010 print $fh "<div id=\"main\">\n";
2013 # Print out the TOC in a <div> at the end of th page, which will be formatted as a
2014 # sidebar mimicking a TOC frame
2015 sub print_lilypond_page_foot($)
2018 my $program_string = &$program_string();
2019 # print $fh "<p><font size='-1'>$program_string</font><br>$PRE_BODY_CLOSE</p>\n";
2020 print $fh "<!-- FOOTER -->\n\n";
2021 print $fh "<!-- end div#main here -->\n</div>\n\n";
2023 # FIXME: This div and p#languages need to be in div#footer.
2024 # Should we move this div to postprocess_html.py ?
2025 print $fh "<div id=\"verifier_texinfo\">\n";
2026 print $fh "<h3>Validation</h3>\n";
2027 # FIXME: inlined text substitution, move to ly_get_string as soon as another case is needed
2028 my $webdev_link = "<a href=\"http://www.webdev.nl/\">webdev.nl</a>";
2029 my $lily_site = "<code>lilypond.org</code>";
2030 my $hosting_thanks = &ly_get_string ('<p>Thanks to ${webdev_link} for hosting ${lily_site}.');
2031 # this does the variable substitution ("quoting" in Perlish) after the localization
2032 $hosting_thanks =~ s/(\$\{\w+\})/$1/eeg;
2033 print $fh $hosting_thanks . "\n";
2034 print $fh "<a href=\"http://validator.w3.org/check?uri=referer\">\n";
2035 print $fh "<img src=\"http://www.w3.org/Icons/valid-html401\"\n";
2036 print $fh " alt=\"Valid HTML 4.01 Transitional\"\n";
2037 print $fh " height=\"31\" width=\"88\"></a></p>\n";
2041 # Print the TOC frame and reset the TOC:
2042 lilypond_print_toc_div ($fh, \@this_page_toc);
2043 @this_page_toc = ();
2046 print $fh "</body>\n</html>\n";
2053 #############################################################################
2054 ### NICER / MORE FLEXIBLE NAVIGATION PANELS
2055 #############################################################################
2057 sub get_navigation_text
2060 my $text = $NAVIGATION_TEXT{$button};
2061 if ( ($button eq 'Back') or ($button eq 'FastBack') ) {
2062 $text = $text . $Texi2HTML::NODE{$button} . " ";
2063 } elsif ( ($button eq 'Forward') or ($button eq 'FastForward') ) {
2064 $text = " " . $Texi2HTML::NODE{$button} . $text;
2065 } elsif ( $button eq 'Up' ) {
2066 $text = " ".$text.": " . $Texi2HTML::NODE{$button} . " ";
2072 # Don't automatically create left-aligned table cells for every link, but
2073 # instead create a <td> only on an appropriate '(left|right|center)-aligned-cell-n'
2074 # button text. It's alignment as well as the colspan will be taken from the
2075 # name of the button. Also, add 'newline' button text to create a new table
2076 # row. The texts of the buttons are generated by get_navigation_text and
2077 # will contain the name of the next/previous section/chapter.
2078 sub lilypond_print_navigation
2080 my $buttons = shift;
2081 my $vertical = shift;
2083 my $result = "<table class=\"nav_table\">\n";
2085 $result .= "<tr>" unless $vertical;
2086 my $beginofline = 1;
2087 foreach my $button (@$buttons)
2089 $result .= qq{<tr valign="top" align="left">\n} if $vertical;
2090 # Allow (left|right|center)-aligned-cell and newline as buttons!
2091 if ( $button =~ /^(.*)-aligned-cell-(.*)$/ )
2093 $result .= qq{</td>} unless $beginofline;
2094 $result .= qq{<td valign="middle" align="$1" colspan="$2">};
2097 elsif ( $button eq 'newline' )
2099 $result .= qq{</td>} unless $beginofline;
2100 $result .= qq{</tr>};
2101 $result .= qq{<tr>};
2105 elsif (ref($button) eq 'CODE')
2107 $result .= &$button($vertical);
2109 elsif (ref($button) eq 'SCALAR')
2111 $result .= "$$button" if defined($$button);
2113 elsif (ref($button) eq 'ARRAY')
2115 my $text = $button->[1];
2116 my $button_href = $button->[0];
2117 # verify that $button_href is simple text and text is a reference
2118 if (defined($button_href) and !ref($button_href)
2119 and defined($text) and (ref($text) eq 'SCALAR') and defined($$text))
2121 if ($Texi2HTML::HREF{$button_href})
2123 my $anchor_attributes = '';
2124 if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button_href})) and
2125 ($BUTTONS_ACCESSKEY{$button_href} ne ''))
2127 $anchor_attributes = "accesskey=\"$BUTTONS_ACCESSKEY{$button_href}\"";
2129 if ($USE_REL_REV and (defined($BUTTONS_REL{$button_href})) and
2130 ($BUTTONS_REL{$button_href} ne ''))
2132 $anchor_attributes .= " rel=\"$BUTTONS_REL{$button_href}\"";
2136 $Texi2HTML::HREF{$button_href},
2137 get_navigation_text($$text),
2143 $result .= get_navigation_text($$text);
2147 elsif ($button eq ' ')
2148 { # handle space button
2150 ($ICONS && $ACTIVE_ICONS{' '}) ?
2151 &$button_icon_img($BUTTONS_NAME{$button}, $ACTIVE_ICONS{' '}) :
2152 $NAVIGATION_TEXT{' '};
2155 elsif ($Texi2HTML::HREF{$button})
2156 { # button is active
2157 my $btitle = $BUTTONS_GOTO{$button} ?
2158 'title="' . $BUTTONS_GOTO{$button} . '"' : '';
2159 if ($USE_ACCESSKEY and (defined($BUTTONS_ACCESSKEY{$button})) and
2160 ($BUTTONS_ACCESSKEY{$button} ne ''))
2162 $btitle .= " accesskey=\"$BUTTONS_ACCESSKEY{$button}\"";
2164 if ($USE_REL_REV and (defined($BUTTONS_REL{$button})) and
2165 ($BUTTONS_REL{$button} ne ''))
2167 $btitle .= " rel=\"$BUTTONS_REL{$button}\"";
2169 if ($ICONS && $ACTIVE_ICONS{$button})
2173 $Texi2HTML::HREF{$button},
2174 &$button_icon_img($BUTTONS_NAME{$button},
2175 $ACTIVE_ICONS{$button},
2176 $Texi2HTML::SIMPLE_TEXT{$button}),
2185 $Texi2HTML::HREF{$button},
2186 get_navigation_text($button),
2193 { # button is passive
2195 $ICONS && $PASSIVE_ICONS{$button} ?
2196 &$button_icon_img($BUTTONS_NAME{$button},
2197 $PASSIVE_ICONS{$button},
2198 $Texi2HTML::SIMPLE_TEXT{$button}) :
2200 "[" . get_navigation_text($button) . "]";
2202 $result .= "</td>\n" if $vertical;
2203 $result .= "</tr>\n" if $vertical;
2205 $result .= "</td>" unless $beginofline;
2206 $result .= "</tr>" unless $vertical;
2207 $result .= "</table>\n";
2216 @Texi2HTML::Config::SECTION_BUTTONS =
2217 ('left-aligned-cell-1', 'FastBack',
2218 'center-aligned-cell-3', 'Top', 'Contents', 'Index', 'About',
2219 'right-aligned-cell-1', 'FastForward',
2221 'left-aligned-cell-2', 'Back',
2222 'center-aligned-cell-1', 'Up',
2223 'right-aligned-cell-2', 'Forward'
2226 # buttons for misc stuff
2227 @Texi2HTML::Config::MISC_BUTTONS = ('center-aligned-cell-3',
2228 'Top', 'Contents', 'Index', 'About');
2230 # buttons for chapter file footers
2231 # (and headers but only if SECTION_NAVIGATION is false)
2232 @Texi2HTML::Config::CHAPTER_BUTTONS =
2233 ('left-aligned-cell-1', 'FastBack',
2234 'center-aligned-cell-3', 'Top', 'Contents', 'Index', 'About',
2235 'right-aligned-cell-1', 'FastForward',
2238 # buttons for section file footers
2239 @Texi2HTML::Config::SECTION_FOOTER_BUTTONS =
2240 ('left-aligned-cell-1', 'FastBack',
2241 'center-aligned-cell-3', 'Top', 'Contents', 'Index', 'About',
2242 'right-aligned-cell-1', 'FastForward',
2244 'left-aligned-cell-2', 'Back',
2245 'center-aligned-cell-1', 'Up',
2246 'right-aligned-cell-2', 'Forward'
2249 @Texi2HTML::Config::NODE_FOOTER_BUTTONS =
2250 ('left-aligned-cell-1', 'FastBack',
2251 'center-aligned-cell-3', 'Top', 'Contents', 'Index', 'About',
2252 'right-aligned-cell-1', 'FastForward',
2254 'left-aligned-cell-2', 'Back',
2255 'center-aligned-cell-1', 'Up',
2256 'right-aligned-cell-2', 'Forward'
2263 #############################################################################
2264 ### FOOTNOTE FORMATTING
2265 #############################################################################
2267 # Format footnotes in a nicer way: Instead of printing the number in a separate
2268 # (nr) heading line, use the standard way of prepending <sup>nr</sup> immediately
2269 # before the fn text.
2272 # The following code is copied from texi2html's examples/makeinfo.init and
2273 # should be updated when texi2html makes some changes there!
2275 my $makekinfo_like_footnote_absolute_number = 0;
2277 sub makeinfo_like_foot_line_and_ref($$$$$$$$)
2279 my $foot_num = shift;
2280 my $relative_num = shift;
2283 my $from_file = shift;
2284 my $footnote_file = shift;
2288 $makekinfo_like_footnote_absolute_number++;
2290 # this is a bit obscure, this allows to add an anchor only if formatted
2291 # as part of the document.
2292 $docid = '' if ($state->{'outside_document'} or $state->{'multiple_pass'});
2294 if ($from_file eq $footnote_file)
2296 $from_file = $footnote_file = '';
2299 my $foot_anchor = "<sup>" .
2300 &$anchor($docid, "$footnote_file#$footid", $relative_num) . "</sup>";
2301 $foot_anchor = &$anchor($docid,
2302 "$footnote_file#$footid",
2303 "($relative_num)") if ($state->{'preformatted'});
2305 # unshift @$lines, "<li>";
2306 # push @$lines, "</li>\n";
2307 return ($lines, $foot_anchor);
2310 sub makeinfo_like_foot_lines($)
2313 unshift @$lines, "<hr>\n<h4>$Texi2HTML::I18n::WORDS->{'Footnotes_Title'}</h4>\n";
2314 #<ol type=\"1\">\n";
2315 # push @$lines, "</ol>";
2319 my %makekinfo_like_paragraph_in_footnote_nr;
2321 sub makeinfo_like_paragraph ($$$$$$$$$$$$$)
2326 my $paragraph_command = shift;
2327 my $paragraph_command_formatted = shift;
2328 my $paragraph_number = shift;
2330 my $item_nr = shift;
2331 my $enumerate_style = shift;
2333 my $command_stack_at_end = shift;
2334 my $command_stack_at_begin = shift;
2336 #print STDERR "format: $format\n" if (defined($format));
2337 #print STDERR "paragraph @$command_stack_at_end; @$command_stack_at_begin\n";
2338 $paragraph_command_formatted = '' if (!defined($paragraph_command_formatted) or
2339 exists($special_list_commands{$format}->{$paragraph_command}));
2340 return '' if ($text =~ /^\s*$/);
2341 foreach my $style(t2h_collect_styles($command_stack_at_begin))
2343 $text = t2h_begin_style($style, $text);
2345 foreach my $style(t2h_collect_styles($command_stack_at_end))
2347 $text = t2h_end_style($style, $text);
2349 if (defined($paragraph_number) and defined($$paragraph_number))
2351 $$paragraph_number++;
2352 return $text if (($format eq 'itemize' or $format eq 'enumerate') and
2353 ($$paragraph_number == 1));
2355 # The cells of a table should not be wrapped in a <p> tag, so just return the text
2356 if (defined($command_stack_at_begin->[0]) and $command_stack_at_begin->[0] eq 'multitable')
2361 # Adjust all footnotes so that they look like good old makeinfo
2365 $open .= " align=\"$paragraph_style{$align}\"";
2367 my $footnote_text = '';
2368 if (defined($command_stack_at_begin->[0]) and $command_stack_at_begin->[0] eq 'footnote')
2370 my $state = $Texi2HTML::THISDOC{'state'};
2371 $makekinfo_like_paragraph_in_footnote_nr{$makekinfo_like_footnote_absolute_number}++;
2372 if ($makekinfo_like_paragraph_in_footnote_nr{$makekinfo_like_footnote_absolute_number} <= 1)
2374 $open.=' class="footnote"';
2375 my $document_file = $state->{'footnote_document_file'};
2376 if ($document_file eq $state->{'footnote_footnote_file'})
2378 $document_file = '';
2380 my $docid = $state->{'footnote_place_id'};
2381 my $doc_state = $state->{'footnote_document_state'};
2382 $docid = '' if ($doc_state->{'outside_document'} or $doc_state->{'multiple_pass'});
2383 my $foot_label = &$anchor($state->{'footnote_footnote_id'},
2384 $document_file . "#$state->{'footnote_place_id'}",
2385 "$state->{'footnote_number_in_page'}");
2386 $footnote_text = "<small>[${foot_label}]</small> ";
2389 return $open.'>'.$footnote_text.$text.'</p>';
2393 #############################################################################
2394 ### WRITING OUT THE INDEX FOR THE AJAX SEARCH FIELD
2395 #############################################################################
2397 $Texi2HTML::Config::IDX_SUMMARY = 1;
2398 $Texi2HTML::Config::init_out = \&lilypond_init_out;
2399 $Texi2HTML::Config::finish_out = \&lilypond_finish_out;
2400 $Texi2HTML::Config::index_summary_file_entry = \&lilypond_index_summary_file_entry;
2404 sub lilypond_init_out ()
2406 t2h_default_init_out ();
2407 # Check whether we have an index at all! If not -> don't print out a search box!
2408 my $ix = main::get_index ("cp");
2409 $have_index_entries = (scalar $ix > 0);
2412 sub lilypond_index_summary_file_entry ($$$$$$$$$)
2414 my $index_name = shift;
2415 my $entry_text = shift;
2416 my $entry_reference = shift;
2417 my $formatted_entry = shift;
2418 my $texi_entry = shift;
2419 my $entry_element_reference = shift;
2420 my $entry_element_header = shift;
2421 my $is_printed = shift;
2422 my $manual_name = shift;
2424 if ($ENV{'AJAX_SEARCH'}==1) {
2425 if ($index_name eq "cp")
2427 # The entries in the index file have the form:
2428 # SearchText \t FormattedText \t EntryURL \t SectionText \t SectionURL
2429 push @index_entries, "$entry_text\t$formatted_entry\t$entry_reference\t$entry_element_header\t$entry_element_reference\n";
2434 sub lilypond_finish_out ()
2436 if ($ENV{'AJAX_SEARCH'}==1) {
2437 if (((scalar @index_entries) > 0) and $have_index_entries) {
2438 my $lang = $Texi2HTML::THISDOC{current_lang};
2440 $big = "-big-page" if $bigpage;
2441 my ($docu_dir, $docu_name) = split_texi_filename ($Texi2HTML::THISDOC{'input_file_name'});
2442 my $idx_file = "$docu_dir/$docu_name$big.$lang.idx";
2443 open IDXOUTFILE, ">:utf8", $idx_file;
2444 print IDXOUTFILE @index_entries;
2452 #############################################################################
2454 #############################################################################
2456 # For split pages, use index.html as start page!
2457 if ($Texi2HTML::Config::SPLIT eq 'section' or
2458 $Texi2HTML::Config::SPLIT eq 'node') {
2459 $Texi2HTML::Config::TOP_FILE = 'index.html';