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
@@ -1,120 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
Creole characters
|
3
|
-
|
4
|
-
This classes define special characters as inclusions.
|
5
|
-
|
6
|
-
* Inclusions are used later with {{xx}}
|
7
|
-
more at http://www.wikicreole.org/wiki/Inclusion
|
8
|
-
=end
|
9
|
-
|
10
|
-
#
|
11
|
-
|
12
|
-
module Docgenerator
|
13
|
-
module Creole
|
14
|
-
|
15
|
-
=begin rdoc
|
16
|
-
Define special characters as inclusions.
|
17
|
-
|
18
|
-
See also Creole::CHARACTERS
|
19
|
-
=end
|
20
|
-
module Characters
|
21
|
-
=begin rdoc
|
22
|
-
Define a 'shy' as {{shy}}
|
23
|
-
=end
|
24
|
-
class Creole_shy < Creole_inclusion_and_plugin
|
25
|
-
set_inclusions_key '-'
|
26
|
-
set_inclusions_key 'shy'
|
27
|
-
|
28
|
-
def to_doc(target, options = {})
|
29
|
-
element(:shy).to_doc(target, options)
|
30
|
-
end
|
31
|
-
end #Creole_shy
|
32
|
-
=begin rdoc
|
33
|
-
Define a 'thinsp' as {{thinsp}}
|
34
|
-
|
35
|
-
Could be used as Soft hypen (­) without dash:
|
36
|
-
http://stackoverflow.com/questions/5038920/html-soft-hypen-shy-without-dash
|
37
|
-
=end
|
38
|
-
class Creole_thinsp < Creole_inclusion_and_plugin
|
39
|
-
set_inclusions_key 'thinsp'
|
40
|
-
|
41
|
-
def to_doc(target, options = {})
|
42
|
-
element(:thinsp).to_doc(target, options)
|
43
|
-
end
|
44
|
-
end #Creole_thinsp
|
45
|
-
=begin rdoc
|
46
|
-
Define a 'wbr' as {{wbr}}
|
47
|
-
=end
|
48
|
-
class Creole_wbr < Creole_inclusion_and_plugin
|
49
|
-
set_inclusions_key 'wbr'
|
50
|
-
|
51
|
-
def to_doc(target, options = {})
|
52
|
-
element(:wbr).to_doc(target, options)
|
53
|
-
end
|
54
|
-
end #Creole_wbr
|
55
|
-
=begin rdoc
|
56
|
-
Define a 'radic' as {{radic}}
|
57
|
-
=end
|
58
|
-
class Creole_radic < Creole_inclusion_and_plugin
|
59
|
-
set_inclusions_key 'radic'
|
60
|
-
|
61
|
-
def to_doc(target, options = {})
|
62
|
-
element(:radic).to_doc(target, options)
|
63
|
-
end
|
64
|
-
end #Creole_shy
|
65
|
-
|
66
|
-
=begin rdoc
|
67
|
-
Define a 'nil' as {{nil}}
|
68
|
-
=end
|
69
|
-
class Creole_nil < Creole_inclusion_and_plugin
|
70
|
-
set_inclusions_key 'nil'
|
71
|
-
|
72
|
-
def to_doc(target, options = {})
|
73
|
-
''
|
74
|
-
end
|
75
|
-
end #Creole_nil
|
76
|
-
|
77
|
-
=begin rdoc
|
78
|
-
=end
|
79
|
-
class Creole_gt < Creole_inclusion_and_plugin
|
80
|
-
set_inclusions_key 'gt'
|
81
|
-
set_inclusions_key '>'
|
82
|
-
|
83
|
-
def to_doc(target, options = {})
|
84
|
-
element(:gt).to_doc(target, options)
|
85
|
-
end
|
86
|
-
end #Creole_gt
|
87
|
-
=begin rdoc
|
88
|
-
=end
|
89
|
-
class Creole_lt < Creole_inclusion_and_plugin
|
90
|
-
set_inclusions_key '<'
|
91
|
-
|
92
|
-
def to_doc(target, options = {})
|
93
|
-
element(:lt).to_doc(target, options)
|
94
|
-
end
|
95
|
-
end #Creole_lt
|
96
|
-
|
97
|
-
=begin rdoc
|
98
|
-
=end
|
99
|
-
class Creole_gg < Creole_inclusion_and_plugin
|
100
|
-
set_inclusions_key 'dgt'
|
101
|
-
set_inclusions_key '>>'
|
102
|
-
|
103
|
-
def to_doc(target, options = {})
|
104
|
-
element(:gg).to_doc(target, options)
|
105
|
-
end
|
106
|
-
end #Creole_gt
|
107
|
-
=begin rdoc
|
108
|
-
=end
|
109
|
-
class Creole_ll < Creole_inclusion_and_plugin
|
110
|
-
set_inclusions_key 'dlt'
|
111
|
-
set_inclusions_key '<<'
|
112
|
-
|
113
|
-
def to_doc(target, options = {})
|
114
|
-
element(:ll).to_doc(target, options)
|
115
|
-
end
|
116
|
-
end #Creole_lt
|
117
|
-
|
118
|
-
end #module Characters
|
119
|
-
end #module Creole
|
120
|
-
end #module Docgenerator
|
@@ -1,96 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
Creole inclusions and plugins
|
3
|
-
|
4
|
-
This classes are defined to implement transclusions (http://en.wikipedia.org/wiki/Transclusion)
|
5
|
-
|
6
|
-
* Inclusions are used later with {{xx}}
|
7
|
-
more at http://www.wikicreole.org/wiki/Inclusion
|
8
|
-
* Plugins are used later with <<xx>>
|
9
|
-
more at http://www.wikicreole.org/wiki/Plugin
|
10
|
-
|
11
|
-
By default, an inclusion expects a pictures, unless it es defined something else.
|
12
|
-
|
13
|
-
You can extend Wikis with additional inclusions:
|
14
|
-
|
15
|
-
wiki = Creole.new()
|
16
|
-
wiki.inclusion['xxx'] = Creole_inclusion_xxx
|
17
|
-
=end
|
18
|
-
|
19
|
-
#
|
20
|
-
|
21
|
-
module Docgenerator
|
22
|
-
module Creole
|
23
|
-
|
24
|
-
=begin rdoc
|
25
|
-
Dummy class for all inclusions and plugins.
|
26
|
-
Used to check the correct definition.
|
27
|
-
|
28
|
-
- Inclusions are used later with {{xx}}
|
29
|
-
- Plugins are used later with <<xx>>
|
30
|
-
|
31
|
-
Derived classes (Inclusions):
|
32
|
-
- Creole_inclusion_img
|
33
|
-
- Creole_inclusion_footnote_group
|
34
|
-
- Creole_inclusion_footnote
|
35
|
-
|
36
|
-
Derived classes (Plugins):
|
37
|
-
- Creole_default_plugin
|
38
|
-
- Creole_plugin_ruby
|
39
|
-
- Creole_plugin_ruby_raw
|
40
|
-
More subclasses may be possible.
|
41
|
-
=end
|
42
|
-
class Creole_inclusion_and_plugin
|
43
|
-
=begin rdoc
|
44
|
-
Example:
|
45
|
-
{{inclusionname|description|option1=1,option2=2}}
|
46
|
-
|
47
|
-
Parameters:
|
48
|
-
* inclusionname: Name of the inclusion (normally fix for an instance, unless e.g. Creole_inclusion_img)
|
49
|
-
* description: First parameter of the plugin.
|
50
|
-
* options: Array with the comma separated values.
|
51
|
-
In the example:
|
52
|
-
['option1=1','option2=2']
|
53
|
-
* wiki: creole-instance, where the plugin/inclusion is defined.
|
54
|
-
=end
|
55
|
-
def initialize( inclusionname, description, options, wiki )
|
56
|
-
@inclusionname = inclusionname
|
57
|
-
@description = description
|
58
|
-
@options = options
|
59
|
-
@wiki = wiki
|
60
|
-
|
61
|
-
raise "Inclusion received no wiki but #{wiki.inspect}" unless wiki.is_a?(Creole)
|
62
|
-
end
|
63
|
-
#Reader for the wiki.
|
64
|
-
attr_reader :wiki
|
65
|
-
|
66
|
-
=begin rdoc
|
67
|
-
Define meta-methods for Creole_inclusion_and_plugin
|
68
|
-
=end
|
69
|
-
class << self
|
70
|
-
=begin rdoc
|
71
|
-
Define class as a Inclusion.
|
72
|
-
You may use the class as:
|
73
|
-
{{key}}
|
74
|
-
=end
|
75
|
-
def set_inclusions_key(key)
|
76
|
-
Inclusions::Collection[key] = self
|
77
|
-
end
|
78
|
-
=begin rdoc
|
79
|
-
Define class as a Plugin.
|
80
|
-
You may use the class as:
|
81
|
-
<<key>>
|
82
|
-
=end
|
83
|
-
def set_plugin_key(key)
|
84
|
-
Plugins::Collection[key] = self
|
85
|
-
end
|
86
|
-
|
87
|
-
end #Meta-methods
|
88
|
-
end #Creole_inclusion_and_plugin
|
89
|
-
|
90
|
-
require_relative 'creole_inclusions.rb'
|
91
|
-
require_relative 'creole_characters.rb' #defined as inclusions
|
92
|
-
require_relative 'creole_plugins.rb'
|
93
|
-
|
94
|
-
end #module Creole
|
95
|
-
end #module Docgenerator
|
96
|
-
|
@@ -1,154 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
Creole inclusions.
|
3
|
-
|
4
|
-
This classes are defined to implement inclusions.
|
5
|
-
|
6
|
-
* Inclusions are used later with {{xx}}
|
7
|
-
more at http://www.wikicreole.org/wiki/Inclusion
|
8
|
-
|
9
|
-
By default, an inclusion expects a pictures, unless it es defined something else.
|
10
|
-
|
11
|
-
You can extend Wikis with additional inclusions:
|
12
|
-
|
13
|
-
wiki = Creole.new()
|
14
|
-
wiki.inclusion['xxx'] = Creole_inclusion_xxx
|
15
|
-
=end
|
16
|
-
|
17
|
-
#
|
18
|
-
|
19
|
-
module Docgenerator
|
20
|
-
module Creole
|
21
|
-
|
22
|
-
=begin rdoc
|
23
|
-
Define Inclusions
|
24
|
-
|
25
|
-
Inclusions are used via {{...}}
|
26
|
-
|
27
|
-
Default: Creole_inclusion_img (defined in class definition Creole_inclusion_img)
|
28
|
-
=end
|
29
|
-
module Inclusions
|
30
|
-
Collection = Hash.new()
|
31
|
-
|
32
|
-
|
33
|
-
=begin rdoc
|
34
|
-
Include images.
|
35
|
-
http://www.wikicreole.org/wiki/Images
|
36
|
-
|
37
|
-
There are yet more features than in standard.
|
38
|
-
|
39
|
-
This is also the default for inclusions.
|
40
|
-
|
41
|
-
Usage:
|
42
|
-
{{picurl.jpg|Alternate text|class=cc}}
|
43
|
-
{{picurl.jpg|Alternate text|css=width:50%}}
|
44
|
-
|
45
|
-
=end
|
46
|
-
class Creole_inclusion_img < Creole_inclusion_and_plugin
|
47
|
-
Collection.default = self
|
48
|
-
=begin rdoc
|
49
|
-
Define an image.
|
50
|
-
The existence of the picture is checked.
|
51
|
-
|
52
|
-
Supported options:
|
53
|
-
* alt (2nd parameter of {{picsrc|...}}
|
54
|
-
* css or imgcss
|
55
|
-
* class or imgclass
|
56
|
-
* longdesc (can take a url, at least opera offers to call the description)
|
57
|
-
* width (only LaTeX. For HTML, use css-option).
|
58
|
-
|
59
|
-
=end
|
60
|
-
def initialize( picname, alt_text, options, wiki )
|
61
|
-
super
|
62
|
-
@img = element(:img,{ :src => @inclusionname })
|
63
|
-
@img[:alt] << alt_text if alt_text
|
64
|
-
#Check existence of Picture. Only possible if the related wiki is available.
|
65
|
-
wiki.check_link_existence( @inclusionname, wiki.log )
|
66
|
-
|
67
|
-
css = CSS.new( :log => wiki.log )
|
68
|
-
|
69
|
-
#
|
70
|
-
#Check for options
|
71
|
-
#
|
72
|
-
#Missing options:
|
73
|
-
#* align
|
74
|
-
#* border
|
75
|
-
#* height
|
76
|
-
#* hspace
|
77
|
-
#* name
|
78
|
-
#* vspace
|
79
|
-
options.each{|option|
|
80
|
-
case option
|
81
|
-
when /^(img)?css\s*=\s*(.*)/
|
82
|
-
$2.split(/\s*;\s*/).each{|css_assignment|
|
83
|
-
css_assignment =~ /(.+?)\s*:\s*(.+)/
|
84
|
-
css[$1] = $2
|
85
|
-
}
|
86
|
-
when /^(img)?class\s*=\s*(.*)/
|
87
|
-
@img[:class] << $2
|
88
|
-
when /^width\s*=\s*(.*)/
|
89
|
-
@img[:width] << $1
|
90
|
-
when /^height\s*=\s*(.*)/
|
91
|
-
@img[:height] << $1
|
92
|
-
when /^texoption\s*=\s*(.*)/
|
93
|
-
@img[:texoption] << $1
|
94
|
-
when /^longdesc\s*=\s*(.*)/ #gibt einen URI (nach RFC 2396) an, wo eine Langbeschreibung der Grafik zu finden ist
|
95
|
-
@img[:longdesc] << $1
|
96
|
-
else
|
97
|
-
wiki.log.warn("Img: Undefined option #{option}") if wiki.log.warn?
|
98
|
-
end #case option
|
99
|
-
} if options
|
100
|
-
@img.attr[:style] << css
|
101
|
-
|
102
|
-
end
|
103
|
-
def to_doc(target, options = {})
|
104
|
-
@img.to_doc(target, options)
|
105
|
-
end
|
106
|
-
=begin
|
107
|
-
Fixme for image:
|
108
|
-
pack it into a figure-environment (HTML: div/span + float)
|
109
|
-
{{test.jpg|description|beforetitle=vorher]]
|
110
|
-
{{test.jpg|description|aftertitle=nachher}}
|
111
|
-
{{test.jpg|description|figureclass=imgclass}}
|
112
|
-
description = caption
|
113
|
-
=end
|
114
|
-
end #Creole_inclusion_img
|
115
|
-
|
116
|
-
=begin rdoc
|
117
|
-
Some short html
|
118
|
-
|
119
|
-
Usage:
|
120
|
-
{{html|code}}
|
121
|
-
|
122
|
-
Note:
|
123
|
-
There is also a placeholder for larger html:
|
124
|
-
<<<html
|
125
|
-
content
|
126
|
-
>>>
|
127
|
-
=end
|
128
|
-
class Creole_short_html < Creole_inclusion_and_plugin
|
129
|
-
#We don't use it as plugin. Closing > from html may be confusing as in:
|
130
|
-
# <<html|<em>kursuiv</em>>>
|
131
|
-
set_inclusions_key 'html'
|
132
|
-
|
133
|
-
|
134
|
-
def initialize( inclusionname, description, options, wiki )
|
135
|
-
super
|
136
|
-
options.each{|option|
|
137
|
-
#~ case option
|
138
|
-
#~ else
|
139
|
-
@wiki.log.warn("HTML with unknown option #{option.inspect} not found") if @wiki.log.warn?
|
140
|
-
#~ end
|
141
|
-
}
|
142
|
-
@source = description
|
143
|
-
|
144
|
-
end
|
145
|
-
#Return content only for html
|
146
|
-
def to_doc( target, options = {})
|
147
|
-
target == :html ? @source.to_doc( target, options ) : ''
|
148
|
-
end
|
149
|
-
end #Creole_inclusion_html
|
150
|
-
end #module Inclusions
|
151
|
-
end #module Creole
|
152
|
-
end #module Docgenerator
|
153
|
-
|
154
|
-
|
@@ -1,171 +0,0 @@
|
|
1
|
-
module Docgenerator
|
2
|
-
module Creole
|
3
|
-
|
4
|
-
=begin rdoc
|
5
|
-
Placeholder are defined in Creole-Syntax via <<< >>>
|
6
|
-
|
7
|
-
Placeholders get a name and optional parameters:
|
8
|
-
<<<name|parameter
|
9
|
-
|
10
|
-
Placeholders collect the content between <<< and >>>.
|
11
|
-
|
12
|
-
Derived classes are:
|
13
|
-
- Creole::Placeholders::Dummy
|
14
|
-
- Creole::Placeholders::Html
|
15
|
-
- Creole::Placeholders::Latex
|
16
|
-
- Creole::Creole_tabular
|
17
|
-
- Creole::Creole_tab
|
18
|
-
=end
|
19
|
-
class Placeholder
|
20
|
-
=begin rdoc
|
21
|
-
Define meta-methods for Creole_inclusion_and_plugin
|
22
|
-
=end
|
23
|
-
class << self
|
24
|
-
=begin rdoc
|
25
|
-
Define class as a placeholder.
|
26
|
-
You may use the class as:
|
27
|
-
{{key}}
|
28
|
-
=end
|
29
|
-
def set_placeholder_key(key)
|
30
|
-
Placeholders::Collection[key] = self
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
#Error is thrown, if the parameters don't fit the need of the placeholder
|
35
|
-
class ParameterError < ArgumentError; end;
|
36
|
-
=begin rdoc
|
37
|
-
Each placeholder get the wiki where it belongs to.
|
38
|
-
|
39
|
-
Parameters is an optional string.
|
40
|
-
|
41
|
-
Definition inside the wiki:
|
42
|
-
<<<name|parameters
|
43
|
-
content
|
44
|
-
>>>
|
45
|
-
Placeholders collect the content between <<< and >>>.
|
46
|
-
=end
|
47
|
-
def initialize( wiki, parameters = nil)
|
48
|
-
@wiki = wiki
|
49
|
-
@parameters = parameters
|
50
|
-
@log = @wiki.log
|
51
|
-
end
|
52
|
-
#
|
53
|
-
#Add the content between <<< and >>>.
|
54
|
-
def << (content)
|
55
|
-
@source = [] unless @source
|
56
|
-
@source << content
|
57
|
-
end
|
58
|
-
#
|
59
|
-
#Possibility to analyse the content.
|
60
|
-
def close()
|
61
|
-
@source.freeze
|
62
|
-
end
|
63
|
-
#Export it. Should be redefined by sub classes.
|
64
|
-
def to_doc( target, options = {})
|
65
|
-
@source.to_doc( target, options )
|
66
|
-
end
|
67
|
-
end #Placeholder
|
68
|
-
|
69
|
-
|
70
|
-
=begin rdoc
|
71
|
-
Collection of Placeholder-children
|
72
|
-
|
73
|
-
Placeholders are used via <<<...>>>.
|
74
|
-
=end
|
75
|
-
module Placeholders
|
76
|
-
=begin rdoc
|
77
|
-
Just a dummy for wrong definitions.
|
78
|
-
|
79
|
-
This class is used by Creole a default placeholder.
|
80
|
-
=end
|
81
|
-
class Dummy < Placeholder
|
82
|
-
end #Placeholder::Dummy
|
83
|
-
|
84
|
-
#List of defined Placeholders.
|
85
|
-
Collection = Hash.new( Dummy )
|
86
|
-
#Get a Placeholder.
|
87
|
-
def self.[](key)
|
88
|
-
Collection[key]
|
89
|
-
end
|
90
|
-
|
91
|
-
|
92
|
-
=begin rdoc
|
93
|
-
Placeholder for pure HTML-output.
|
94
|
-
This content is ignored in LaTeX, Wiki... documents.
|
95
|
-
|
96
|
-
Usage:
|
97
|
-
<<<html
|
98
|
-
content
|
99
|
-
>>>
|
100
|
-
|
101
|
-
Note:
|
102
|
-
There is also a plugin for short html:
|
103
|
-
{{html|code}}
|
104
|
-
=end
|
105
|
-
class Creole_html < Placeholder
|
106
|
-
set_placeholder_key 'html'
|
107
|
-
#Return content only for html
|
108
|
-
def to_doc( target, options = {})
|
109
|
-
target == :html ? @source.to_doc( target, options ) : ''
|
110
|
-
end
|
111
|
-
end #Creole_html
|
112
|
-
|
113
|
-
=begin
|
114
|
-
Placeholder for pure LaTeX-output.
|
115
|
-
This content is ignored in HTML, Wiki... documents.
|
116
|
-
|
117
|
-
Idea for option: Parse the content by the wiki.
|
118
|
-
|
119
|
-
Pro:
|
120
|
-
-allows the usage of <<ruby|...
|
121
|
-
Cons:
|
122
|
-
-unexpected conversions?
|
123
|
-
=end
|
124
|
-
class Creole_latex < Placeholder
|
125
|
-
set_placeholder_key 'latex'
|
126
|
-
#Return content only for latex
|
127
|
-
def to_doc( target, options = {})
|
128
|
-
target == :latex ? @source.to_doc( target, options ) : ''
|
129
|
-
end
|
130
|
-
end #Creole_latex
|
131
|
-
|
132
|
-
#
|
133
|
-
#Usage:
|
134
|
-
# <<<comment
|
135
|
-
# This text is a comment.
|
136
|
-
# >>>
|
137
|
-
#
|
138
|
-
class Creole_comment < Placeholder
|
139
|
-
set_placeholder_key 'comment'
|
140
|
-
#Return content as a comment
|
141
|
-
def to_doc( target, options = {})
|
142
|
-
case target
|
143
|
-
when :html; to_html( options )
|
144
|
-
when :latex; to_latex( options )
|
145
|
-
when :context; to_latex( options )
|
146
|
-
when :creole; to_creole( options )
|
147
|
-
else
|
148
|
-
@log.error("Creole_comment not supported for target #{target.inspect}") if @log.error?
|
149
|
-
end
|
150
|
-
end
|
151
|
-
def to_html(options = {})
|
152
|
-
return "<!-- #{@source.join} -->"
|
153
|
-
end
|
154
|
-
alias :to_context :to_latex
|
155
|
-
def to_latex(options = {})
|
156
|
-
return @source.map{|l| "%#{l}" }.join
|
157
|
-
end
|
158
|
-
def to_creole(options = {})
|
159
|
-
return "<<<comment\n#{@source.join}>>>"
|
160
|
-
end
|
161
|
-
end #Creole_comment
|
162
|
-
end #module Placeholders
|
163
|
-
end #module Creole
|
164
|
-
end #module Docgenerator
|
165
|
-
|
166
|
-
|
167
|
-
__END__
|
168
|
-
To be done:
|
169
|
-
rubycode (see plugin Creole_plugin_ruby )
|
170
|
-
|
171
|
-
Steuerparameter mit | nach plugin-name?
|