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
data/examples/creole_example.rb
DELETED
@@ -1,81 +0,0 @@
|
|
1
|
-
#encoding: cp1252
|
2
|
-
=begin rdoc
|
3
|
-
Example for creole/creole2doc
|
4
|
-
=end
|
5
|
-
|
6
|
-
|
7
|
-
require 'rubygems'
|
8
|
-
$:.unshift("../lib") #for local tests with uninstalled gem
|
9
|
-
#~ require 'docgenerator'
|
10
|
-
require 'creole/creole2doc'
|
11
|
-
include Docgenerator
|
12
|
-
|
13
|
-
begin
|
14
|
-
require 'rake4latex_pdflatex'
|
15
|
-
rescue LoadError
|
16
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
17
|
-
end
|
18
|
-
|
19
|
-
#
|
20
|
-
# Move all results to anothe folder
|
21
|
-
#
|
22
|
-
Dir.chdir('results')
|
23
|
-
|
24
|
-
|
25
|
-
=begin
|
26
|
-
Create document
|
27
|
-
=end
|
28
|
-
doc = Document.new(
|
29
|
-
:title => 'creole2doc_example.rb: Test for creole'
|
30
|
-
)
|
31
|
-
|
32
|
-
=begin
|
33
|
-
Add creole-content.
|
34
|
-
=end
|
35
|
-
doc.body << Creole::Creole.new(:content => DATA)
|
36
|
-
|
37
|
-
# ###############################
|
38
|
-
# Save the files
|
39
|
-
# ###############
|
40
|
-
doc.save( __FILE__.sub(/\.rb/, ".html"))
|
41
|
-
doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
42
|
-
:runtex => [:statistic, :clean]
|
43
|
-
)
|
44
|
-
|
45
|
-
|
46
|
-
__END__
|
47
|
-
=creole/creole2doc.rb
|
48
|
-
The Creole-class allows to analyse a text in creole format and
|
49
|
-
transform it to a "docgenerator"-object.
|
50
|
-
|
51
|
-
=Heading and paragraphs
|
52
|
-
==Paragraphs
|
53
|
-
|
54
|
-
Some text.
|
55
|
-
|
56
|
-
Some more text in a new paragraph.
|
57
|
-
|
58
|
-
==Text formatting
|
59
|
-
|
60
|
-
//italic// and **bold** is possible.
|
61
|
-
|
62
|
-
=Lists
|
63
|
-
==Unnumbered list
|
64
|
-
* item
|
65
|
-
* item
|
66
|
-
** subitem
|
67
|
-
*** subsubitem
|
68
|
-
**** subsubsubitem
|
69
|
-
*** subsubitem
|
70
|
-
|
71
|
-
==Numbered lists
|
72
|
-
# liste 1
|
73
|
-
# liste 2
|
74
|
-
## liste 2-1
|
75
|
-
# liste 3
|
76
|
-
|
77
|
-
===Mixed Lists
|
78
|
-
# Liste num
|
79
|
-
#* liste num-*
|
80
|
-
## liste num-num
|
81
|
-
|
@@ -1,67 +0,0 @@
|
|
1
|
-
#encoding: cp1252
|
2
|
-
=begin rdoc
|
3
|
-
Example how to use footnotes with creole/creole2doc.
|
4
|
-
=end
|
5
|
-
|
6
|
-
$:.unshift( '../lib' )
|
7
|
-
|
8
|
-
require 'creole/creole2doc.rb'
|
9
|
-
include Docgenerator
|
10
|
-
begin
|
11
|
-
require 'rake4latex_pdflatex'
|
12
|
-
rescue LoadError
|
13
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
14
|
-
end
|
15
|
-
#
|
16
|
-
# Move all results to another folder
|
17
|
-
#
|
18
|
-
Dir.chdir('results')
|
19
|
-
|
20
|
-
#Build document with usepackage{listings}...
|
21
|
-
doc = Docgenerator::Document.new( :title => 'Creole with footnotes' )
|
22
|
-
doc.body << Docgenerator::Creole::Creole.new(:content => DATA )
|
23
|
-
|
24
|
-
# ###############################
|
25
|
-
# Save the files
|
26
|
-
# ###############
|
27
|
-
doc.save( __FILE__.sub(/\.rb/, ".html"))
|
28
|
-
|
29
|
-
#~ doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
30
|
-
#~ :runtex => [:statistic, :clean]
|
31
|
-
#~ )
|
32
|
-
|
33
|
-
__END__
|
34
|
-
=Basic footnotes
|
35
|
-
Add a footnote is easy<<footnote|This is a footnote>>,
|
36
|
-
just use the plugin-technique of creole<<footnote|see http://www.wikicreole.org/wiki/Plugin>>.
|
37
|
-
|
38
|
-
|
39
|
-
For HTML you may define your own label<<footnote|as you can see here|label=s>>
|
40
|
-
|
41
|
-
Footnote must be in one line.
|
42
|
-
|
43
|
-
==Writing the footnotes
|
44
|
-
Writing footnotes makes only sense in HTML.
|
45
|
-
LaTeX has it own footnote output routine.
|
46
|
-
|
47
|
-
And now the footnotes:
|
48
|
-
<<footnotes>>
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
=Footnote groups
|
53
|
-
You may define footnote groups<<footnote|just add a groupid|groupid=g1>>.
|
54
|
-
|
55
|
-
|
56
|
-
//Inside italics you may define another group<<footnote|as here|groupid=g2>>.//
|
57
|
-
|
58
|
-
Grouping is only supported for HTML<<footnote|in fact, you may use it with LaTeX, but there is no support of manyfoot, bigfoot or similar package.|groupid=g1>>.
|
59
|
-
|
60
|
-
|
61
|
-
==Writing the footnotes
|
62
|
-
|
63
|
-
===Footnotes for group1:
|
64
|
-
<<footnotes|g1>>
|
65
|
-
|
66
|
-
===Footnotes for group2:
|
67
|
-
<<footnotes|g2>>
|
@@ -1,51 +0,0 @@
|
|
1
|
-
#encoding: cp1252
|
2
|
-
=begin rdoc
|
3
|
-
Example how to use self defined placeholders with creole/creole2doc.
|
4
|
-
=end
|
5
|
-
|
6
|
-
$:.unshift( '../lib' )
|
7
|
-
|
8
|
-
require 'creole/creole2doc.rb'
|
9
|
-
begin
|
10
|
-
require 'rake4latex_pdflatex'
|
11
|
-
rescue LoadError
|
12
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
13
|
-
end
|
14
|
-
|
15
|
-
class PDFComment_html < Docgenerator::Creole::Creole_inclusion_and_plugin
|
16
|
-
set_plugin_key 'pdfcomment'
|
17
|
-
#~ Docgenerator::Creole::Plugins::Collection['pdfcomment'] = self
|
18
|
-
#~ def initialize( inclusionname, description, options, wiki )
|
19
|
-
#~ super
|
20
|
-
#~ end
|
21
|
-
|
22
|
-
#Return content as pdfcomment
|
23
|
-
def to_doc( target, options = {})
|
24
|
-
target == :latex ? "\\pdfcomment{%s}" % @description : ''
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
#
|
29
|
-
# Move all results to another folder
|
30
|
-
#
|
31
|
-
Dir.chdir('results')
|
32
|
-
|
33
|
-
#Build document with usepackage{listings}...
|
34
|
-
doc = Docgenerator::Document.new( :title => 'Creole with placeholder' )
|
35
|
-
doc.head << element(:usepackage,{},'pdfcomment').cr #-> \pdfcomment
|
36
|
-
doc.body << creole = Docgenerator::Creole::Creole.new(:content => DATA )
|
37
|
-
|
38
|
-
# ###############################
|
39
|
-
# Save the files
|
40
|
-
# ###############
|
41
|
-
#~ doc.save( __FILE__.sub(/\.rb/, ".html"))
|
42
|
-
doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
43
|
-
:runtex => [:statistic, :clean]
|
44
|
-
)
|
45
|
-
|
46
|
-
__END__
|
47
|
-
This is text with a PDF-comment<<pdfcomment|This is a comment>>
|
48
|
-
|
49
|
-
<<<pdfcomment|This is a comment
|
50
|
-
longtext
|
51
|
-
>>>
|
@@ -1,77 +0,0 @@
|
|
1
|
-
#encoding: cp1252
|
2
|
-
=begin rdoc
|
3
|
-
Example how to use HTML with creole/creole2doc.
|
4
|
-
=end
|
5
|
-
|
6
|
-
$:.unshift( '../lib' )
|
7
|
-
|
8
|
-
require 'creole/creole2doc.rb'
|
9
|
-
begin
|
10
|
-
require 'rake4latex_pdflatex'
|
11
|
-
rescue LoadError
|
12
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
13
|
-
end
|
14
|
-
#
|
15
|
-
# Move all results to another folder
|
16
|
-
#
|
17
|
-
Dir.chdir('results')
|
18
|
-
|
19
|
-
#Build document with usepackage{listings}...
|
20
|
-
doc = Docgenerator::Document.new( :title => 'Creole with raw data' )
|
21
|
-
doc.body << Docgenerator::Creole::Creole.new(:content => DATA )
|
22
|
-
|
23
|
-
# ###############################
|
24
|
-
# Save the files
|
25
|
-
# ###############
|
26
|
-
doc.save( __FILE__.sub(/\.rb/, ".html"))
|
27
|
-
doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
28
|
-
:runtex => [:statistic, :clean]
|
29
|
-
)
|
30
|
-
|
31
|
-
__END__
|
32
|
-
=Raw HTML
|
33
|
-
|
34
|
-
HTML can be added via placeholders.
|
35
|
-
In LaTeX it will be ignored.
|
36
|
-
|
37
|
-
<<<html
|
38
|
-
<p style = 'color: red'>red paragraph</p>
|
39
|
-
>>>
|
40
|
-
|
41
|
-
=Raw LaTeX
|
42
|
-
|
43
|
-
LaTeX-Code can be added via placeholders.
|
44
|
-
In HTML it will be ignored.
|
45
|
-
|
46
|
-
So you can add math.
|
47
|
-
|
48
|
-
<<<latex
|
49
|
-
$$\sum_{i=1}^5 = 15$$
|
50
|
-
>>>
|
51
|
-
|
52
|
-
=Raw text
|
53
|
-
|
54
|
-
{{{
|
55
|
-
Some raw text.
|
56
|
-
|
57
|
-
The text formatting is unchanged
|
58
|
-
}}}
|
59
|
-
|
60
|
-
=Add some ruby
|
61
|
-
You can eval ruby code in your creole-text.
|
62
|
-
|
63
|
-
The following Rubycode is executed (eval), the result is added as raw text.
|
64
|
-
1 + 1 = <<ruby_raw|1+1>>
|
65
|
-
|
66
|
-
The following Rubycode is executed (eval), the result is added as wiki text.
|
67
|
-
1 + 1 = <<ruby_raw|1+1>>
|
68
|
-
|
69
|
-
==Countdown
|
70
|
-
Countdown: <<ruby_raw|(1..10).to_a.reverse.join("-")>>
|
71
|
-
|
72
|
-
Countdown: <<ruby|(1..10).to_a.reverse.join("-")>>
|
73
|
-
|
74
|
-
Countdown as raw data: <<ruby_raw|(1..10).to_a.reverse.map{|i| "*%i" % i}.join("\n")>>
|
75
|
-
|
76
|
-
Countdown as wiki data: <<ruby|(1..10).to_a.reverse.map{|i| "*%i" % i}.join("\n")>>
|
77
|
-
|
@@ -1,154 +0,0 @@
|
|
1
|
-
=begin rdoc
|
2
|
-
Example how to create rail-diagramms (syntax diagrams specified in EBNF)
|
3
|
-
with creole2doc.
|
4
|
-
|
5
|
-
This examples needs _rail_:
|
6
|
-
* http://texcatalogue.sarovar.org/entries/rail.html
|
7
|
-
* http://www.dante.ctan.org/tex-archive/support/rail/
|
8
|
-
* http://tex.lickert.net/tipps/rail/index.html
|
9
|
-
|
10
|
-
=end
|
11
|
-
$:.unshift '../lib'
|
12
|
-
require 'creole/plugins/rail.rb'
|
13
|
-
include Docgenerator
|
14
|
-
|
15
|
-
begin
|
16
|
-
require 'rake4latex_pdflatex'
|
17
|
-
rescue LoadError
|
18
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
19
|
-
end
|
20
|
-
#
|
21
|
-
# Move all results to another folder
|
22
|
-
#7
|
23
|
-
Dir.chdir('results')
|
24
|
-
|
25
|
-
doc = Creole::Creole_document.new(
|
26
|
-
:title => 'Rail-Diagramms in Creole'
|
27
|
-
)
|
28
|
-
doc.doc.head << Creole::Rail::Rail_diagramm::TEX_PACKAGE_RAIL
|
29
|
-
doc.doc.head << element(:latexonly,{}, [
|
30
|
-
Creole::Rail::Rail_diagramm::RAIL_ALIAS,
|
31
|
-
'\railterm{lowcharacter,uppercharacter}',
|
32
|
-
])
|
33
|
-
|
34
|
-
doc << DATA
|
35
|
-
|
36
|
-
# ###############################
|
37
|
-
# Save the files
|
38
|
-
# ###############
|
39
|
-
#~ doc.save( __FILE__.sub(/\.rb/, ".html")) --> makes no sense
|
40
|
-
doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
41
|
-
:runtex => [:statistic, :clean]
|
42
|
-
#~ :runtex => [:statistic] #keep log...
|
43
|
-
)
|
44
|
-
|
45
|
-
__END__
|
46
|
-
=Rail-Diagramms
|
47
|
-
|
48
|
-
Rail-diagramms are specifiv Syntax-diagramms.
|
49
|
-
|
50
|
-
[[http://en.wikipedia.org/wiki/Syntax_diagram|Syntax diagramms at Wikipedia]]
|
51
|
-
|
52
|
-
They represent a graphical alternative to Backus-Naur Form or EBNF.
|
53
|
-
|
54
|
-
More about the rail-programm at:
|
55
|
-
* http://texcatalogue.sarovar.org/entries/rail.html
|
56
|
-
* http://www.dante.ctan.org/tex-archive/support/rail/
|
57
|
-
* http://tex.lickert.net/tipps/rail/index.html
|
58
|
-
|
59
|
-
==Main elements
|
60
|
-
Non-finite elements (squared text):
|
61
|
-
//test//
|
62
|
-
<<<rail|nofinite
|
63
|
-
test
|
64
|
-
>>>
|
65
|
-
|
66
|
-
Finite element (circled text)
|
67
|
-
Just put the text in '':
|
68
|
-
//'final'//
|
69
|
-
<<<rail|finite
|
70
|
-
'final'
|
71
|
-
>>>
|
72
|
-
|
73
|
-
==Path descriptions
|
74
|
-
//[Text before] 'final' //
|
75
|
-
<<<rail|textbefore
|
76
|
-
[Text before] 'final'
|
77
|
-
>>>
|
78
|
-
|
79
|
-
To put text after an element, you have to put the text in braces
|
80
|
-
//'final' ( [Text after] )//
|
81
|
-
<<<rail|textafter
|
82
|
-
'final' ( [Text after] )
|
83
|
-
>>>
|
84
|
-
|
85
|
-
==Alternatives
|
86
|
-
//A | B //
|
87
|
-
<<<rail|alternative
|
88
|
-
A | B
|
89
|
-
>>>
|
90
|
-
|
91
|
-
==Optional pathes
|
92
|
-
Optional: //'final' ?//
|
93
|
-
<<<rail|optional
|
94
|
-
'final' ?
|
95
|
-
>>>
|
96
|
-
|
97
|
-
|
98
|
-
==Loops with +
|
99
|
-
Simple loop: //'final' +//
|
100
|
-
<<<rail|loop
|
101
|
-
'final' +
|
102
|
-
>>>
|
103
|
-
|
104
|
-
Loop with an additional part:
|
105
|
-
// A + B//
|
106
|
-
<<<rail|loop2
|
107
|
-
A + B
|
108
|
-
>>>
|
109
|
-
|
110
|
-
|
111
|
-
The part before the + must be visited during a walk through the rails.
|
112
|
-
The part after the + is only visited if you enter the loop.
|
113
|
-
|
114
|
-
With braces you can define your own ways through the diagramm.
|
115
|
-
|
116
|
-
//( A + B )//
|
117
|
-
<<<rail|loop3
|
118
|
-
( A + B )
|
119
|
-
>>>
|
120
|
-
|
121
|
-
//( A + ) B//
|
122
|
-
<<<rail|loop4
|
123
|
-
( A + ) B
|
124
|
-
>>>
|
125
|
-
|
126
|
-
//( A B + )//
|
127
|
-
<<<rail|loop5
|
128
|
-
( A B + )
|
129
|
-
>>>
|
130
|
-
|
131
|
-
//( A + ';' ) B//
|
132
|
-
<<<rail|loop6
|
133
|
-
( A + ';' ) B
|
134
|
-
>>>
|
135
|
-
|
136
|
-
|
137
|
-
==A complex example
|
138
|
-
<<<rail|complex
|
139
|
-
[1] (
|
140
|
-
( '[' string ']' )
|
141
|
-
? body[2--6] + '|'
|
142
|
-
)
|
143
|
-
| [2] body[3--6] '*' body[5--6]
|
144
|
-
| [2] body[3--6] '+' body[5--6]
|
145
|
-
| [3] ( body[4--5] + )
|
146
|
-
| [4] body[5] '?'
|
147
|
-
| [5] identifier ( '[' string ']' ) ?
|
148
|
-
| [5] quote string quote
|
149
|
-
| [5] dquote string dquote
|
150
|
-
| [5] '(' body[1--6] ')'
|
151
|
-
| [5] cr
|
152
|
-
| [6]
|
153
|
-
;
|
154
|
-
>>>
|
@@ -1,144 +0,0 @@
|
|
1
|
-
#encoding: cp1252
|
2
|
-
=begin rdoc
|
3
|
-
Example how to use inline-ruby with creole/creole2doc.
|
4
|
-
=end
|
5
|
-
|
6
|
-
$:.unshift( '../lib' )
|
7
|
-
|
8
|
-
require 'creole/plugins/rubycode4creole.rb'
|
9
|
-
begin
|
10
|
-
require 'rake4latex_pdflatex'
|
11
|
-
rescue LoadError
|
12
|
-
puts "rake4latex not installed -> no translation of LaTeX-file"
|
13
|
-
end
|
14
|
-
#
|
15
|
-
# Move all results to another folder
|
16
|
-
#
|
17
|
-
Dir.chdir('results')
|
18
|
-
|
19
|
-
#Build document with usepackage{listings}...
|
20
|
-
doc = Docgenerator::Rubycode::CodeTest.mk_document( 'Rubycode4doc-Test' )
|
21
|
-
doc.head << Docgenerator::Tables::TEX_PACKAGE_TABULARX
|
22
|
-
doc.body << Docgenerator::Creole::Creole.new(:content => DATA )
|
23
|
-
|
24
|
-
# ###############################
|
25
|
-
# Save the files
|
26
|
-
# ###############
|
27
|
-
doc.save( __FILE__.sub(/\.rb/, ".html"))
|
28
|
-
doc.save( __FILE__.sub(/\.rb/, ".tex"),
|
29
|
-
:runtex => [:statistic, :clean]
|
30
|
-
)
|
31
|
-
|
32
|
-
__END__
|
33
|
-
=Easy example
|
34
|
-
rubycode
|
35
|
-
<<<rubycode
|
36
|
-
1 + 1
|
37
|
-
>>>
|
38
|
-
----
|
39
|
-
rubycode_output
|
40
|
-
<<<rubycode_output
|
41
|
-
puts 1 + 1
|
42
|
-
>>>
|
43
|
-
----
|
44
|
-
rubycode_evaluated
|
45
|
-
<<<rubycode_evaluated
|
46
|
-
1 + 1
|
47
|
-
>>>
|
48
|
-
----
|
49
|
-
rubycode_in_tab
|
50
|
-
<<<rubycode_in_tab
|
51
|
-
1 + 1
|
52
|
-
>>>
|
53
|
-
|
54
|
-
=More examples
|
55
|
-
==Variables and output==
|
56
|
-
===Sourcecode===
|
57
|
-
<<<rubycode
|
58
|
-
a = 5
|
59
|
-
b = a * 5
|
60
|
-
puts b
|
61
|
-
puts b + 3
|
62
|
-
>>>
|
63
|
-
|
64
|
-
===Output===
|
65
|
-
<<<rubycode_output
|
66
|
-
a = 5
|
67
|
-
b = a * 5
|
68
|
-
puts b
|
69
|
-
puts b + 3
|
70
|
-
>>>
|
71
|
-
|
72
|
-
===Evaluation
|
73
|
-
<<<rubycode_evaluated
|
74
|
-
a = 5
|
75
|
-
b = a * 5
|
76
|
-
puts b
|
77
|
-
puts b + 3
|
78
|
-
>>>
|
79
|
-
|
80
|
-
===Evaluation in tabular===
|
81
|
-
<<<rubycode_in_tab
|
82
|
-
a = 5
|
83
|
-
b = a * 5
|
84
|
-
puts b
|
85
|
-
puts b + 3
|
86
|
-
>>>
|
87
|
-
|
88
|
-
==Strings and Here-Docs==
|
89
|
-
===Sourcecode===
|
90
|
-
<<<rubycode
|
91
|
-
b = 'Booo'
|
92
|
-
puts "#{b}"
|
93
|
-
puts '#{b}'
|
94
|
-
puts %Q{#{b}}
|
95
|
-
puts %q{#{b}}
|
96
|
-
>>>
|
97
|
-
|
98
|
-
===Evaluation
|
99
|
-
<<<rubycode_evaluated
|
100
|
-
b = 'Booo'
|
101
|
-
puts "#{b}"
|
102
|
-
puts '#{b}'
|
103
|
-
puts %Q{#{b}}
|
104
|
-
puts %q{#{b}}
|
105
|
-
>>>
|
106
|
-
|
107
|
-
===Evaluation in tabular===
|
108
|
-
<<<rubycode_in_tab
|
109
|
-
b = 'Booo'
|
110
|
-
puts "#{b}"
|
111
|
-
puts '#{b}'
|
112
|
-
puts %Q{#{b}}
|
113
|
-
puts %q{#{b}}
|
114
|
-
>>>
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
==Loops==
|
119
|
-
===Sourcecode===
|
120
|
-
<<<rubycode
|
121
|
-
3.times{ puts 11 }
|
122
|
-
1.upto(3){|i| puts i}
|
123
|
-
1.upto(3){|i| puts "run #{i}"}
|
124
|
-
>>>
|
125
|
-
|
126
|
-
===Output===
|
127
|
-
<<<rubycode_output
|
128
|
-
3.times{ puts 11 }
|
129
|
-
1.upto(3){|i| puts i}
|
130
|
-
1.upto(3){|i| puts "run #{i}"}
|
131
|
-
>>>
|
132
|
-
===Evaluated
|
133
|
-
<<<rubycode_evaluated
|
134
|
-
3.times{ puts 11 }
|
135
|
-
1.upto(3){|i| puts i}
|
136
|
-
1.upto(3){|i| puts "run #{i}"}
|
137
|
-
>>>
|
138
|
-
|
139
|
-
===Evaluation in tab
|
140
|
-
<<<rubycode_in_tab
|
141
|
-
3.times{ puts 11 }
|
142
|
-
1.upto(3){|i| puts i}
|
143
|
-
1.upto(3){|i| puts "run #{i}"}
|
144
|
-
>>>
|