docgenerator 2.1.1 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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
|
@@ -32,10 +32,10 @@ class Todo < Element
|
|
|
32
32
|
:linecolor => Attribute.create( [ :texkeyval], [ String ] ),
|
|
33
33
|
:bordercolor => Attribute.create( [ :texkeyval], [ String ] ),
|
|
34
34
|
:inline => Attribute.create( [ :texkeyval], [ true, false ] ),
|
|
35
|
+
:line => Attribute.create( [ :texkeyval], [ true, false ] ),
|
|
36
|
+
:noline => Attribute.create( [ :texkeyval], [ true, false ] ),
|
|
35
37
|
=begin
|
|
36
38
|
more options:
|
|
37
|
-
line / noline
|
|
38
|
-
inline / noinline
|
|
39
39
|
size
|
|
40
40
|
list / nolist When the option nolist is given, the todo item will not appear in the list of todos.
|
|
41
41
|
caption For listoftodos
|
|
@@ -76,10 +76,11 @@ Is redefined by set_wikilevel( level )
|
|
|
76
76
|
|
|
77
77
|
#Small helper to make TeX-Hyperlinks like in HTML (attribute id)
|
|
78
78
|
def hypertarget(id)
|
|
79
|
-
return "\\hypertarget{#{id}}{}" if id.is_a?(String)
|
|
79
|
+
#~ return "\\hypertarget{#{id}}{}" if id.is_a?(String)
|
|
80
80
|
#~ return '' if ! id.content or id.content.to_s =~/\A\s*\Z/
|
|
81
81
|
return '' if ! id.content or id.content.join =~/\A\s*\Z/ #Ruby 1.9
|
|
82
|
-
return "\\hypertarget{#{id}}{}"
|
|
82
|
+
#~ return "\\hypertarget{#{id}}{}"
|
|
83
|
+
return "\\hypertarget{#{id}}{}\\label{#{id}}"
|
|
83
84
|
end
|
|
84
85
|
=begin rdoc
|
|
85
86
|
Determine the TeX-Makroname from class name
|
|
@@ -244,7 +245,28 @@ Attributes see class DummySectioning.
|
|
|
244
245
|
add_html_tag 'h6'
|
|
245
246
|
end #H6
|
|
246
247
|
|
|
248
|
+
=begin rdoc
|
|
249
|
+
Define Element :addpart
|
|
250
|
+
|
|
251
|
+
\\addpart is a command provided by koma-script.
|
|
247
252
|
|
|
253
|
+
Create an instance with
|
|
254
|
+
element( :addpart, [ attributes, [content]] )
|
|
255
|
+
or
|
|
256
|
+
addpart.new( [ attributes, [content]] )
|
|
257
|
+
|
|
258
|
+
Attributes may be:
|
|
259
|
+
* HTML_ATTR_ALL
|
|
260
|
+
=end
|
|
261
|
+
class Addpart < Element
|
|
262
|
+
add_attributes HTML_ATTR_CORE
|
|
263
|
+
add_attributes HTML_ATTR_I18N
|
|
264
|
+
add_attributes HTML_ATTR_EVENTS
|
|
265
|
+
add_attribute :lang, ATTR_LANG
|
|
266
|
+
add_html_tag 'h2'
|
|
267
|
+
add_latex_output '#{linebreak(@crbefore)}' + '\addpart{#{@content}}' + '#{linebreak(@crafter)}'
|
|
268
|
+
end #addpart
|
|
269
|
+
|
|
248
270
|
=begin rdoc
|
|
249
271
|
Define Element :addsec
|
|
250
272
|
|
data/lib/docgenerator/tabular.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
=begin rdoc
|
|
3
3
|
Definition of tabular elements for docgenerator-gem.
|
|
4
4
|
=end
|
|
5
|
-
|
|
6
5
|
#
|
|
7
6
|
module Docgenerator
|
|
8
7
|
=begin rdoc
|
|
@@ -12,6 +11,7 @@ Definition of tabular elements for docgenerator-gem.
|
|
|
12
11
|
#Define some constants to include packages into document header.
|
|
13
12
|
TEX_PACKAGE_TABULARX = element(:usepackage,{},'tabularx').cr
|
|
14
13
|
TEX_PACKAGE_LONGTABLE= element(:usepackage,{},'longtable').cr
|
|
14
|
+
TEX_PACKAGE_LTXTABLE= element(:usepackage,{},'ltxtable').cr #Longtable and tabularx merge
|
|
15
15
|
TEX_PACKAGE_BOOKTABS = element(:usepackage,{},'booktabs').cr
|
|
16
16
|
|
|
17
17
|
=begin rdoc
|
|
@@ -37,7 +37,7 @@ fixme: check on attributes. columnsdescription
|
|
|
37
37
|
add_attributes HTML_ATTR_ALL
|
|
38
38
|
#Problem: Nicht weitervererbt
|
|
39
39
|
add_attribute :columndescription , Attribute.create( [:latex, :required ] )
|
|
40
|
-
add_attribute :columns , Attribute.create( [:required], [
|
|
40
|
+
add_attribute :columns , Attribute.create( [:required], [ Integer ] )
|
|
41
41
|
add_attribute :border , Attribute.create( [:html] )
|
|
42
42
|
add_attribute :bgcolor , Attribute.create( [ :html ] )
|
|
43
43
|
add_attribute :width , Attribute.create( [ :html ], [ Integer, String ] ) #String necessary for percentage
|
|
@@ -113,10 +113,12 @@ Output a complete tabular in wikimedia-like tabular extension for creole.
|
|
|
113
113
|
end #class Tabular
|
|
114
114
|
|
|
115
115
|
=begin rdoc
|
|
116
|
-
Use longtable-package.
|
|
116
|
+
Use longtable-package: http://ctan.org/pkg/longtable
|
|
117
117
|
|
|
118
118
|
Requires
|
|
119
119
|
doc.head << element(:usepackage,{},'longtable')
|
|
120
|
+
or
|
|
121
|
+
doc.head << Docgenerator::Tables::TEX_PACKAGE_LONGTABLE
|
|
120
122
|
|
|
121
123
|
=end
|
|
122
124
|
class Longtable < Tabular
|
|
@@ -141,10 +143,12 @@ Requires
|
|
|
141
143
|
end
|
|
142
144
|
end #class Longtable
|
|
143
145
|
=begin rdoc
|
|
144
|
-
Use Tabularx-package.
|
|
146
|
+
Use Tabularx-package: http://ctan.org/pkg/tabularx
|
|
145
147
|
|
|
146
148
|
Requires
|
|
147
|
-
doc.head << element(:usepackage,{},'
|
|
149
|
+
doc.head << element(:usepackage,{},'tabularx')
|
|
150
|
+
or
|
|
151
|
+
doc.head << Docgenerator::Tables::TEX_PACKAGE_TABULARX
|
|
148
152
|
|
|
149
153
|
fixme :width is obligatory
|
|
150
154
|
=end
|
|
@@ -161,9 +165,9 @@ fixme :width is obligatory
|
|
|
161
165
|
cmd = ''
|
|
162
166
|
cmd << "\n" if @crbefore
|
|
163
167
|
cmd << "\\begin{tabularx}{"
|
|
164
|
-
cmd << @attr[:width].content.
|
|
168
|
+
cmd << @attr[:width].content.join
|
|
165
169
|
cmd << "}{"
|
|
166
|
-
cmd << @attr[:columndescription].content.
|
|
170
|
+
cmd << @attr[:columndescription].content.join
|
|
167
171
|
cmd << "}"
|
|
168
172
|
cmd << "\n" if @crmid
|
|
169
173
|
cmd << @content.to_doc(:latex, o )
|
|
@@ -172,6 +176,40 @@ fixme :width is obligatory
|
|
|
172
176
|
return cmd
|
|
173
177
|
end
|
|
174
178
|
end #class Tabularx
|
|
179
|
+
|
|
180
|
+
=begin rdoc
|
|
181
|
+
Use ltxtable-package (Longtable and tabularx merge):
|
|
182
|
+
http://ctan.org/pkg/ltxtable
|
|
183
|
+
|
|
184
|
+
Requires
|
|
185
|
+
doc.head << element(:usepackage,{},'ltxtable')
|
|
186
|
+
or
|
|
187
|
+
doc.head << Docgenerator::Tables::TEX_PACKAGE_LTXTABLE
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
=end
|
|
191
|
+
class Ltxtable < Tabular
|
|
192
|
+
add_attributes Tabular.get_attribute_list( )
|
|
193
|
+
#Position of the ltxtable in paragraph
|
|
194
|
+
add_attribute :texalignment, Attribute.create( [:latex], %w{l c r} )
|
|
195
|
+
def to_latex(options={})
|
|
196
|
+
o = set_option_defaults(options)
|
|
197
|
+
o[:log].debug("enter to_latex for ltxtable") if o[:log].debug?
|
|
198
|
+
cmd = ''
|
|
199
|
+
cmd << "\n" if @crbefore
|
|
200
|
+
cmd << "\\begin{ltxtable}"
|
|
201
|
+
cmd << "[%s]" % @attr[:texalignment].content.first if @attr[:texalignment]
|
|
202
|
+
cmd << "{"
|
|
203
|
+
cmd << @attr[:columndescription].content.to_doc(:latex, o)
|
|
204
|
+
cmd << "}"
|
|
205
|
+
cmd << "\n" if @crmid
|
|
206
|
+
cmd << @content.to_latex(o)
|
|
207
|
+
cmd << "\\end{ltxtable}"
|
|
208
|
+
cmd << "\n" if @crafter
|
|
209
|
+
return cmd
|
|
210
|
+
end
|
|
211
|
+
end #class ltxtable
|
|
212
|
+
|
|
175
213
|
=begin rdoc
|
|
176
214
|
May only be used inside a tabular. Tabular must set the columns-value.
|
|
177
215
|
|
|
@@ -462,9 +500,7 @@ Attributes are not defined for this element.
|
|
|
462
500
|
end #Endlastfoot
|
|
463
501
|
|
|
464
502
|
=begin rdoc
|
|
465
|
-
A column in a tabular.
|
|
466
|
-
|
|
467
|
-
|
|
503
|
+
A column/cell in a tabular.
|
|
468
504
|
=end
|
|
469
505
|
class Column < Element
|
|
470
506
|
has_no_content :empty_ok
|
|
@@ -490,7 +526,9 @@ A column in a tabular.
|
|
|
490
526
|
"#{@content.to_latex(o)}"
|
|
491
527
|
end
|
|
492
528
|
cmd << "\n" if @crafter
|
|
493
|
-
|
|
529
|
+
#The sub.command is needed to avoid problems like [xx] after a \\
|
|
530
|
+
#Details see https://de.wikibooks.org/wiki/LaTeX-W%C3%B6rterbuch:_TeX_Primitiven:_%5Crelax
|
|
531
|
+
return cmd.sub(/\A\[/, '\relax [')
|
|
494
532
|
end
|
|
495
533
|
def content?; :empty_ok; end
|
|
496
534
|
def htmltag()
|
|
@@ -552,10 +590,10 @@ Multicolumn
|
|
|
552
590
|
|
|
553
591
|
#~ add_attributes( HTML_ATTR_ALL )
|
|
554
592
|
add_attributes( {
|
|
555
|
-
#~ :columns => Attribute.create( [:required], [
|
|
556
|
-
:colspan => Attribute.create( [:required, :html, :latex], [
|
|
593
|
+
#~ :columns => Attribute.create( [:required], [ Integer ] ) , #colspan
|
|
594
|
+
:colspan => Attribute.create( [:required, :html, :latex], [ Integer ], 2 ) ,
|
|
557
595
|
:columns => :colspan,
|
|
558
|
-
:rowspan => Attribute.create( [:html ], [
|
|
596
|
+
:rowspan => Attribute.create( [:html ], [ Integer ], 2 ),
|
|
559
597
|
:pos => Attribute.create( [:latex] ) ,
|
|
560
598
|
:align => HTML_ATTR_ALIGN,
|
|
561
599
|
:width => Attribute.create( [ :html ] ),
|
|
@@ -588,10 +626,16 @@ Multicolumn
|
|
|
588
626
|
return "<Class Multicolumn @content=#{@content.inspect}>"
|
|
589
627
|
end
|
|
590
628
|
end
|
|
629
|
+
=begin rdoc
|
|
630
|
+
Define a caption.
|
|
591
631
|
|
|
632
|
+
If the option longtable is set, then a \\ is added
|
|
633
|
+
(needed if a \caption is set inside a longtable-environment)
|
|
634
|
+
=end
|
|
592
635
|
class Caption < Element
|
|
593
636
|
#
|
|
594
637
|
add_attribute :optional, Attribute.create( [ :latex ] )
|
|
638
|
+
add_attribute :longtable, Attribute.create( [ :latex] )
|
|
595
639
|
|
|
596
640
|
def to_latex(options= {})
|
|
597
641
|
cmd = ''
|
|
@@ -606,6 +650,7 @@ Multicolumn
|
|
|
606
650
|
cmd << "{"
|
|
607
651
|
cmd << @content.to_latex(options)
|
|
608
652
|
cmd << "}"
|
|
653
|
+
cmd << '\\\\' if @attr[:longtable].content != []
|
|
609
654
|
cmd << "\n" if @crafter
|
|
610
655
|
return cmd
|
|
611
656
|
end
|
|
@@ -170,6 +170,34 @@
|
|
|
170
170
|
\end{document}
|
|
171
171
|
% ----------------------------------------------------------------
|
|
172
172
|
|
|
173
|
+
:report_utf8:
|
|
174
|
+
:target: :latex
|
|
175
|
+
:encoding: utf-8
|
|
176
|
+
:source: |
|
|
177
|
+
<<prefix>>
|
|
178
|
+
\documentclass[<<classoptions>>]{scrreprt}
|
|
179
|
+
\usepackage{babel}
|
|
180
|
+
%Encoding-package depends on TeX-engine
|
|
181
|
+
\usepackage{ifpdf,ifxetex,ifluatex}
|
|
182
|
+
\ifxetex
|
|
183
|
+
\usepackage{fontspec} %Without, umlauts are missing
|
|
184
|
+
\fi
|
|
185
|
+
\ifluatex
|
|
186
|
+
\usepackage[utf8]{luainputenc} %Or in first line: % !Mode:: "TeX:UTF-8".
|
|
187
|
+
\else
|
|
188
|
+
\ifpdf\relax
|
|
189
|
+
\usepackage[utf8]{inputenc}
|
|
190
|
+
\fi
|
|
191
|
+
\fi
|
|
192
|
+
\usepackage{hyperref}
|
|
193
|
+
% ----------------------------------------------------------------
|
|
194
|
+
<<head>>
|
|
195
|
+
% ----------------------------------------------------------------
|
|
196
|
+
\begin{document}
|
|
197
|
+
<<body>>
|
|
198
|
+
\end{document}
|
|
199
|
+
% ----------------------------------------------------------------
|
|
200
|
+
|
|
173
201
|
:standalone:
|
|
174
202
|
:target: :latex
|
|
175
203
|
:encoding: utf-8
|
|
@@ -189,7 +217,8 @@
|
|
|
189
217
|
\usepackage[utf8]{inputenc}
|
|
190
218
|
\fi
|
|
191
219
|
\fi
|
|
192
|
-
|
|
220
|
+
\usepackage{luatex85} %%Needed since TeXLive 2016
|
|
221
|
+
\usepackage{hyperref}
|
|
193
222
|
% ----------------------------------------------------------------
|
|
194
223
|
<<head>>
|
|
195
224
|
% ----------------------------------------------------------------
|
data/lib/docgenerator/version.rb
CHANGED
|
@@ -137,10 +137,22 @@
|
|
|
137
137
|
* Packages:
|
|
138
138
|
* Docgenerator::Packages::PDFPages
|
|
139
139
|
New: Docgenerator::Packages::PDFPages::IncludePDFmerge
|
|
140
|
+
|
|
141
|
+
==2.1.2
|
|
142
|
+
* Replace test-unit by minitest.
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
==3.0.0 2018-03-25
|
|
146
|
+
* Remove Docgenerator::Creole
|
|
147
|
+
Use the docgenerator-creole.gem instead
|
|
148
|
+
* Default-template for LaTeX is :article_utf8
|
|
149
|
+
* standalone-template: include lualatex85
|
|
150
|
+
* Switch Fixnum -> Integer (ruby 2.4)
|
|
151
|
+
pdfpages: add option 'options'
|
|
140
152
|
=end
|
|
141
153
|
|
|
142
154
|
#
|
|
143
155
|
module Docgenerator
|
|
144
156
|
#Define Version number.
|
|
145
|
-
VERSION = '
|
|
157
|
+
VERSION = '3.0.0'
|
|
146
158
|
end
|
|
@@ -9,7 +9,9 @@ require 'rake'
|
|
|
9
9
|
Load all Docgenerator parts
|
|
10
10
|
=end
|
|
11
11
|
$:.unshift('../lib')
|
|
12
|
+
$:.unshift('../../docgenerator-creole/lib')
|
|
12
13
|
require 'docgenerator'
|
|
14
|
+
require 'docgenerator-creole'
|
|
13
15
|
module Docgenerator
|
|
14
16
|
=begin rdoc
|
|
15
17
|
Extend Element to get ids.
|
|
@@ -47,16 +49,6 @@ require 'docgenerator/packages/struktex.rb'
|
|
|
47
49
|
require 'docgenerator/packages/todonotes.rb'
|
|
48
50
|
require 'docgenerator/packages/url.rb'
|
|
49
51
|
|
|
50
|
-
##does not influence this
|
|
51
|
-
require 'creole/creole2doc.rb'
|
|
52
|
-
require 'creole/plugins/rail.rb'
|
|
53
|
-
require 'creole/plugins/rubycode4creole.rb'
|
|
54
|
-
require 'creole/plugins/struktex.rb'
|
|
55
|
-
require 'creole/plugins/todonotes.rb'
|
|
56
|
-
|
|
57
|
-
require 'wiki2doc/wiki2docgenerator.rb'
|
|
58
|
-
require 'wiki2doc/plugins/rubycode4wiki.rb'
|
|
59
|
-
require 'wiki2doc/plugins/struktex.rb'
|
|
60
52
|
|
|
61
53
|
=begin rdoc
|
|
62
54
|
List all known elements
|
|
@@ -112,6 +104,7 @@ Docgenerator::Element::SOURCE.each{|sourcefile, elementlist|
|
|
|
112
104
|
'environments.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Environments::/},
|
|
113
105
|
'lists.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Lists::/},
|
|
114
106
|
'footnote.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Footnote/}, #no own module
|
|
107
|
+
'images.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Img/}, #no own module
|
|
115
108
|
'sectioning.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Sectioning::/} - [ ],
|
|
116
109
|
'tables.rb' => Docgenerator::Element.each.select{|cl| cl.name =~ /::Tables::/},
|
|
117
110
|
#~ #If not already read by others
|
|
@@ -20,7 +20,6 @@ xx
|
|
|
20
20
|
Prepare a documentation, based on execution and meta-analyse.
|
|
21
21
|
=end
|
|
22
22
|
def mk_element_doc(elementlist, filename )
|
|
23
|
-
|
|
24
23
|
rd_code = [
|
|
25
24
|
DOCHEADER,
|
|
26
25
|
list_of_elements = [],
|
|
@@ -302,6 +301,7 @@ class Docgenerator::Element
|
|
|
302
301
|
#Helper to have access to all ids.
|
|
303
302
|
def self.ids; @@ids;end
|
|
304
303
|
end
|
|
304
|
+
|
|
305
305
|
file 'manpages/elementlist.rb' => :force do |tsk|
|
|
306
306
|
File.open(tsk.name, 'w:utf-8'){|f|
|
|
307
307
|
f << <<rdoc
|
|
@@ -349,12 +349,14 @@ end
|
|
|
349
349
|
#~ task :local_default => 'manpages/elements.rb'
|
|
350
350
|
#~ task 'manpages/characters.rb' => :force
|
|
351
351
|
#~ task :local_default => 'manpages/characters.rb'
|
|
352
|
+
#~ file 'manpages/images.rb' => :force
|
|
353
|
+
#~ task :local_default => 'manpages/images.rb'
|
|
352
354
|
|
|
353
355
|
#~ task :local_default => 'manpages/elementlist.rb'
|
|
354
356
|
#~ task :local_default => :test
|
|
355
357
|
#~ task :local_default => :clean
|
|
356
358
|
#~ task :local_default => :all_man_files
|
|
357
|
-
task :local_default => :rdoc_manpages
|
|
359
|
+
#~ task :local_default => :rdoc_manpages
|
|
358
360
|
|
|
359
361
|
if $0 == __FILE__
|
|
360
362
|
app = Rake.application
|
|
@@ -7,7 +7,7 @@ Generates:
|
|
|
7
7
|
* create an element
|
|
8
8
|
* make a test output and create unit tests for the elemnt.
|
|
9
9
|
|
|
10
|
-
The
|
|
10
|
+
The result of this process is not a test for correctness,
|
|
11
11
|
but a test of "state of the art".
|
|
12
12
|
|
|
13
13
|
Effects of changes may be checked wih the result of this test.
|
|
@@ -31,11 +31,13 @@ Test generated by #{__FILE__} #{Date.today}
|
|
|
31
31
|
This is not a 'real' test unit.
|
|
32
32
|
The tests are created with #{__FILE__}:
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Each Docgenerator::Element is taken and a test is generated.
|
|
35
|
+
The assertions reflect the actual behaviour,
|
|
36
|
+
it must not be the wanted or expected result.
|
|
35
37
|
=end
|
|
36
38
|
|
|
37
|
-
gem '
|
|
38
|
-
require '
|
|
39
|
+
gem 'minitest'
|
|
40
|
+
require 'minitest/autorun'
|
|
39
41
|
|
|
40
42
|
if $0 == __FILE__
|
|
41
43
|
#Add lib, two insertions, depending on target directory level
|
|
@@ -102,23 +104,23 @@ def mk_element_testcase(cl)
|
|
|
102
104
|
loglevel = Log4r::DEBUG
|
|
103
105
|
end
|
|
104
106
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
107
|
+
log = Log4r::Logger.new(cl.element_ids.first.to_s, loglevel)
|
|
108
|
+
log.outputters = logoutputter = ArrayOutputter.new('xx')
|
|
109
|
+
el = cl.new(:log => log )
|
|
108
110
|
|
|
109
111
|
testcode << <<code
|
|
110
112
|
=begin rdoc
|
|
111
113
|
Test #{cl.name}.
|
|
112
114
|
=end
|
|
113
|
-
class #{testclass} < Test
|
|
115
|
+
class #{testclass} < MiniTest::Test
|
|
114
116
|
def self.startup()
|
|
115
117
|
@@log = Log4r::Logger.new('#{cl.element_ids.first.to_s}', Log4r::#{Log4r::LNAMES[loglevel]})
|
|
116
118
|
@@log.outputters = @@logoutputter = ArrayOutputter.new('xx')
|
|
117
119
|
@@el = #{cl.name}.new(:log => @@log)
|
|
118
120
|
code
|
|
119
|
-
|
|
121
|
+
el.attr.sort_by{|k,a| a.sortkey}.each{|k,a|
|
|
120
122
|
#this may give an error, if the attribute has wrong type/layout...
|
|
121
|
-
|
|
123
|
+
el[k] << "Attr_#{k}" if a.required?
|
|
122
124
|
testcode << "%s @@el[%-10s] << %-20s #%s attribute" % [
|
|
123
125
|
a.required? ? ' ' : '#~',#only as template for optional values
|
|
124
126
|
k.inspect,
|
|
@@ -127,8 +129,8 @@ code
|
|
|
127
129
|
]
|
|
128
130
|
}
|
|
129
131
|
|
|
130
|
-
if
|
|
131
|
-
|
|
132
|
+
if el.content?
|
|
133
|
+
el << 'content'
|
|
132
134
|
testcode<< " #fill content"
|
|
133
135
|
testcode<< " @@el << 'content'"
|
|
134
136
|
else
|
|
@@ -138,28 +140,29 @@ code
|
|
|
138
140
|
testcode<< " #Store log messages"
|
|
139
141
|
testcode<< " @@messages = @@logoutputter.flush"
|
|
140
142
|
#test log-content
|
|
141
|
-
|
|
143
|
+
messages = log.outputters.first.flush
|
|
142
144
|
testname = "test_element_#{cl.name.downcase.gsub(/::/, '_')}_log"
|
|
143
145
|
|
|
144
146
|
testcode<< <<code
|
|
145
147
|
end #self.startup()
|
|
148
|
+
startup #minitest does not support self.startup. so we call it here.
|
|
146
149
|
=begin rdoc
|
|
147
150
|
Check messages from logger.
|
|
148
151
|
This may include warnings for wrong content format...
|
|
149
152
|
|
|
150
153
|
The following messages are expected:
|
|
151
|
-
#{
|
|
154
|
+
#{messages.to_yaml}
|
|
152
155
|
=end
|
|
153
156
|
def #{testname}
|
|
154
157
|
assert_equal(
|
|
155
|
-
#{
|
|
158
|
+
#{messages.inspect},
|
|
156
159
|
@@messages
|
|
157
160
|
)
|
|
158
161
|
end ##{testname}
|
|
159
162
|
code
|
|
160
163
|
%w{latex html context text wiki creole}.each{|target|
|
|
161
164
|
testname = "test_element_#{cl.name.downcase.gsub(/::/, '_')}_#{target}"
|
|
162
|
-
result =
|
|
165
|
+
result = el.send("to_#{target}".to_sym, :log => log)
|
|
163
166
|
|
|
164
167
|
#~ The target #{target} is #{@@el.send("#{target}?".to_sym) ? '' : 'not' } supported for #{cl.name}
|
|
165
168
|
testcode<< <<code
|
|
@@ -187,7 +190,7 @@ Problem: %{inhalt} macht Probleme bei Strings mit { und }
|
|
|
187
190
|
testcode<< " @@el.to_#{target}( :log => @@log).encode('utf-8')"
|
|
188
191
|
testcode<< " )"
|
|
189
192
|
|
|
190
|
-
messages =
|
|
193
|
+
messages = logoutputter.flush
|
|
191
194
|
if messages.empty?
|
|
192
195
|
testcode<< " assert_equal([],@@logoutputter.flush, 'No messages expected')"
|
|
193
196
|
else
|
|
@@ -254,6 +257,7 @@ end
|
|
|
254
257
|
#~ file 'unittest/unittest_sectioning.rb' => :force
|
|
255
258
|
#~ file 'unittest/unittest_tables.rb' => :force
|
|
256
259
|
#~ file 'unittest/unittest_elements.rb' => :force
|
|
260
|
+
#~ file 'unittest/unittest_images.rb' => :force
|
|
257
261
|
#~ file 'unittest/unittest_others.rb' => :force
|
|
258
262
|
|
|
259
263
|
task :local_default => :create_test_files
|