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
data/lib/creole/plugins/rail.rb
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
#encoding: utf-8
|
|
2
|
-
=begin rdoc
|
|
3
|
-
Support for the rail package.
|
|
4
|
-
|
|
5
|
-
This is support for LaTeX-style rail.
|
|
6
|
-
Don't be confused with ruby on rails - there is no intersection of the two packages.
|
|
7
|
-
=end
|
|
8
|
-
|
|
9
|
-
require 'creole/creole2doc'
|
|
10
|
-
|
|
11
|
-
module Docgenerator
|
|
12
|
-
module Creole
|
|
13
|
-
=begin rdoc
|
|
14
|
-
Support for the rail package.
|
|
15
|
-
|
|
16
|
-
This is support for LaTeX-style rail.
|
|
17
|
-
|
|
18
|
-
* http://www.ctan.org/tex-archive/support/rail/
|
|
19
|
-
=end
|
|
20
|
-
module Rail
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
#A Wrapper for the Creole-placeholder for Rail-diagramms.
|
|
24
|
-
#
|
|
25
|
-
class Diagramm4Creole < Placeholder
|
|
26
|
-
set_placeholder_key 'rail'
|
|
27
|
-
|
|
28
|
-
def initialize( wiki, name = 'Raildiagramm')
|
|
29
|
-
super
|
|
30
|
-
@name = name
|
|
31
|
-
raise ParameterError, "Missing id for rail-diagramm" unless @name
|
|
32
|
-
raise ParameterError, "Id for rail-diagramm contains no-letter" unless @name =~ /\A\w+\Z/
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
#fixme
|
|
36
|
-
#Check if the rail-diagramm is available as a picture.
|
|
37
|
-
#~ @filename = "#{@key}.png"
|
|
38
|
-
#~ if ! File.exist?( @filename )
|
|
39
|
-
#~ @filename = nil
|
|
40
|
-
#~ end
|
|
41
|
-
|
|
42
|
-
=begin rdoc
|
|
43
|
-
Return content only for LaTeX
|
|
44
|
-
=end
|
|
45
|
-
def to_doc( target, options = {})
|
|
46
|
-
#fixme: Einmalig beim initialisieren
|
|
47
|
-
#fixme: Varianten erledigen
|
|
48
|
-
#fixme: Bild falls verfügbar
|
|
49
|
-
#fixme: nur TeX (oder Bild)
|
|
50
|
-
#fixme logs
|
|
51
|
-
#~ case options[:elementtype]
|
|
52
|
-
#~ when nil #ignore diagramm
|
|
53
|
-
#~ when :minipage
|
|
54
|
-
#~ return to_element_minipage()
|
|
55
|
-
#~ when :figure
|
|
56
|
-
#~ return to_element_figure()
|
|
57
|
-
#~ when :figure_img
|
|
58
|
-
#~ return to_element_figure_img()
|
|
59
|
-
#~ when :latexonly
|
|
60
|
-
#~ return element(:latexonly,{}, self.to_latex_rail ).cr
|
|
61
|
-
#~ else
|
|
62
|
-
#~ option[:log].error("Raildiagramm#to_element: Undefined type #{@@elementtype}") if option[:log].error?
|
|
63
|
-
#~ end
|
|
64
|
-
|
|
65
|
-
#fixme Bild?
|
|
66
|
-
Rail_diagramm.new( @name, @source ).to_doc( target, options )
|
|
67
|
-
end
|
|
68
|
-
#Check for picture and return a :img-macro (Only html)
|
|
69
|
-
def to_img()
|
|
70
|
-
return element( :img, { :src => @filename }) if @filename
|
|
71
|
-
end
|
|
72
|
-
#~ def to_element_figure()
|
|
73
|
-
#~ figure = element(:figure).cr
|
|
74
|
-
#~ figure << self.to_s
|
|
75
|
-
#~ figure << element(:caption,{}, "Rail-Diagramm #{@key}" ).Cr
|
|
76
|
-
#~ return figure
|
|
77
|
-
#~ end
|
|
78
|
-
#~ def to_element_figure_img()
|
|
79
|
-
#~ if @filename
|
|
80
|
-
#~ figure = element(:figure, { :style => CSS.new(
|
|
81
|
-
#~ :text_align => 'center',
|
|
82
|
-
#~ :float => 'right'
|
|
83
|
-
#~ )}).cr
|
|
84
|
-
#~ figure << self.to_img
|
|
85
|
-
#~ figure << element(:br).cr
|
|
86
|
-
#~ figure << element(:caption,{}, "Rail-Diagramm #{@key}" ).Cr
|
|
87
|
-
#~ else
|
|
88
|
-
#~ figure = nil
|
|
89
|
-
#~ end
|
|
90
|
-
#~ return figure
|
|
91
|
-
#~ end
|
|
92
|
-
#~ #Requires caption.sty
|
|
93
|
-
#~ # doc.head << element(:usepackage,{}, 'caption')
|
|
94
|
-
#~ def to_element_minipage()
|
|
95
|
-
#~ figure = element(:minipage, {:width => '\textwidth'} ).CR
|
|
96
|
-
#~ figure << element(:centering)
|
|
97
|
-
#~ figure << self.to_s
|
|
98
|
-
#~ figure << element(:captionof,{ :float_type => 'figure' }, "Rail-Diagramm #{@key}" ).Cr
|
|
99
|
-
#~ return figure
|
|
100
|
-
#~ end
|
|
101
|
-
end #Rail_diagramm4Creole
|
|
102
|
-
|
|
103
|
-
#
|
|
104
|
-
#A Rail-diagramm
|
|
105
|
-
#
|
|
106
|
-
class Rail_diagramm
|
|
107
|
-
|
|
108
|
-
#Can be used in document header to load rail.sty
|
|
109
|
-
TEX_PACKAGE_RAIL = element(:usepackage,{ }, 'rail').cr
|
|
110
|
-
#Some command to be added in document header.
|
|
111
|
-
#Allows the usage of some characters as terminals.
|
|
112
|
-
RAIL_ALIAS = <<'RAIL_ALIAS'
|
|
113
|
-
\railalias{lbrace}{\{}
|
|
114
|
-
\railalias{rbrace}{\}}
|
|
115
|
-
\railalias{dollar}{\$}
|
|
116
|
-
\railalias{underscore}{\_}
|
|
117
|
-
\railalias{percent}{\%}
|
|
118
|
-
\railalias{at}{@}
|
|
119
|
-
\railalias{atat}{@@}
|
|
120
|
-
% \railalias{backslash}{\char"5C}
|
|
121
|
-
\railalias{backslash}{\ensuremath{\backslash}}
|
|
122
|
-
\railalias{lt}{\ensuremath{<}}
|
|
123
|
-
\railalias{le}{\ensuremath{<=}}
|
|
124
|
-
\railalias{gt}{\ensuremath{>}}
|
|
125
|
-
\railalias{ge}{\ensuremath{>=}}
|
|
126
|
-
\railalias{caret}{\ensuremath{\hat{}}}
|
|
127
|
-
\railalias{tildeeq}{\ensuremath{\sim=}}
|
|
128
|
-
\railalias{quote}{'}
|
|
129
|
-
\railalias{dquote}{"}%german: \dq
|
|
130
|
-
\railterm{quote,dquote}
|
|
131
|
-
\railterm{lbrace,rbrace,dollar,percent,backslash,underscore,at,atat}
|
|
132
|
-
\railterm{lt,le,gt,ge,caret,tildeeq}
|
|
133
|
-
RAIL_ALIAS
|
|
134
|
-
#~ \railalias{ampersand}{\&} -> umgesetht nachh << head>>
|
|
135
|
-
|
|
136
|
-
#Create new Rail diagramm.
|
|
137
|
-
#Parameter:
|
|
138
|
-
#-key
|
|
139
|
-
#-rail-definition
|
|
140
|
-
def initialize( key, code = '' )
|
|
141
|
-
@key = key
|
|
142
|
-
@code = code
|
|
143
|
-
end
|
|
144
|
-
#Implement << for Wikicollector
|
|
145
|
-
def << (code)
|
|
146
|
-
@code << code
|
|
147
|
-
end
|
|
148
|
-
=begin
|
|
149
|
-
Return LaTeX-environment rail
|
|
150
|
-
Requires rail.sty and rail.exe to generate the figure.
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
=end
|
|
154
|
-
def to_latex(options = {})
|
|
155
|
-
@code = @code.join if @code.respond_to?(:join) #if Array is given
|
|
156
|
-
return <<-RAIL
|
|
157
|
-
%
|
|
158
|
-
% Define a rail-diagramm #{@key}
|
|
159
|
-
%
|
|
160
|
-
\\begin{rail}
|
|
161
|
-
#{@key} :
|
|
162
|
-
#{@code.chomp}
|
|
163
|
-
;
|
|
164
|
-
\\end{rail}
|
|
165
|
-
RAIL
|
|
166
|
-
end #to_latex
|
|
167
|
-
def to_doc( target, options = {})
|
|
168
|
-
case target
|
|
169
|
-
when :latex
|
|
170
|
-
self.to_latex( options )
|
|
171
|
-
else
|
|
172
|
-
o = set_option_defaults(options)
|
|
173
|
-
#~ o[:log].debug("enter to_doc(#{target}) for #{self.inspect}, options: #{options.keys.inspect}") if o[:log].debug?
|
|
174
|
-
o[:log].error("Rail-diagramm not supported for #{target}") if o[:log].error?
|
|
175
|
-
''
|
|
176
|
-
end #case target
|
|
177
|
-
end #to_doc
|
|
178
|
-
end
|
|
179
|
-
end #module Rail
|
|
180
|
-
end #module Creole
|
|
181
|
-
end #module Docgenerator
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
=begin rdoc
|
|
2
|
-
Little helper to make documention on ruby scripts,
|
|
3
|
-
Ruby fragments are defined in the creole-source,
|
|
4
|
-
You can get the code and the results.
|
|
5
|
-
|
|
6
|
-
The source code is enriched with the results and can be shown.
|
|
7
|
-
=end
|
|
8
|
-
|
|
9
|
-
#Only for quick tests
|
|
10
|
-
$:.unshift("../../") if $0 == __FILE__
|
|
11
|
-
|
|
12
|
-
#~ fixme: use listings instead verbatim
|
|
13
|
-
#~ check usage??
|
|
14
|
-
|
|
15
|
-
require 'creole/creole2doc'
|
|
16
|
-
require 'docgenerator/packages/rubycode4doc'
|
|
17
|
-
|
|
18
|
-
module Docgenerator
|
|
19
|
-
module Creole
|
|
20
|
-
|
|
21
|
-
=begin rdoc
|
|
22
|
-
Write rubycode inside creole-text
|
|
23
|
-
=end
|
|
24
|
-
module Rubycode
|
|
25
|
-
|
|
26
|
-
=begin rdoc
|
|
27
|
-
Print ruby source code as is
|
|
28
|
-
=end
|
|
29
|
-
class Code < Placeholder
|
|
30
|
-
set_placeholder_key 'rubycode'
|
|
31
|
-
#Return content in a verbatim environment
|
|
32
|
-
def to_doc( target, options = {})
|
|
33
|
-
codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
|
|
34
|
-
#~ element(:verbatim,{},@source ).cr.to_doc( target, options )
|
|
35
|
-
element(:verbatim, {
|
|
36
|
-
:style => 'rubycode',
|
|
37
|
-
}, codetest.sourcecode ).cr.to_doc( target, options )
|
|
38
|
-
end
|
|
39
|
-
end #Code
|
|
40
|
-
|
|
41
|
-
#
|
|
42
|
-
#Print ruby source code and put the result of each line as a comment.
|
|
43
|
-
#
|
|
44
|
-
#Example:
|
|
45
|
-
# 1 + 1
|
|
46
|
-
#becomes
|
|
47
|
-
# 1 + 1 #2
|
|
48
|
-
class Code_evaluated < Placeholder
|
|
49
|
-
set_placeholder_key 'rubycode_evaluated'
|
|
50
|
-
#Return content in a verbatim environment
|
|
51
|
-
def to_doc( target, options = {})
|
|
52
|
-
codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
|
|
53
|
-
#~ element(:verbatim,{},@source ).cr.to_doc( target, options )
|
|
54
|
-
element(:verbatim, {
|
|
55
|
-
:style => 'rubycode_evaluated',
|
|
56
|
-
}, codetest.code_evaluation ).cr.to_doc( target, options )
|
|
57
|
-
end
|
|
58
|
-
end #Code_evaluated
|
|
59
|
-
|
|
60
|
-
#
|
|
61
|
-
#Print ruby source code and put the result of each line as a comment.
|
|
62
|
-
#
|
|
63
|
-
#Same as Code_evaluated, but export is done for in TeX-Package listings.
|
|
64
|
-
class Code_evaluated_listings < Placeholder
|
|
65
|
-
set_placeholder_key 'rubycode_evaluated_listings'
|
|
66
|
-
#Return content in a verbatim environment
|
|
67
|
-
def to_doc( target, options = {})
|
|
68
|
-
codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
|
|
69
|
-
#~ element(:verbatim, {
|
|
70
|
-
#~ :style => 'rubycode_evaluated',
|
|
71
|
-
#~ }, codetest.code_evaluation ).cr.to_doc( target, options )
|
|
72
|
-
codetest.code_evaluation_lstlisting.to_doc( target, options )
|
|
73
|
-
|
|
74
|
-
end
|
|
75
|
-
end #Code_evaluated_listing
|
|
76
|
-
|
|
77
|
-
#
|
|
78
|
-
#Take only the output of the rubycode
|
|
79
|
-
#
|
|
80
|
-
class Code_output < Placeholder
|
|
81
|
-
set_placeholder_key 'rubycode_output'
|
|
82
|
-
#Return content in a verbatim environment
|
|
83
|
-
def to_doc( target, options = {})
|
|
84
|
-
codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
|
|
85
|
-
#~ element(:verbatim,{},@source ).cr.to_doc( target, options )
|
|
86
|
-
element(:verbatim, {
|
|
87
|
-
:style => 'rubycode_output',
|
|
88
|
-
}, codetest.output ).cr.to_doc( target, options )
|
|
89
|
-
end
|
|
90
|
-
end #Code_output
|
|
91
|
-
|
|
92
|
-
#
|
|
93
|
-
#Build a table.
|
|
94
|
-
#Each row corresponds with a source code line.
|
|
95
|
-
#You get source code, result and output of the code line.
|
|
96
|
-
#
|
|
97
|
-
#
|
|
98
|
-
class Code_in_tab < Placeholder
|
|
99
|
-
set_placeholder_key 'rubycode_in_tab'
|
|
100
|
-
#Return content in a verbatim environment
|
|
101
|
-
def to_doc( target, options = {})
|
|
102
|
-
codetest = Docgenerator::Rubycode::CodeTest.new(nil, @source.join )
|
|
103
|
-
codetest.code_in_tab.to_doc( target, options )
|
|
104
|
-
end
|
|
105
|
-
end #Code_in_tab
|
|
106
|
-
end #module Rubycode
|
|
107
|
-
end #module Creole
|
|
108
|
-
end #module Docgenerator
|
|
109
|
-
|
|
110
|
-
if $0 == __FILE__
|
|
111
|
-
wiki = Docgenerator::Creole::Creole.new()
|
|
112
|
-
wiki << <<wiki
|
|
113
|
-
rubycode
|
|
114
|
-
<<<rubycode
|
|
115
|
-
1 + 1
|
|
116
|
-
>>>
|
|
117
|
-
----
|
|
118
|
-
rubycode_output
|
|
119
|
-
<<<rubycode_output
|
|
120
|
-
puts 1 + 1
|
|
121
|
-
>>>
|
|
122
|
-
----
|
|
123
|
-
rubycode_evaluated
|
|
124
|
-
<<<rubycode_evaluated
|
|
125
|
-
1 + 1
|
|
126
|
-
>>>
|
|
127
|
-
----
|
|
128
|
-
rubycode_in_tab
|
|
129
|
-
<<<rubycode_in_tab
|
|
130
|
-
1 + 1
|
|
131
|
-
>>>
|
|
132
|
-
wiki
|
|
133
|
-
puts wiki.to_html
|
|
134
|
-
end
|
|
135
|
-
|
|
136
|
-
__END__
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
=begin rdoc
|
|
2
|
-
Add support of Struktex::Structogramm for Creole.
|
|
3
|
-
=end
|
|
4
|
-
require 'creole/creole2doc'
|
|
5
|
-
require 'docgenerator/packages/struktex.rb'
|
|
6
|
-
|
|
7
|
-
module Docgenerator
|
|
8
|
-
module Creole
|
|
9
|
-
|
|
10
|
-
=begin rdoc
|
|
11
|
-
Define Creole placeholder.
|
|
12
|
-
|
|
13
|
-
The placeholder insertion must contain three parameters:
|
|
14
|
-
|
|
15
|
-
>>>structogramm{Declarations/Interfaces;120;25}
|
|
16
|
-
Statement
|
|
17
|
-
-> field1 description
|
|
18
|
-
<- field2 description
|
|
19
|
-
<-> field3 description
|
|
20
|
-
<<<
|
|
21
|
-
Details see Docgenerator::Structogramm
|
|
22
|
-
=end
|
|
23
|
-
class Creole_structogramm < Placeholder
|
|
24
|
-
set_placeholder_key('structogramm')
|
|
25
|
-
|
|
26
|
-
#~ fixme
|
|
27
|
-
#~ parameters optional als placeholder,
|
|
28
|
-
#~ hier aber benötigt.
|
|
29
|
-
#~ Defaults??
|
|
30
|
-
|
|
31
|
-
def initialize( wiki, parameters = nil)
|
|
32
|
-
super
|
|
33
|
-
#~ @wiki = wiki
|
|
34
|
-
#~ @log = @wiki.log
|
|
35
|
-
par = parameters ? parameters.split(/;/) : []
|
|
36
|
-
case par.size
|
|
37
|
-
when 0
|
|
38
|
-
raise ParameterError, "Creole_structogramm: Missing parameters"
|
|
39
|
-
when 3
|
|
40
|
-
title = par[0]
|
|
41
|
-
x = par[1]
|
|
42
|
-
y = par[2]
|
|
43
|
-
@source = ''
|
|
44
|
-
@structogramm = Packages::Struktex::Structogramm.new( title, x, y, @source )
|
|
45
|
-
else
|
|
46
|
-
raise ParameterError, "Creole_structogramm: Wrong number of parameters: #{parameters.inspect}"
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
#Instance of class Structogramm.
|
|
50
|
-
attr_reader :structogramm
|
|
51
|
-
|
|
52
|
-
#Return content only for latex
|
|
53
|
-
def to_doc( target, options = {})
|
|
54
|
-
target == :latex ? @structogramm.to_doc( target, options ) : ''
|
|
55
|
-
end
|
|
56
|
-
end #Creole_latex
|
|
57
|
-
|
|
58
|
-
end #module Creole
|
|
59
|
-
end #module Docgenerator
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
require 'docgenerator/packages/todonotes.rb'
|
|
2
|
-
|
|
3
|
-
module Docgenerator
|
|
4
|
-
module Creole
|
|
5
|
-
|
|
6
|
-
=begin rdoc
|
|
7
|
-
Classes to provide support for the todonotes-package.
|
|
8
|
-
|
|
9
|
-
* http://ctan.org/tex-archive/macros/latex/contrib/todonotes/
|
|
10
|
-
=end
|
|
11
|
-
module Todo
|
|
12
|
-
|
|
13
|
-
class Creole_todolist < Creole_inclusion_and_plugin
|
|
14
|
-
set_plugin_key('listoftodos') #use <<todo|..>>
|
|
15
|
-
def to_doc(target, options = {})
|
|
16
|
-
element(:listoftodos, options).to_doc(target, options)
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
=begin rdoc
|
|
20
|
-
Define a plugin for the todonotes-package.
|
|
21
|
-
=end
|
|
22
|
-
class Creole_todo < Creole_inclusion_and_plugin
|
|
23
|
-
|
|
24
|
-
set_plugin_key('todo') #use <<todo|..>>
|
|
25
|
-
|
|
26
|
-
#define default options for todonotes. may be redefined for children of this class.
|
|
27
|
-
def default_options; {}; end
|
|
28
|
-
|
|
29
|
-
=begin rdoc
|
|
30
|
-
Usage:
|
|
31
|
-
<<todo|what to do|color=red>>
|
|
32
|
-
=end
|
|
33
|
-
def initialize( inclusionname, description, options, wiki )
|
|
34
|
-
#~ @inclusionname = inclusionname #fix 'todo'
|
|
35
|
-
@description = description
|
|
36
|
-
@options = default_options.dup
|
|
37
|
-
options.each{|opt|
|
|
38
|
-
case opt
|
|
39
|
-
when /color\s*=\s*/
|
|
40
|
-
@options[:color] = $~.post_match
|
|
41
|
-
when /inline/
|
|
42
|
-
@options[:inline] = true
|
|
43
|
-
else
|
|
44
|
-
wiki.log.warn("Todo #{@description} with undefined option #{opt}")
|
|
45
|
-
end
|
|
46
|
-
}
|
|
47
|
-
@wiki = wiki
|
|
48
|
-
|
|
49
|
-
raise "Inclusion received no wiki but #{wiki.inspect}" unless wiki.is_a?(Creole)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def to_doc(target, options = {})
|
|
53
|
-
element(:todo, @options, @description).to_doc(target, options)
|
|
54
|
-
end
|
|
55
|
-
end #Creole_todo
|
|
56
|
-
|
|
57
|
-
=begin rdoc
|
|
58
|
-
A variant of Creole_todo with green color.
|
|
59
|
-
=end
|
|
60
|
-
class Creole_todo_green < Creole_todo
|
|
61
|
-
set_plugin_key('todo_green') #use <<todo_green|..>>
|
|
62
|
-
#define default options for todonotes. may be redefined for children of this class.
|
|
63
|
-
def default_options; {:color => 'green'}; end
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
=begin rdoc
|
|
67
|
-
A variant of Creole_todo with inline-layout.
|
|
68
|
-
=end
|
|
69
|
-
class Creole_todo_inline < Creole_todo
|
|
70
|
-
set_plugin_key('todo_inline') #use <<todo_inline|..>>
|
|
71
|
-
#define default options for todonotes. may be redefined for children of this class.
|
|
72
|
-
def default_options; {:inline => true}; end
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
end #module Todo
|
|
76
|
-
end #module Creole
|
|
77
|
-
end #module Docgenerator
|