docgenerator 2.1.1 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/docgenerator.rb +18 -18
- data/lib/docgenerator/characters.rb +1 -0
- data/lib/docgenerator/css.rb +5 -0
- data/lib/docgenerator/document.rb +7 -2
- data/lib/docgenerator/element.rb +2 -2
- data/lib/docgenerator/elements.rb +69 -2
- data/lib/docgenerator/index.rb +1 -1
- data/lib/docgenerator/packages/listings.rb +94 -94
- data/lib/docgenerator/packages/multicol.rb +1 -1
- data/lib/docgenerator/packages/pdfpages.rb +2 -1
- data/lib/docgenerator/packages/rubycode4doc.rb +173 -172
- data/lib/docgenerator/packages/struktex.rb +395 -379
- data/lib/docgenerator/packages/todonotes.rb +2 -2
- data/lib/docgenerator/packages/url.rb +4 -0
- data/lib/docgenerator/sections.rb +24 -2
- data/lib/docgenerator/tabular.rb +59 -14
- data/lib/docgenerator/templates/docgenerator_template.rb +1 -0
- data/lib/docgenerator/templates/docgenerator_template.yaml +30 -1
- data/lib/docgenerator/version.rb +13 -1
- data/meta_test_and_doc/build__meta.rb +3 -10
- data/meta_test_and_doc/build_doc.rb +4 -2
- data/meta_test_and_doc/build_test.rb +21 -17
- data/meta_test_and_doc/manpages/images.rb +152 -0
- data/unittest/expected/test_document_toc_article.latex +6 -6
- data/unittest/expected_struktex/test_struktex_krug.creole +5 -5
- data/unittest/expected_struktex/test_struktex_krug.wiki +5 -5
- data/unittest/expected_struktex/test_struktex_statement.creole +4 -4
- data/unittest/expected_struktex/test_struktex_statement.wiki +4 -4
- data/unittest/expected_templates/test_report_utf8.tex +34 -0
- data/unittest/expected_templates/test_standalone.tex +2 -1
- data/unittest/unittest_docgenerator.rb +37 -30
- data/unittest/unittest_docgenerator_characters.rb +113 -60
- data/unittest/unittest_docgenerator_runtex.rb +16 -12
- data/unittest/unittest_packages_multicol.rb +4 -9
- data/unittest/unittest_packages_struktex.rb +66 -90
- data/unittest/unittest_rubycode4doc.rb +38 -241
- data/unittest/unittest_templates.rb +4 -8
- metadata +23 -560
- data/examples/creole_example.rb +0 -81
- data/examples/creole_example_footnote.rb +0 -67
- data/examples/creole_example_new_plugin.rb +0 -51
- data/examples/creole_example_placeholder.rb +0 -77
- data/examples/creole_example_rail.rb +0 -154
- data/examples/creole_example_rubycode.rb +0 -144
- data/examples/creole_example_struktex.rb +0 -169
- data/examples/creole_example_tabular.rb +0 -97
- data/examples/wiki2docgenerator_example.rb +0 -299
- data/lib/creole/creole2doc.rb +0 -954
- data/lib/creole/creole_characters.rb +0 -120
- data/lib/creole/creole_inclusion_and_plugins.rb +0 -96
- data/lib/creole/creole_inclusions.rb +0 -154
- data/lib/creole/creole_placeholder.rb +0 -171
- data/lib/creole/creole_plugins.rb +0 -230
- data/lib/creole/creole_tabular.rb +0 -401
- data/lib/creole/plugins/rail.rb +0 -181
- data/lib/creole/plugins/rubycode4creole.rb +0 -136
- data/lib/creole/plugins/struktex.rb +0 -59
- data/lib/creole/plugins/todonotes.rb +0 -77
- data/lib/wiki2doc/plugins/rubycode4wiki.rb +0 -53
- data/lib/wiki2doc/plugins/struktex.rb +0 -12
- data/lib/wiki2doc/wiki2docgenerator.rb +0 -1276
- data/lib/wiki2doc/wikimedia_document.rb +0 -24
- data/meta_test_and_doc/manpages/packages.rb +0 -13
- data/unittest/Red_Flower.jpg +0 -0
- data/unittest/creole1.0test.txt +0 -128
- data/unittest/creole_testtext.creole +0 -11
- data/unittest/expected_creole/test_creole.html +0 -3
- data/unittest/expected_creole/test_creole_characters_all.creole +0 -28
- data/unittest/expected_creole/test_creole_characters_all.html +0 -18
- data/unittest/expected_creole/test_creole_characters_all.latex +0 -36
- data/unittest/expected_creole/test_creole_characters_special.html +0 -10
- data/unittest/expected_creole/test_creole_characters_special.latex +0 -18
- data/unittest/expected_creole/test_creole_comment.context +0 -11
- data/unittest/expected_creole/test_creole_comment.creole +0 -12
- data/unittest/expected_creole/test_creole_comment.html +0 -9
- data/unittest/expected_creole/test_creole_comment.latex +0 -11
- data/unittest/expected_creole/test_creole_countdown.html +0 -3
- data/unittest/expected_creole/test_creole_countdown.latex +0 -4
- data/unittest/expected_creole/test_creole_creole1.0test.html +0 -182
- data/unittest/expected_creole/test_creole_creole1.0test.latex +0 -253
- data/unittest/expected_creole/test_creole_creole1.0test.text +0 -160
- data/unittest/expected_creole/test_creole_footnotes.html +0 -9
- data/unittest/expected_creole/test_creole_footnotes.latex +0 -14
- data/unittest/expected_creole/test_creole_footnotes_groupid.html +0 -15
- data/unittest/expected_creole/test_creole_footnotes_label.html +0 -9
- data/unittest/expected_creole/test_creole_headings.html +0 -17
- data/unittest/expected_creole/test_creole_headings.latex +0 -19
- data/unittest/expected_creole/test_creole_headings.text +0 -48
- data/unittest/expected_creole/test_creole_headings.wiki +0 -37
- data/unittest/expected_creole/test_creole_hr.html +0 -7
- data/unittest/expected_creole/test_creole_hr.latex +0 -9
- data/unittest/expected_creole/test_creole_hr.text +0 -4
- data/unittest/expected_creole/test_creole_ignore.html +0 -3
- data/unittest/expected_creole/test_creole_ignore.latex +0 -4
- data/unittest/expected_creole/test_creole_ignore.text +0 -2
- data/unittest/expected_creole/test_creole_inline.html +0 -3
- data/unittest/expected_creole/test_creole_inline.latex +0 -4
- data/unittest/expected_creole/test_creole_inline.text +0 -2
- data/unittest/expected_creole/test_creole_inline_apostroph.html +0 -6
- data/unittest/expected_creole/test_creole_inline_apostroph.latex +0 -8
- data/unittest/expected_creole/test_creole_inline_apostroph.text +0 -4
- data/unittest/expected_creole/test_creole_inline_ruby.html +0 -12
- data/unittest/expected_creole/test_creole_inline_ruby.latex +0 -20
- data/unittest/expected_creole/test_creole_inline_ruby_raw.html +0 -6
- data/unittest/expected_creole/test_creole_inline_ruby_raw.latex +0 -8
- data/unittest/expected_creole/test_creole_input.normsource +0 -25
- data/unittest/expected_creole/test_creole_input.normsource_1.8 +0 -23
- data/unittest/expected_creole/test_creole_input_file_simple.html +0 -15
- data/unittest/expected_creole/test_creole_input_file_simple_readlines.html +0 -15
- data/unittest/expected_creole/test_creole_label.html +0 -12
- data/unittest/expected_creole/test_creole_label.latex +0 -15
- data/unittest/expected_creole/test_creole_line_break.html +0 -6
- data/unittest/expected_creole/test_creole_line_break.latex +0 -8
- data/unittest/expected_creole/test_creole_links_explicit_internal.html +0 -6
- data/unittest/expected_creole/test_creole_links_explicit_internal.text +0 -4
- data/unittest/expected_creole/test_creole_links_explicit_with_em.html +0 -3
- data/unittest/expected_creole/test_creole_links_explicit_with_em.latex +0 -4
- data/unittest/expected_creole/test_creole_links_explicit_with_em.text +0 -2
- data/unittest/expected_creole/test_creole_links_external.html +0 -6
- data/unittest/expected_creole/test_creole_links_external.latex +0 -8
- data/unittest/expected_creole/test_creole_links_external.text +0 -4
- data/unittest/expected_creole/test_creole_links_external_implicit.html +0 -9
- data/unittest/expected_creole/test_creole_links_external_implicit.latex +0 -12
- data/unittest/expected_creole/test_creole_links_external_implicit.text +0 -6
- data/unittest/expected_creole/test_creole_links_file.html +0 -6
- data/unittest/expected_creole/test_creole_links_file.latex +0 -8
- data/unittest/expected_creole/test_creole_links_file.text +0 -4
- data/unittest/expected_creole/test_creole_links_implicit_end.creole +0 -4
- data/unittest/expected_creole/test_creole_links_implicit_end.html +0 -3
- data/unittest/expected_creole/test_creole_links_implicit_end.latex +0 -4
- data/unittest/expected_creole/test_creole_list_ol.html +0 -12
- data/unittest/expected_creole/test_creole_list_ol.latex +0 -22
- data/unittest/expected_creole/test_creole_list_ol_after_ul.html +0 -12
- data/unittest/expected_creole/test_creole_list_ol_after_ul.latex +0 -20
- data/unittest/expected_creole/test_creole_list_ol_after_ul.text +0 -6
- data/unittest/expected_creole/test_creole_list_ol_ul.html +0 -15
- data/unittest/expected_creole/test_creole_list_ol_ul.latex +0 -26
- data/unittest/expected_creole/test_creole_list_ul.html +0 -22
- data/unittest/expected_creole/test_creole_list_ul.latex +0 -40
- data/unittest/expected_creole/test_creole_list_ul.normsource +0 -89
- data/unittest/expected_creole/test_creole_list_ul.normsource_1.8 +0 -83
- data/unittest/expected_creole/test_creole_list_ul_too_much.html +0 -24
- data/unittest/expected_creole/test_creole_list_ul_too_much.latex +0 -44
- data/unittest/expected_creole/test_creole_list_ulul_without_ul.html +0 -6
- data/unittest/expected_creole/test_creole_list_ulul_without_ul.latex +0 -12
- data/unittest/expected_creole/test_creole_mix_titles_list.html +0 -10
- data/unittest/expected_creole/test_creole_mix_titles_list.latex +0 -18
- data/unittest/expected_creole/test_creole_mix_titles_list.text +0 -12
- data/unittest/expected_creole/test_creole_newline.html +0 -9
- data/unittest/expected_creole/test_creole_newline.latex +0 -11
- data/unittest/expected_creole/test_creole_newline.text +0 -7
- data/unittest/expected_creole/test_creole_paragraphs.html +0 -6
- data/unittest/expected_creole/test_creole_paragraphs.latex +0 -8
- data/unittest/expected_creole/test_creole_paragraphs.normsource +0 -29
- data/unittest/expected_creole/test_creole_paragraphs.normsource_1.8 +0 -27
- data/unittest/expected_creole/test_creole_paragraphs.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs.wiki +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap.html +0 -5
- data/unittest/expected_creole/test_creole_paragraphs_wrap.latex +0 -6
- data/unittest/expected_creole/test_creole_paragraphs_wrap.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap.wiki +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.html +0 -9
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.latex +0 -11
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.text +0 -7
- data/unittest/expected_creole/test_creole_paragraphs_wrap0.wiki +0 -7
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.html +0 -5
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.latex +0 -6
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.text +0 -4
- data/unittest/expected_creole/test_creole_paragraphs_wrap60.wiki +0 -4
- data/unittest/expected_creole/test_creole_picture_link.html +0 -6
- data/unittest/expected_creole/test_creole_pictures.html +0 -10
- data/unittest/expected_creole/test_creole_pictures.latex +0 -13
- data/unittest/expected_creole/test_creole_pictures_css.html +0 -6
- data/unittest/expected_creole/test_creole_pictures_css.latex +0 -8
- data/unittest/expected_creole/test_creole_pictures_imgclass.html +0 -6
- data/unittest/expected_creole/test_creole_pictures_imgclass.latex +0 -8
- data/unittest/expected_creole/test_creole_pictures_longdesc.html +0 -3
- data/unittest/expected_creole/test_creole_pictures_width.html +0 -3
- data/unittest/expected_creole/test_creole_pictures_width.latex +0 -4
- data/unittest/expected_creole/test_creole_placeholders_html.html +0 -7
- data/unittest/expected_creole/test_creole_placeholders_html.latex +0 -8
- data/unittest/expected_creole/test_creole_placeholders_html.text +0 -4
- data/unittest/expected_creole/test_creole_placeholders_latex.html +0 -6
- data/unittest/expected_creole/test_creole_placeholders_latex.latex +0 -9
- data/unittest/expected_creole/test_creole_placeholders_latex.text +0 -4
- data/unittest/expected_creole/test_creole_short_html.html +0 -3
- data/unittest/expected_creole/test_creole_short_html.latex +0 -4
- data/unittest/expected_creole/test_creole_short_html.text +0 -2
- data/unittest/expected_creole/test_creole_shy.creole +0 -6
- data/unittest/expected_creole/test_creole_shy.html +0 -6
- data/unittest/expected_creole/test_creole_shy.latex +0 -8
- data/unittest/expected_creole/test_creole_shy.text +0 -4
- data/unittest/expected_creole/test_creole_tabular.creole +0 -22
- data/unittest/expected_creole/test_creole_tabular.html +0 -20
- data/unittest/expected_creole/test_creole_tabular.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_creole.creole +0 -19
- data/unittest/expected_creole/test_creole_tabular_creole.html +0 -18
- data/unittest/expected_creole/test_creole_tabular_creole.latex +0 -19
- data/unittest/expected_creole/test_creole_tabular_css.creole +0 -24
- data/unittest/expected_creole/test_creole_tabular_css.html +0 -20
- data/unittest/expected_creole/test_creole_tabular_css.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_multicols.creole +0 -16
- data/unittest/expected_creole/test_creole_tabular_multicols.html +0 -14
- data/unittest/expected_creole/test_creole_tabular_multicols.latex +0 -16
- data/unittest/expected_creole/test_creole_tabular_row_parameters.latex +0 -22
- data/unittest/expected_creole/test_creole_tabular_with_cell_option.creole +0 -21
- data/unittest/expected_creole/test_creole_tabular_with_cell_option.html +0 -20
- data/unittest/expected_creole/test_creole_toc.html +0 -13
- data/unittest/expected_creole/test_creole_toc.latex +0 -22
- data/unittest/expected_creole/test_creole_toc.text +0 -4
- data/unittest/expected_creole/test_creole_toc_level.html +0 -7
- data/unittest/expected_creole/test_creole_toc_level.latex +0 -10
- data/unittest/expected_creole/test_creole_toc_level.text +0 -3
- data/unittest/expected_creole/test_creole_toc_level_text.html +0 -8
- data/unittest/expected_creole/test_creole_toc_level_text.latex +0 -9
- data/unittest/expected_creole/test_creole_toc_text.html +0 -5
- data/unittest/expected_creole/test_creole_toc_text.latex +0 -5
- data/unittest/expected_creole/test_creole_ul_multiple_line.html +0 -7
- data/unittest/expected_creole/test_creole_ul_multiple_line.latex +0 -14
- data/unittest/expected_creole/test_creole_ul_with_blank.html +0 -11
- data/unittest/expected_creole/test_creole_ul_with_blank.latex +0 -20
- data/unittest/expected_creole/test_creole_ul_with_bold.creole +0 -0
- data/unittest/expected_creole/test_creole_ul_with_bold.html +0 -11
- data/unittest/expected_creole/test_creole_ul_with_bold.latex +0 -18
- data/unittest/expected_creole/test_creole_ul_with_bold.text +0 -7
- data/unittest/expected_creole/test_creole_verbatim.html +0 -25
- data/unittest/expected_creole/test_creole_verbatim.latex +0 -33
- data/unittest/expected_creole/test_creole_verbatim.text +0 -17
- data/unittest/expected_creole/test_creole_verbatim_inline.html +0 -6
- data/unittest/expected_creole/test_creole_verbatim_inline.latex +0 -8
- data/unittest/expected_creole/test_creole_verbatim_inline_at_start.html +0 -6
- data/unittest/expected_creole/test_creole_verbatim_inline_at_start.latex +0 -8
- data/unittest/expected_creole_rail/test_rail_creole_object.tex +0 -33
- data/unittest/expected_creole_rail/test_rail_creole_placeholder.tex +0 -40
- data/unittest/expected_rubycode4doc/creole_complete.html +0 -26
- data/unittest/expected_rubycode4doc/creole_complete.tex +0 -40
- data/unittest/expected_rubycode4doc/creole_in_tab.html +0 -4
- data/unittest/expected_rubycode4doc/creole_in_tab.tex +0 -6
- data/unittest/expected_rubycode4doc/creole_inline_ruby.html +0 -7
- data/unittest/expected_rubycode4doc/creole_output.html +0 -2
- data/unittest/expected_rubycode4doc/creole_output.tex +0 -4
- data/unittest/expected_rubycode4doc/creole_rubycode.html +0 -1
- data/unittest/expected_rubycode4doc/creole_rubycode.tex +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.html +0 -1
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.tex +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.html +0 -3
- data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.tex +0 -5
- data/unittest/expected_rubycode4doc/wiki_1.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_2.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_3.html +0 -9
- data/unittest/expected_rubycode4doc/wiki_immediate_1.html +0 -5
- data/unittest/expected_rubycode4doc/wiki_immediate_2.html +0 -5
- data/unittest/expected_rubycode4doc/wiki_immediate_3.html +0 -8
- data/unittest/expected_rubycode4doc/wiki_immediate_full.html +0 -21
- data/unittest/expected_wikimedia/test_wiki.html +0 -6
- data/unittest/expected_wikimedia/test_wiki.latex +0 -12
- data/unittest/expected_wikimedia/test_wiki.text +0 -14
- data/unittest/expected_wikimedia/test_wiki.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_description.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_description.latex +0 -11
- data/unittest/expected_wikimedia/test_wiki_description.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_description.wiki +0 -6
- data/unittest/expected_wikimedia/test_wiki_footnote.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_footnote.latex +0 -17
- data/unittest/expected_wikimedia/test_wiki_footnote.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_footnote.wiki +0 -10
- data/unittest/expected_wikimedia/test_wiki_footnote_2.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_footnote_groupid.html +0 -21
- data/unittest/expected_wikimedia/test_wiki_html_code.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_html_code.latex +0 -10
- data/unittest/expected_wikimedia/test_wiki_html_code.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_html_code.wiki +0 -6
- data/unittest/expected_wikimedia/test_wiki_inline.html +0 -6
- data/unittest/expected_wikimedia/test_wiki_inline.latex +0 -12
- data/unittest/expected_wikimedia/test_wiki_inline.text +0 -8
- data/unittest/expected_wikimedia/test_wiki_inline.wiki +0 -8
- data/unittest/expected_wikimedia/test_wiki_label.html +0 -6
- data/unittest/expected_wikimedia/test_wiki_link.html +0 -8
- data/unittest/expected_wikimedia/test_wiki_link.latex +0 -17
- data/unittest/expected_wikimedia/test_wiki_link.wiki +0 -11
- data/unittest/expected_wikimedia/test_wiki_list_ol.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ol.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.html +0 -16
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.latex +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.text +0 -8
- data/unittest/expected_wikimedia/test_wiki_list_ol_after_ul.wiki +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ol_ul.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ul.html +0 -24
- data/unittest/expected_wikimedia/test_wiki_list_ul.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_list_ul.text +0 -10
- data/unittest/expected_wikimedia/test_wiki_list_ul.wiki +0 -12
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.html +0 -39
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.latex +0 -51
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.text +0 -11
- data/unittest/expected_wikimedia/test_wiki_list_ul_too_much.wiki +0 -15
- data/unittest/expected_wikimedia/test_wiki_picture.html +0 -55
- data/unittest/expected_wikimedia/test_wiki_picture.latex +0 -76
- data/unittest/expected_wikimedia/test_wiki_picture_thumb.html +0 -5
- data/unittest/expected_wikimedia/test_wiki_tab1.html +0 -30
- data/unittest/expected_wikimedia/test_wiki_tab1.latex +0 -30
- data/unittest/expected_wikimedia/test_wiki_tab1.wiki +0 -29
- data/unittest/expected_wikimedia/test_wiki_textformatting.html +0 -7
- data/unittest/expected_wikimedia/test_wiki_textformatting.latex +0 -16
- data/unittest/expected_wikimedia/test_wiki_textformatting.text +0 -11
- data/unittest/expected_wikimedia/test_wiki_textformatting.wiki +0 -9
- data/unittest/expected_wikimedia/test_wiki_toc.html +0 -9
- data/unittest/expected_wikimedia/test_wiki_toc.latex +0 -18
- data/unittest/expected_wikimedia/test_wiki_toc.text +0 -21
- data/unittest/expected_wikimedia/test_wiki_toc.wiki +0 -18
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.html +0 -18
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.latex +0 -19
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.text +0 -6
- data/unittest/expected_wikimedia/test_wiki_ul_multiple_line.wiki +0 -7
- data/unittest/unittest_creole.rb +0 -1361
- data/unittest/unittest_creole_placeholders.rb +0 -150
- data/unittest/unittest_creole_plugin_rail.rb +0 -147
- data/unittest/unittest_creole_tabular.rb +0 -207
- data/unittest/unittest_wikimedia.rb +0 -479
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cd108cc058c487c972f6cb1109f5a1c89d2d68e2
|
4
|
+
data.tar.gz: 5b44229fb757db659df881fed9d32730a728191f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58bbd95977ee3e3567ed687214143aa4f86a9ee83398864c4e7bb14ba4363c4f6ef73d14087ef4d399f06030a496383f5a2998301857d42e20f7857a1eb4e947
|
7
|
+
data.tar.gz: 6fb65c6ea46159d8fccfefed1fa8b2c52eec97e1c818c11e775313299d19eeb70025e5dd00f132cc400e36d5d6524ef6d98e8c64682c1c0ce470bc402d52c7e6
|
data/lib/docgenerator.rb
CHANGED
@@ -343,26 +343,26 @@ if $0 == __FILE__ and RUBY_VERSION =~ /1.9/
|
|
343
343
|
$:.unshift('.')
|
344
344
|
end
|
345
345
|
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
#~
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
346
|
+
require_relative 'docgenerator/version'
|
347
|
+
require_relative 'docgenerator/standard'
|
348
|
+
require_relative 'docgenerator/element_meta' #Meta-class definitions
|
349
|
+
require_relative 'docgenerator/element' #includes definition of method 'element'
|
350
|
+
#~ require_relative 'docgenerator/compatibility_v1' #some old code
|
351
|
+
require_relative 'docgenerator/templates/docgenerator_template'
|
352
|
+
require_relative 'docgenerator/css'
|
353
|
+
require_relative 'docgenerator/templates/docgenerator_template_css'
|
354
|
+
require_relative 'docgenerator/attribute'
|
355
|
+
require_relative 'docgenerator/document'
|
356
356
|
#~ require_relative 'docgenerator/document'
|
357
357
|
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
358
|
+
require_relative 'docgenerator/elements'
|
359
|
+
require_relative 'docgenerator/environments'
|
360
|
+
require_relative 'docgenerator/lists' #define environment
|
361
|
+
require_relative 'docgenerator/sections'
|
362
|
+
require_relative 'docgenerator/tabular'
|
363
|
+
require_relative 'docgenerator/footnote'
|
364
|
+
require_relative 'docgenerator/index' #makeindex, index, printindex...
|
365
|
+
require_relative 'docgenerator/characters' #special characters (spaces, euro-sign...)
|
366
366
|
#~ require_relative 'docgenerator/characters' #special characters (spaces, euro-sign...)
|
367
367
|
|
368
368
|
#quicktest
|
data/lib/docgenerator/css.rb
CHANGED
@@ -133,6 +133,11 @@ This values can be used inline (style-Attribute) and inside style>-Tags
|
|
133
133
|
#Generell settings
|
134
134
|
#~ ['bottom', 'top', 'middle', 'baseline'],
|
135
135
|
}
|
136
|
+
#Check if a key is valid.
|
137
|
+
def supports?(key)
|
138
|
+
return @@values[key]
|
139
|
+
end
|
140
|
+
|
136
141
|
def initialize( values ={} )
|
137
142
|
@values = {}
|
138
143
|
#~ set_option_defaults(values) #guarantee :log
|
@@ -64,7 +64,7 @@ The templates refer to the corresponding TeX-classes.
|
|
64
64
|
#Set template defaults
|
65
65
|
@template = {
|
66
66
|
:html => DocumentTemplate[:html],
|
67
|
-
:latex => DocumentTemplate[:
|
67
|
+
:latex => DocumentTemplate[:article_utf8],
|
68
68
|
:text => DocumentTemplate[:text],
|
69
69
|
:wiki => DocumentTemplate[:wiki],
|
70
70
|
}
|
@@ -519,8 +519,11 @@ If the method is called directly to prepare document snipplets, you can use:
|
|
519
519
|
)
|
520
520
|
|
521
521
|
=end
|
522
|
-
def to_doc( target, options )
|
522
|
+
def to_doc( target, options = {} )
|
523
523
|
#~ o = set_option_defaults(options)
|
524
|
+
options[:template] ||= @template[target]
|
525
|
+
options[:log] ||= @log
|
526
|
+
|
524
527
|
options[:log].info( "Build document for #{target.inspect}" ) if options[:log].info?
|
525
528
|
|
526
529
|
#check target
|
@@ -672,6 +675,8 @@ Usage:
|
|
672
675
|
out.gsub!( /&/, '\\\\&')
|
673
676
|
out.gsub!( /_/, '\_')
|
674
677
|
out.gsub!( /#/, '\#')
|
678
|
+
#~ out.gsub!( /\^/, '\(\wedge\)')
|
679
|
+
out.gsub!( /\^/, '\textasciicircum{}')
|
675
680
|
#~ out.gsub!( /€/, '\euro ') #regexp is in utf-8 -- may make problems.
|
676
681
|
return out
|
677
682
|
end
|
data/lib/docgenerator/element.rb
CHANGED
@@ -86,7 +86,7 @@ In Elementto_doc you can give another logger!
|
|
86
86
|
elsif @attr_alias[k]
|
87
87
|
@attr_alias[k] << v
|
88
88
|
else
|
89
|
-
@log.warn("Usage of unknown attribute '#{k}' in #{self.inspect}") if @log.warn?
|
89
|
+
@log.warn("Usage of unknown attribute '#{k}' in #{self.inspect} (Available: #{@attr.keys})") if @log.warn?
|
90
90
|
#~ @log.debug(caller) if @log.debug?
|
91
91
|
end
|
92
92
|
}
|
@@ -554,7 +554,7 @@ def element( name, attr = {}, content = nil )
|
|
554
554
|
elementclass = Docgenerator::Element.get( name )
|
555
555
|
if ! elementclass #Create a dummy element.
|
556
556
|
#~ element = Docgenerator::Element.create( name, {}, true ).new(attr, content )
|
557
|
-
Docgenerator::DOCGENERATOR_LOGGER.error( "Usage of undefined element #{name}. Create an anonymous class")
|
557
|
+
Docgenerator::DOCGENERATOR_LOGGER.error( "Usage of undefined element #{name.inspect}. Create an anonymous class")
|
558
558
|
elementclass = Class.new(Docgenerator::Element)
|
559
559
|
elementclass.add_id name
|
560
560
|
end
|
@@ -278,7 +278,7 @@ For LaTeX \tableofcontents is created, with attribute :as_list you can create a
|
|
278
278
|
class Tableofcontents < Element
|
279
279
|
|
280
280
|
add_attributes HTML_ATTR_ALL
|
281
|
-
add_attribute :level , Attribute.create( [ :html, :latex ], [
|
281
|
+
add_attribute :level , Attribute.create( [ :html, :latex ], [Integer], 1 )
|
282
282
|
add_attribute :pre , Attribute.create( [ :html, :latex ], nil, 2 )
|
283
283
|
add_attribute :post , Attribute.create( [ :html, :latex ], nil, 2 )
|
284
284
|
add_attribute :as_list , Attribute.create( [ :latex ], [true, false], 2 )
|
@@ -801,6 +801,53 @@ Attributes may be:
|
|
801
801
|
add_wiki_output '#{linebreak(@crbefore)}[[??#{@attr[:name]}]]#{@content}#{linebreak(@crafter)}'
|
802
802
|
end #Label
|
803
803
|
|
804
|
+
=begin rdoc
|
805
|
+
Define Element :pageref
|
806
|
+
|
807
|
+
Create an instance with
|
808
|
+
element( :pageref, [ attributes, [content]] )
|
809
|
+
or
|
810
|
+
Pageref.new( [ attributes, [content]] )
|
811
|
+
|
812
|
+
Attributes may be:
|
813
|
+
* HTML_ATTR_CORE
|
814
|
+
* HTML_ATTR_I18N
|
815
|
+
* HTML_ATTR_EVENTS
|
816
|
+
* ATTR_LANG
|
817
|
+
=end
|
818
|
+
class Pageref < Element
|
819
|
+
add_attributes HTML_ATTR_CORE
|
820
|
+
add_attributes HTML_ATTR_I18N
|
821
|
+
add_attributes HTML_ATTR_EVENTS
|
822
|
+
add_html_output '#{linebreak(@crbefore)}<a name="#{@content}">#{linebreak(@crmid)}⇒</a>#{linebreak(@crafter)}'
|
823
|
+
add_latex_output '#{linebreak(@crbefore)}\pageref{#{@content}}#{linebreak(@crmid)}#{linebreak(@crafter)}'
|
824
|
+
#~ add_text_output '(#{@content}) #{@content}'
|
825
|
+
#~ add_wiki_output '#{linebreak(@crbefore)}[[??#{@content}]]#{@content}#{linebreak(@crafter)}'
|
826
|
+
end #pageref
|
827
|
+
=begin rdoc
|
828
|
+
Define Element :ref
|
829
|
+
|
830
|
+
Create an instance with
|
831
|
+
element( :ref, [ attributes, [content]] )
|
832
|
+
or
|
833
|
+
Ref.new( [ attributes, [content]] )
|
834
|
+
|
835
|
+
Attributes may be:
|
836
|
+
* HTML_ATTR_CORE
|
837
|
+
* HTML_ATTR_I18N
|
838
|
+
* HTML_ATTR_EVENTS
|
839
|
+
* ATTR_LANG
|
840
|
+
=end
|
841
|
+
class Ref < Element
|
842
|
+
add_attributes HTML_ATTR_CORE
|
843
|
+
add_attributes HTML_ATTR_I18N
|
844
|
+
add_attributes HTML_ATTR_EVENTS
|
845
|
+
add_html_output '#{linebreak(@crbefore)}<a name="#{@content}">#{linebreak(@crmid)}⇒</a>#{linebreak(@crafter)}'
|
846
|
+
add_latex_output '#{linebreak(@crbefore)}\ref{#{@content}}#{linebreak(@crmid)}#{linebreak(@crafter)}'
|
847
|
+
#~ add_text_output '(#{@content}) #{@content}'
|
848
|
+
#~ add_wiki_output '#{linebreak(@crbefore)}[[??#{@content}]]#{@content}#{linebreak(@crafter)}'
|
849
|
+
end #ref
|
850
|
+
|
804
851
|
=begin rdoc
|
805
852
|
Define Element :hypertarget
|
806
853
|
|
@@ -933,7 +980,7 @@ Attributes may be:
|
|
933
980
|
* :size:
|
934
981
|
=end
|
935
982
|
class Font < Element
|
936
|
-
add_attribute :size, Attribute.create([:html], [
|
983
|
+
add_attribute :size, Attribute.create([:html], [ Integer ])
|
937
984
|
add_html_tag 'font'
|
938
985
|
end #Font
|
939
986
|
|
@@ -1102,6 +1149,26 @@ Attributes are not defined for this element.
|
|
1102
1149
|
add_text_output '#{linebreak(@crbefore)}#{@content}#{linebreak(@crafter)}'
|
1103
1150
|
end #Emph
|
1104
1151
|
|
1152
|
+
=begin rdoc
|
1153
|
+
Define Element :textsc
|
1154
|
+
|
1155
|
+
Create an instance with
|
1156
|
+
element( :textsc, [ attributes, [content]] )
|
1157
|
+
or
|
1158
|
+
textsc.new( [ attributes, [content]] )
|
1159
|
+
Attributes are not defined for this element.
|
1160
|
+
=end
|
1161
|
+
class Textsc < Element
|
1162
|
+
add_id :textsc
|
1163
|
+
add_latex_output '#{linebreak(@crbefore)}\textsc{#{@content}}#{linebreak(@crafter)}'
|
1164
|
+
add_html_output '#{linebreak(@crbefore)}<span style="font-variant-caps: small-caps">#{@content}</span>#{linebreak(@crafter)}'
|
1165
|
+
add_wiki_output '#{linebreak(@crbefore)}'''#{@content}'''#{linebreak(@crafter)}'
|
1166
|
+
#The additional space is wanted (else ** may be a itemize-list)
|
1167
|
+
add_creole_output '#{linebreak(@crbefore)} **#{@content}**#{linebreak(@crafter)}'
|
1168
|
+
add_text_output '#{linebreak(@crbefore)}#{@content}#{linebreak(@crafter)}'
|
1169
|
+
end #textsc
|
1170
|
+
|
1171
|
+
|
1105
1172
|
=begin rdoc
|
1106
1173
|
Define Element :stroke
|
1107
1174
|
|
data/lib/docgenerator/index.rb
CHANGED
@@ -1,33 +1,35 @@
|
|
1
|
+
#encoding: utf-8
|
2
|
+
|
3
|
+
#
|
1
4
|
module Docgenerator
|
2
|
-
module Listings
|
3
|
-
LSTSETTINGS = {
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
#~
|
20
|
-
#~
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
}
|
5
|
+
module Listings
|
6
|
+
LSTSETTINGS = {
|
7
|
+
:language => Attribute.create( [ :texkeyval] ),
|
8
|
+
:style => Attribute.create( [ :texkeyval] ),
|
9
|
+
:basicstyle => Attribute.create( [ :texkeyval] ),
|
10
|
+
:emph => Attribute.create( [ :texkeyval] ),
|
11
|
+
:emphstyle => Attribute.create( [ :texkeyval] ),
|
12
|
+
:keywordstyle => Attribute.create( [ :texkeyval] ),
|
13
|
+
:commentstyle => Attribute.create( [ :texkeyval] ),
|
14
|
+
:breaklines => Attribute.create( [ :texkeyval], ['true', 'false'] ),
|
15
|
+
:mathescape => Attribute.create( [ :texkeyval], ['true', 'false'] ),
|
16
|
+
:prebreak => Attribute.create( [ :texkeyval] ),
|
17
|
+
:postbreak => Attribute.create( [ :texkeyval] ),
|
18
|
+
:tabsize => Attribute.create( [ :texkeyval], [ Integer ] ),
|
19
|
+
:firstline => Attribute.create( [ :texkeyval], [ Integer ] ),
|
20
|
+
:lastline => Attribute.create( [ :texkeyval], [ Integer ] ),
|
21
|
+
#~ showspaces=true,
|
22
|
+
#~ showtabs=true,
|
23
|
+
#~ tab=\rightarrowfill}
|
24
|
+
:numbers => Attribute.create( [ :texkeyval], [ 'none', 'left', 'right' ] ),
|
25
|
+
:numberstyle => Attribute.create( [ :texkeyval] ),
|
26
|
+
:firstnumber => Attribute.create( [ :texkeyval], [ Integer ] ),
|
27
|
+
:stepnumber => Attribute.create( [ :texkeyval], [ Integer ] ),
|
28
|
+
:numbersep => Attribute.create( [ :texkeyval], [ Integer ] ),
|
29
|
+
#
|
30
|
+
:morekeywords => Attribute.create( [ :texkeyval], [ String ] ),
|
31
|
+
:morecomment => Attribute.create( [ :texkeyval], [ String ] ),
|
32
|
+
}
|
31
33
|
|
32
34
|
|
33
35
|
=begin rdoc
|
@@ -39,9 +41,9 @@ or
|
|
39
41
|
Lstlistoflistings.new( [ attributes, [content]] )
|
40
42
|
Attributes are not defined for this element.
|
41
43
|
=end
|
42
|
-
class Lstlistoflistings < Element
|
43
|
-
|
44
|
-
end #Lstlistoflistings
|
44
|
+
class Lstlistoflistings < Element
|
45
|
+
has_no_content false
|
46
|
+
end #Lstlistoflistings
|
45
47
|
|
46
48
|
|
47
49
|
=begin rdoc
|
@@ -53,10 +55,10 @@ or
|
|
53
55
|
Lstloadlanguages.new( [ attributes, [content]] )
|
54
56
|
Attributes are not defined for this element.
|
55
57
|
=end
|
56
|
-
class Lstloadlanguages < Element
|
57
|
-
|
58
|
-
|
59
|
-
end #Lstloadlanguages
|
58
|
+
class Lstloadlanguages < Element
|
59
|
+
add_latex_output '#{linebreak(@crbefore)}\lstloadlanguages{#{@content}}#{linebreak(@crafter)}'
|
60
|
+
add_html_output ''
|
61
|
+
end #Lstloadlanguages
|
60
62
|
|
61
63
|
=begin rdoc
|
62
64
|
Define Element :lstset
|
@@ -68,12 +70,12 @@ or
|
|
68
70
|
Attributes may be:
|
69
71
|
* LSTSETTINGS
|
70
72
|
=end
|
71
|
-
class Lstset < Element
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
end #Lstset
|
73
|
+
class Lstset < Element
|
74
|
+
has_no_content false
|
75
|
+
add_attributes LSTSETTINGS
|
76
|
+
add_latex_output '#{linebreak(@crbefore)}\lstset{#{texkeyval()}}#{linebreak(@crafter)}'
|
77
|
+
add_html_output ''
|
78
|
+
end #Lstset
|
77
79
|
|
78
80
|
=begin rdoc
|
79
81
|
Define Element :lstdefinestyle
|
@@ -85,10 +87,10 @@ or
|
|
85
87
|
Attributes may be:
|
86
88
|
* LSTSETTINGS
|
87
89
|
=end
|
88
|
-
class Lstdefinestyle < Element
|
89
|
-
|
90
|
-
|
91
|
-
end #Lstdefinestyle
|
90
|
+
class Lstdefinestyle < Element
|
91
|
+
add_attributes LSTSETTINGS
|
92
|
+
add_latex_output '#{linebreak(@crbefore)}\lstdefinestyle{#{@content}}{#{texkeyval()}}#{linebreak(@crafter)}'
|
93
|
+
end #Lstdefinestyle
|
92
94
|
=begin rdoc
|
93
95
|
Define Element :lstinputlisting
|
94
96
|
|
@@ -99,18 +101,16 @@ or
|
|
99
101
|
Attributes may be:
|
100
102
|
*
|
101
103
|
=end
|
102
|
-
class Lstinputlisting < Element
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
end #Lstinputlisting
|
112
|
-
|
113
|
-
#~ lstlisting
|
104
|
+
class Lstinputlisting < Element
|
105
|
+
add_attributes LSTSETTINGS
|
106
|
+
add_attributes HTML_ATTR_CORE
|
107
|
+
add_attributes HTML_ATTR_I18N
|
108
|
+
add_attributes HTML_ATTR_EVENTS
|
109
|
+
add_attribute :lang, ATTR_LANG
|
110
|
+
add_attribute :caption, Attribute.create( [ :texkeyval], nil, 1 )
|
111
|
+
add_html_tag 'pre'
|
112
|
+
add_latex_output '#{linebreak(@crbefore)}\lstinputlisting[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}'
|
113
|
+
end #Lstinputlisting
|
114
114
|
|
115
115
|
=begin rdoc
|
116
116
|
Define Element :lstinline
|
@@ -121,30 +121,30 @@ or
|
|
121
121
|
Lstinline.new( [ attributes, [content]] )
|
122
122
|
Attributes are not defined for this element.
|
123
123
|
=end
|
124
|
-
class Lstinline < Element
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
end
|
124
|
+
class Lstinline < Element
|
125
|
+
add_attributes HTML_ATTR_ALL
|
126
|
+
add_attributes LSTSETTINGS
|
127
|
+
add_attribute :caption, Attribute.create( [ :latex ], nil, 1 )
|
128
|
+
add_html_tag 'pre'
|
129
|
+
#Redefine standard output.
|
130
|
+
#Options are given, if an option is avalaible.
|
131
|
+
def to_latex( options={} )
|
132
|
+
o = set_option_defaults(options)
|
133
|
+
if ! @content.include?( '!' ); sep = '!'
|
134
|
+
elsif ! @content.include?( '?' ); sep = '?'
|
135
|
+
else
|
136
|
+
o[:log].warn("lstinline: found no sep. for #{content}") if o[:log].warn?
|
137
|
+
end
|
138
|
+
cmd = linebreak(@crbefore)
|
139
|
+
cmd << '\lstinline'
|
140
|
+
cmd << "[#{texkeyval()}]"
|
141
|
+
cmd << sep
|
142
|
+
cmd << "#{@content.to_latex( options)}"
|
143
|
+
cmd << sep
|
144
|
+
cmd << linebreak(@crafter)
|
145
|
+
return cmd
|
146
|
+
end
|
147
|
+
end
|
148
148
|
|
149
149
|
=begin rdoc
|
150
150
|
Define Environment :lstlisting
|
@@ -155,23 +155,23 @@ or
|
|
155
155
|
Lstlisting.new( [ attributes, [content]] )
|
156
156
|
Attributes are not defined for this element.
|
157
157
|
=end
|
158
|
-
class Lstlisting < Environments::Environment
|
159
|
-
|
160
|
-
|
161
|
-
|
158
|
+
class Lstlisting < Environments::Environment
|
159
|
+
add_attributes HTML_ATTR_ALL
|
160
|
+
add_attributes LSTSETTINGS
|
161
|
+
add_attribute :options, Attribute.create( [ :texkeyval], nil, 1 )
|
162
162
|
|
163
|
-
|
163
|
+
add_html_tag 'pre'
|
164
164
|
=begin rdoc
|
165
165
|
Redefine standard output.
|
166
166
|
Options are given, if an option is avalaible.
|
167
167
|
=end
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
end
|
174
|
-
end #module Listings
|
168
|
+
def to_latex( options={} )
|
169
|
+
option = "[#{texkeyval()}]"
|
170
|
+
option = nil if option == '[]'
|
171
|
+
return to_latex_environment( 'lstlisting', option, options )
|
172
|
+
end
|
173
|
+
end
|
174
|
+
end #module Listings
|
175
175
|
end #module Docgenerator
|
176
176
|
__END__
|
177
177
|
doc.head << element(:usepackage,{ }, 'listings').cr
|