docgenerator 1.2.1 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (209) hide show
  1. data/build_test_and_doc.rb +505 -0
  2. data/examples/creole_example.rb +82 -0
  3. data/examples/creole_example_footnote.rb +67 -0
  4. data/examples/creole_example_placeholder.rb +77 -0
  5. data/examples/creole_example_rail.rb +154 -0
  6. data/examples/creole_example_rubycode.rb +144 -0
  7. data/examples/creole_example_struktex.rb +169 -0
  8. data/examples/docgenerator_example.rb +1 -1
  9. data/examples/docgenerator_example_footnote.rb +1 -0
  10. data/examples/docgenerator_example_list.rb +3 -0
  11. data/examples/docgenerator_example_restrictions.rb +1 -1
  12. data/examples/docgenerator_example_tabular.rb +1 -1
  13. data/examples/docgenerator_example_tripfalls.rb +2 -2
  14. data/examples/results/readme +2 -1
  15. data/examples/wiki2docgenerator_example.rb +61 -32
  16. data/lib/creole/creole2doc.rb +57 -58
  17. data/lib/creole/creole_characters.rb +56 -0
  18. data/lib/creole/creole_inclusion_and_plugins.rb +59 -284
  19. data/lib/creole/creole_inclusions.rb +142 -0
  20. data/lib/creole/creole_placeholder.rb +57 -23
  21. data/lib/creole/creole_plugins.rb +198 -0
  22. data/lib/creole/creole_tabular.rb +16 -8
  23. data/lib/creole/plugins/rail.rb +182 -0
  24. data/lib/creole/plugins/rubycode4creole.rb +136 -0
  25. data/lib/creole/plugins/struktex.rb +59 -0
  26. data/lib/creole/plugins/todonotes.rb +70 -0
  27. data/lib/docgenerator.rb +161 -71
  28. data/lib/docgenerator/attribute.rb +189 -156
  29. data/lib/docgenerator/characters.rb +824 -267
  30. data/lib/docgenerator/compatibility_v1.rb +249 -0
  31. data/lib/docgenerator/css.rb +53 -32
  32. data/lib/docgenerator/document.rb +119 -56
  33. data/lib/docgenerator/element.rb +304 -351
  34. data/lib/docgenerator/element_meta.rb +303 -0
  35. data/lib/docgenerator/elements.rb +1112 -481
  36. data/lib/docgenerator/environments.rb +153 -62
  37. data/lib/docgenerator/footnote.rb +30 -9
  38. data/lib/docgenerator/lists.rb +71 -47
  39. data/lib/docgenerator/packages/attachfile.rb +136 -0
  40. data/lib/{packages/docgenerator_caption.rb → docgenerator/packages/caption.rb} +28 -19
  41. data/lib/docgenerator/packages/hyperref.rb +194 -0
  42. data/lib/docgenerator/packages/listings.rb +179 -0
  43. data/lib/docgenerator/packages/pdfpages.rb +43 -0
  44. data/lib/docgenerator/packages/rubycode4doc.rb +227 -0
  45. data/lib/{packages/docgenerator_scrlettr2.rb → docgenerator/packages/scrlettr2.rb} +25 -16
  46. data/lib/docgenerator/packages/scrpage2.rb +410 -0
  47. data/lib/docgenerator/packages/struktex.rb +447 -0
  48. data/lib/docgenerator/packages/todonotes.rb +85 -0
  49. data/lib/{packages/docgenerator_url.rb → docgenerator/packages/url.rb} +7 -6
  50. data/lib/docgenerator/sections.rb +257 -83
  51. data/lib/docgenerator/standard.rb +19 -11
  52. data/lib/docgenerator/tabular.rb +234 -118
  53. data/lib/{templates → docgenerator/templates}/docgenerator_template.rb +52 -44
  54. data/lib/{templates → docgenerator/templates}/docgenerator_template.yaml +0 -0
  55. data/lib/{templates → docgenerator/templates}/docgenerator_template_css.rb +22 -16
  56. data/lib/wiki2doc/plugins/rubycode4wiki.rb +53 -0
  57. data/lib/wiki2doc/plugins/struktex.rb +12 -0
  58. data/lib/wiki2doc/wiki2docgenerator.rb +39 -38
  59. data/lib/wiki2doc/wikimedia_document.rb +24 -0
  60. data/manpage_elements.rb +10411 -0
  61. data/readme.rd +34 -24
  62. data/unittest/creole_testtext.creole +11 -0
  63. data/unittest/expected/test_document_usepackage_undefined.log +2 -2
  64. data/unittest/expected/test_runtex.stdout +0 -1
  65. data/unittest/expected/test_runtex_2.stdout +0 -1
  66. data/unittest/expected/toc_css.css +3 -2
  67. data/unittest/expected_creole/test_creole_characters_all.creole +28 -0
  68. data/unittest/expected_creole/test_creole_characters_all.html +15 -15
  69. data/unittest/expected_creole/test_creole_characters_all.latex +15 -15
  70. data/unittest/expected_creole/test_creole_footnotes_groupid.html +15 -0
  71. data/unittest/expected_creole/test_creole_links_file.html +2 -2
  72. data/unittest/expected_creole/test_creole_links_file.latex +2 -2
  73. data/unittest/expected_creole/test_creole_links_file.text +2 -2
  74. data/unittest/expected_creole/test_creole_picture_link.html +1 -1
  75. data/unittest/expected_creole_rail/test_rail_creole_object.tex +33 -0
  76. data/unittest/expected_creole_rail/test_rail_creole_placeholder.tex +40 -0
  77. data/unittest/expected_rubycode4doc/creole_complete.html +26 -0
  78. data/unittest/expected_rubycode4doc/creole_complete.tex +40 -0
  79. data/unittest/expected_rubycode4doc/creole_in_tab.html +4 -0
  80. data/unittest/expected_rubycode4doc/creole_in_tab.tex +6 -0
  81. data/unittest/expected_rubycode4doc/creole_inline_ruby.html +7 -0
  82. data/unittest/expected_rubycode4doc/creole_output.html +2 -0
  83. data/unittest/expected_rubycode4doc/creole_output.tex +4 -0
  84. data/unittest/expected_rubycode4doc/creole_rubycode.html +1 -0
  85. data/unittest/expected_rubycode4doc/creole_rubycode.tex +3 -0
  86. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.html +1 -0
  87. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated.tex +3 -0
  88. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.html +3 -0
  89. data/unittest/expected_rubycode4doc/creole_rubycode_evaluated_listings.tex +5 -0
  90. data/unittest/expected_rubycode4doc/wiki_1.html +8 -0
  91. data/unittest/expected_rubycode4doc/wiki_2.html +8 -0
  92. data/unittest/expected_rubycode4doc/wiki_3.html +9 -0
  93. data/unittest/expected_rubycode4doc/wiki_immediate_1.html +5 -0
  94. data/unittest/expected_rubycode4doc/wiki_immediate_2.html +5 -0
  95. data/unittest/expected_rubycode4doc/wiki_immediate_3.html +8 -0
  96. data/unittest/expected_rubycode4doc/wiki_immediate_full.html +21 -0
  97. data/unittest/expected_struktex/test_struktex_krug.creole +15 -0
  98. data/unittest/expected_struktex/test_struktex_krug.tex +19 -0
  99. data/unittest/expected_struktex/test_struktex_krug.wiki +15 -0
  100. data/unittest/expected_struktex/test_struktex_statement.creole +7 -0
  101. data/unittest/expected_struktex/test_struktex_statement.tex +9 -0
  102. data/unittest/expected_struktex/test_struktex_statement.wiki +7 -0
  103. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki.html +0 -0
  104. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki.latex +0 -0
  105. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki.text +0 -0
  106. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki.wiki +0 -0
  107. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_description.html +1 -1
  108. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_description.latex +1 -1
  109. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_description.text +1 -1
  110. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_description.wiki +1 -1
  111. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote.html +0 -0
  112. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote.latex +0 -0
  113. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote.text +0 -0
  114. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote.wiki +0 -0
  115. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote_2.html +0 -0
  116. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_footnote_groupid.html +0 -0
  117. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_html_code.html +0 -0
  118. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_html_code.latex +0 -0
  119. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_html_code.text +0 -0
  120. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_html_code.wiki +0 -0
  121. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_inline.html +0 -0
  122. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_inline.latex +0 -0
  123. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_inline.text +0 -0
  124. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_inline.wiki +0 -0
  125. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_label.html +0 -0
  126. data/unittest/expected_wikimedia/test_wiki_link.html +8 -0
  127. data/unittest/expected_wikimedia/test_wiki_link.latex +17 -0
  128. data/unittest/expected_wikimedia/test_wiki_link.wiki +11 -0
  129. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol.html +0 -0
  130. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol.latex +0 -0
  131. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol.text +0 -0
  132. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol.wiki +0 -0
  133. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_after_ul.html +0 -0
  134. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_after_ul.latex +0 -0
  135. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_after_ul.text +0 -0
  136. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_after_ul.wiki +0 -0
  137. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_ul.html +0 -0
  138. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_ul.latex +0 -0
  139. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_ul.text +0 -0
  140. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ol_ul.wiki +0 -0
  141. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul.html +0 -0
  142. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul.latex +0 -0
  143. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul.text +0 -0
  144. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul.wiki +0 -0
  145. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul_too_much.html +0 -0
  146. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul_too_much.latex +0 -0
  147. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul_too_much.text +0 -0
  148. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_list_ul_too_much.wiki +0 -0
  149. data/unittest/expected_wikimedia/test_wiki_picture.html +55 -0
  150. data/unittest/expected_wikimedia/test_wiki_picture.latex +76 -0
  151. data/unittest/expected_wikimedia/test_wiki_picture_thumb.html +5 -0
  152. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_tab1.html +0 -0
  153. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_tab1.latex +0 -0
  154. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_tab1.wiki +0 -0
  155. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_textformatting.html +0 -0
  156. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_textformatting.latex +0 -0
  157. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_textformatting.text +0 -0
  158. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_textformatting.wiki +0 -0
  159. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_toc.html +0 -0
  160. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_toc.latex +0 -0
  161. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_toc.text +0 -0
  162. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_toc.wiki +0 -0
  163. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_ul_multiple_line.html +0 -0
  164. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_ul_multiple_line.latex +0 -0
  165. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_ul_multiple_line.text +0 -0
  166. data/unittest/{expected_wiki → expected_wikimedia}/test_wiki_ul_multiple_line.wiki +0 -0
  167. data/unittest/{unittest_creole2doc.rb → unittest_creole.rb} +385 -476
  168. data/unittest/unittest_creole_placeholders.rb +272 -0
  169. data/unittest/unittest_creole_plugin_rail.rb +147 -0
  170. data/unittest/unittest_docgenerator.rb +206 -332
  171. data/unittest/unittest_docgenerator_characters.rb +650 -0
  172. data/unittest/unittest_docgenerator_runtex.rb +48 -20
  173. data/unittest/unittest_packages_struktex.rb +187 -0
  174. data/unittest/unittest_rubycode4doc.rb +275 -0
  175. data/unittest/unittest_wikimedia.rb +479 -0
  176. metadata +245 -172
  177. data/examples/results_expected/docgenerator_example.html +0 -39
  178. data/examples/results_expected/docgenerator_example.pdf +0 -0
  179. data/examples/results_expected/docgenerator_example.tex +0 -56
  180. data/examples/results_expected/docgenerator_example_footnote.html +0 -40
  181. data/examples/results_expected/docgenerator_example_footnote.pdf +0 -0
  182. data/examples/results_expected/docgenerator_example_footnote.tex +0 -50
  183. data/examples/results_expected/docgenerator_example_list.html +0 -18
  184. data/examples/results_expected/docgenerator_example_list.pdf +0 -0
  185. data/examples/results_expected/docgenerator_example_list.tex +0 -46
  186. data/examples/results_expected/docgenerator_example_restrictions.html +0 -22
  187. data/examples/results_expected/docgenerator_example_restrictions.pdf +0 -0
  188. data/examples/results_expected/docgenerator_example_restrictions.tex +0 -31
  189. data/examples/results_expected/docgenerator_example_tabular.html +0 -37
  190. data/examples/results_expected/docgenerator_example_tabular.pdf +0 -0
  191. data/examples/results_expected/docgenerator_example_tabular.tex +0 -41
  192. data/examples/results_expected/docgenerator_example_tripfalls.html +0 -27
  193. data/examples/results_expected/docgenerator_example_tripfalls.pdf +0 -0
  194. data/examples/results_expected/docgenerator_example_tripfalls.tex +0 -31
  195. data/lib/packages/docgenerator_attachfile.rb +0 -71
  196. data/lib/packages/docgenerator_hyperref.rb +0 -109
  197. data/lib/packages/docgenerator_listings.rb +0 -103
  198. data/lib/packages/docgenerator_pdfpages.rb +0 -24
  199. data/lib/packages/docgenerator_scrpage2.rb +0 -172
  200. data/self_docgenerator.rb +0 -163
  201. data/unittest/expected_wiki/test_wiki_link.html +0 -8
  202. data/unittest/expected_wiki/test_wiki_link.latex +0 -17
  203. data/unittest/expected_wiki/test_wiki_link.wiki +0 -11
  204. data/unittest/expected_wiki/test_wiki_picture.html +0 -55
  205. data/unittest/expected_wiki/test_wiki_picture.latex +0 -76
  206. data/unittest/expected_wiki/test_wiki_picture_thumb.html +0 -5
  207. data/unittest/test_rakefile_docgenerator.rb +0 -43
  208. data/unittest/unittest_versions.rb +0 -44
  209. data/unittest/unittest_wiki2doc.rb +0 -464
@@ -1,71 +0,0 @@
1
- #
2
- #Support for attachfile.sty.
3
- #-
4
- #
5
- ATTACHFILE_OPTIONS = {
6
- :author => Attribute.create( [ :texkeyval], [ String ] ),
7
- :description=> Attribute.create( [ :texkeyval], [ String ] ),
8
- :subject => Attribute.create( [ :texkeyval], [ String ] ),
9
- :icon => Attribute.create( [ :texkeyval], [ 'Graph', 'Paperclip', 'PushPin', 'Tag' ] ),
10
- :mimetype=> Attribute.create( [ :texkeyval], [
11
- 'text/plain',
12
- 'video/mpeg',
13
- ] ),
14
- }
15
-
16
- # \attachfile [hoptionsi] {hfilenamei}
17
- Element.create( [:attachfile], ATTACHFILE_OPTIONS, true, {
18
- :latex => '#{linebreak(@crbefore)}\attachfile[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}',
19
- })
20
- # \noattachfile [hoptionsi]
21
- Element.create( [:noattachfile], ATTACHFILE_OPTIONS, false, {
22
- :latex => '#{linebreak(@crbefore)}\noattachfile[#{texkeyval()}]#{linebreak(@crafter)}',
23
- })
24
-
25
- # \textattachfile [hoptionsi] {hfilenamei} {htexti}
26
- Element.create( [:textattachfile], {
27
- :text => Attribute.create( [], [ String ] ),
28
- }.update(ATTACHFILE_OPTIONS), true, {
29
- :latex => '#{linebreak(@crbefore)}\textattachfile[#{texkeyval()}]{#{@content}}{#{@attr[:text]}}#{linebreak(@crafter)}',
30
- })
31
-
32
- # \notextattachfile [hoptionsi] {htexti}
33
- Element.create( [:notextattachfile], {
34
- :text => Attribute.create( [], [ String ] ),
35
- }.update(ATTACHFILE_OPTIONS), false, {
36
- :latex => '#{linebreak(@crbefore)}\notextattachfile[#{texkeyval()}]{#{@attr[:text]}}#{linebreak(@crafter)}',
37
- })
38
-
39
- __END__
40
- doc.body << element(:usepackage,{ }, 'listings').cr
41
- \attachfilesetup {hoptionsi}
42
-
43
- ==Options==
44
- appearance=hbooleani
45
- author=htexti
46
- color=hredi hgreeni hbluei
47
- date=htexti
48
- description=htexti
49
- subject=htexti
50
- icon=hnamei
51
- Graph
52
- Paperclip
53
- PushPin
54
- Tag
55
- mimetype=htypei
56
- print=hbooleani
57
- timezone=hoffseti
58
- zoom=hbooleani
59
-
60
- Option Default setting
61
- appearance true
62
- author none
63
- color 1 0.9255 0.7765
64
- date automatic
65
- description none
66
- subject none
67
- icon PushPin
68
- mimetype none
69
- print true
70
- timezone none
71
- zoom true
@@ -1,109 +0,0 @@
1
- #
2
- # Dynamic PDF-Features
3
- #
4
- #~\renewcommand{\LayoutCheckField}[2]{\mbox{#2}\,#1}
5
-
6
- class HyperrefForm < Environment
7
- add_attributes( {
8
- :options => Attribute.create( [ :latex ], [nil] ),
9
- } )
10
- Element.add( [:Form], HyperrefForm)
11
- def to_latex( )
12
- option = "[#{@attr[:options].content.join(',')}]"
13
- option = nil if option == '[]'
14
- #~ puts option.inspect
15
- return to_latex_environment( 'Form', option )
16
- end
17
- end
18
-
19
- Element.create( [:Reset], {}, true, {
20
- :latex => '#{linebreak(@crbefore)}\Reset{#{@content}}#{linebreak(@crafter)}',
21
- })
22
-
23
- Element.create( [:CheckBox], {
24
- :name => Attribute.create( [ :texkeyval ] ),
25
- :onclick => Attribute.create( [ :texkeyval ] ),
26
- :onblur => Attribute.create( [ :texkeyval ] ),
27
- }, true, {
28
- :latex => '#{linebreak(@crbefore)}\CheckBox[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}',
29
- })
30
-
31
- Element.create( [:PushButton], {
32
- :onclick => Attribute.create( [ :texkeyval ] ),
33
- #~ :onload => Attribute.create( [ :texkeyval ] ), - niht definiert
34
- #~ :onmousemove => Attribute.create( [ :texkeyval ] ), nee, ghet nicht
35
- :width => Attribute.create( [ :texkeyval ], nil, 5), #regexp not supported - CSS_WIDTH
36
- :height => Attribute.create( [ :texkeyval ], nil, 6), #regexp not supported - CSS_WIDTH
37
- :borderstyle => Attribute.create( [ :texkeyval ], ['S', 'D', 'B', 'I', 'U'], 10 ), #S (solid, durchgehend), D (dashed, gestrichelt), B (beveled, erh�ht), I (inset, versenkt), U (unterstrichen)
38
- :bordercolor => Attribute.create( [ :texkeyval ], nil, 11 ),
39
- :color => Attribute.create( [ :texkeyval ], nil, 15 ),
40
- :backgroundcolor => Attribute.create( [ :texkeyval ], nil, 15 ),
41
- }, true, {
42
- :latex => '#{linebreak(@crbefore)}\PushButton[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}',
43
- })
44
-
45
- Element.create( [:ChoiceMenu], {
46
- #~ :onclick => Attribute.create( [ :texkeyval ] ),
47
- :name => Attribute.create( [ :required ] ),
48
- :onblur => Attribute.create( [ :texkeyval ] ),
49
- :default => Attribute.create( [ :texkeyval ] ),
50
- :type => Attribute.create( [], ['combo', 'radiobutton'] ),
51
- #~ :onload => Attribute.create( [ :texkeyval ] ), - niht definiert
52
- #~ :onmousemove => Attribute.create( [ :texkeyval ] ), nee, ghet nicht
53
- :width => Attribute.create( [ :texkeyval ], nil, 5), #regexp not supported - CSS_WIDTH
54
- :height => Attribute.create( [ :texkeyval ], nil, 6), #regexp not supported - CSS_WIDTH
55
- :borderstyle => Attribute.create( [ :texkeyval ], ['S', 'D', 'B', 'I', 'U'], 10 ), #S (solid, durchgehend), D (dashed, gestrichelt), B (beveled, erh�ht), I (inset, versenkt), U (unterstrichen)
56
- :bordercolor => Attribute.create( [ :texkeyval ], nil, 11 ),
57
- :color => Attribute.create( [ :texkeyval ], nil, 15 ),
58
- :backgroundcolor => Attribute.create( [ :texkeyval ], nil, 15 ),
59
- }, true, {
60
- :latex => '#{linebreak(@crbefore)}\ChoiceMenu[#{@attr[:type]},#{texkeyval()}]{#{@attr[:name]}}{#{@content}}#{linebreak(@crafter)}',
61
- })
62
-
63
- Element.create( [:TextField], {
64
- :onclick => Attribute.create( [ :texkeyval ] ),
65
- :onblur => Attribute.create( [ :texkeyval ] ), #Action, when value changed
66
- :name => Attribute.create( [ :texkeyval ], [String, Symbol], 1 ),
67
- :password => Attribute.create( [ :texkeyval ], nil, 3), #Ausgabe als *****
68
- :width => Attribute.create( [ :texkeyval ], nil, 5), #regexp not supported - CSS_WIDTH
69
- :height => Attribute.create( [ :texkeyval ], nil, 6), #regexp not supported - CSS_WIDTH
70
- :align => Attribute.create( [ :texkeyval ], [0,1,2], 7), #0=links, 1= center, 2 = right
71
- :borderstyle => Attribute.create( [ :texkeyval ], ['S', 'D', 'B', 'I', 'U'], 10 ), #S (solid, durchgehend), D (dashed, gestrichelt), B (beveled, erh�ht), I (inset, versenkt), U (unterstrichen)
72
- :bordercolor => Attribute.create( [ :texkeyval ], nil, 11 ),
73
- :color => Attribute.create( [ :texkeyval ], nil, 15 ),
74
- :backgroundcolor => Attribute.create( [ :texkeyval ], nil, 15 ),
75
- :multiline => Attribute.create( [ :texkeyval ], [true,false], 30 ),
76
- :readonly => Attribute.create( [ :texkeyval ], [true,false], 31 ),
77
- :hidden => Attribute.create( [ :texkeyval ], [true,false], 31 ),
78
- :value => Attribute.create( [ :texkeyval ], [String, Array], 40 ),
79
- :validate => Attribute.create( [ :texkeyval ], [String, Array], 40 ), #Validation rule
80
- :format => Attribute.create( [ :texkeyval ], [String, Array], 40 ), #Format rule
81
- }, true, {
82
- :latex => '#{linebreak(@crbefore)}\TextField[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}',
83
- })
84
-
85
- __END__
86
- \ChoiceMenu[popdown,name=mitlgiedsnr]{Mitgliedsnummer}%
87
- {Kein Mitglied=N,}
88
-
89
- Acrobat-Funktionen:
90
-
91
- Zu TextField#validate:
92
- AFRange_Validate(b1,w1,b2,w2)
93
-
94
- b1: Testen auf Minimum (true/false)
95
- w1: Minimaler wert
96
- b2: Testen auf Maximalwert (true/false)
97
- w2: Maximaler wert
98
-
99
- Zu TextField#format:
100
- AFNumber_Format(nDec,0,0,0,0,"",true)
101
- nDec: Anzahl der Nachkommastellen.
102
-
103
-
104
- Paket insdljs (nach hyperref laden.
105
- \begin{insDLJS}{name}{titel}
106
- Javascript
107
- \end{insDLJS}
108
-
109
- name ergint name.js und bei begin{document} geladen.
@@ -1,103 +0,0 @@
1
- LSTSETTINGS = {
2
- :language => Attribute.create( [ :texkeyval] ),
3
- :style => Attribute.create( [ :texkeyval] ),
4
- :basicstyle => Attribute.create( [ :texkeyval] ),
5
- :emph => Attribute.create( [ :texkeyval] ),
6
- :emphstyle => Attribute.create( [ :texkeyval] ),
7
- :keywordstyle => Attribute.create( [ :texkeyval] ),
8
- :commentstyle => Attribute.create( [ :texkeyval] ),
9
- :style => Attribute.create( [ :texkeyval] ),
10
- :breaklines => Attribute.create( [ :texkeyval], ['true', 'false'] ),
11
- :mathescape => Attribute.create( [ :texkeyval], ['true', 'false'] ),
12
- :prebreak => Attribute.create( [ :texkeyval] ),
13
- :postbreak => Attribute.create( [ :texkeyval] ),
14
- :tabsize => Attribute.create( [ :texkeyval], [ Integer ] ),
15
- :firstline => Attribute.create( [ :texkeyval], [ Integer ] ),
16
- :lastline => Attribute.create( [ :texkeyval], [ Integer ] ),
17
- #~ showspaces=true,
18
- #~ showtabs=true,
19
- #~ tab=\rightarrowfill}
20
- :numbers => Attribute.create( [ :texkeyval], [ 'none', 'left', 'right' ] ),
21
- :numberstyle => Attribute.create( [ :texkeyval] ),
22
- :firstnumber => Attribute.create( [ :texkeyval], [ Integer ] ),
23
- :stepnumber => Attribute.create( [ :texkeyval], [ Integer ] ),
24
- :numbersep => Attribute.create( [ :texkeyval], [ Integer ] ),
25
- #
26
- :morekeywords => Attribute.create( [ :texkeyval], [ String ] ),
27
- :morecomment => Attribute.create( [ :texkeyval], [ String ] ),
28
- }
29
-
30
- Element.create( [:lstlistoflistings], {}, false )
31
- Element.create( [:lstloadlanguages], {}, true, {
32
- :latex => '#{linebreak(@crbefore)}\lstloadlanguages{#{@content}}#{linebreak(@crafter)}',
33
- :html => '',
34
- } )
35
- Element.create( [:lstset], LSTSETTINGS, false, {
36
- :latex => '#{linebreak(@crbefore)}\lstset{#{texkeyval()}}#{linebreak(@crafter)}',
37
- :html => '',
38
- })
39
- Element.create( [:lstdefinestyle], LSTSETTINGS, true, {
40
- :latex => '#{linebreak(@crbefore)}\lstdefinestyle{#{@content}}{#{texkeyval()}}#{linebreak(@crafter)}',
41
- })
42
-
43
- Element.create( [:lstinputlisting], {
44
- :caption => Attribute.create( [ :texkeyval], nil, 1 ),
45
- }.update(HTML_ATTR_ALL).update( LSTSETTINGS),
46
- true,
47
- { :htmltag => 'pre',
48
- :latex => '#{linebreak(@crbefore)}\lstinputlisting[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}'
49
- } )
50
-
51
- #~ lstlisting
52
-
53
- class Lstinline < Element
54
- #Make the key known to the complete key-list of elements.
55
- Element.add( [:lstinline], Lstinline)
56
- #~ add_attributes( HTML_ATTR_ALL )
57
- add_attributes( {
58
- :caption => Attribute.create( [ :latex ], nil, 1 ),
59
- }.update(HTML_ATTR_ALL).update( LSTSETTINGS)
60
- )
61
- def htmltag; 'pre'; end
62
- #Redefine standard output.
63
- #Options are given, if an option is avalaible.
64
- def to_latex( options={} )
65
- if ! @content.include?( '!' ); sep = '!'
66
- elsif ! @content.include?( '?' ); sep = '?'
67
- else
68
- puts "lstinline: found no sep. for #{content}"
69
- end
70
- cmd = linebreak(@crbefore)
71
- cmd << '\lstinline'
72
- cmd << "[#{texkeyval()}]"
73
- cmd << sep
74
- cmd << "#{@content.to_latex( options)}"
75
- cmd << sep
76
- cmd << linebreak(@crafter)
77
- return cmd
78
- end
79
- end
80
-
81
- class Lstlisting < Environment
82
- #Make the key known to the complete key-list of elements.
83
- Element.add( [:lstlisting], Lstlisting)
84
- #~ add_attributes( HTML_ATTR_ALL )
85
- add_attributes( {
86
- :options => Attribute.create( [ :texkeyval], nil, 1 ),
87
- }.update(HTML_ATTR_ALL).update( LSTSETTINGS)
88
- )
89
-
90
- def htmltag; 'pre'; end
91
- #Redefine standard output.
92
- #Options are given, if an option is avalaible.
93
- def to_latex( options={} )
94
- option = "[#{texkeyval()}]"
95
- option = nil if option == '[]'
96
- return to_latex_environment( 'lstlisting', option, options )
97
- end
98
- end
99
-
100
- __END__
101
- doc.head << element(:usepackage,{ }, 'listings').cr
102
- doc.head << element(:lstloadlanguages,{}, 'ruby' ).cr
103
- doc.head << element(:lstset,{ :language => 'ruby' } ).cr
@@ -1,24 +0,0 @@
1
- #
2
- #requires a
3
- # doc.head << element(:usepackage,{},'pdfpages')
4
- #
5
- #The usepackage command loads this script by its own.
6
- #
7
-
8
-
9
- #
10
- #Implement includepdf from pdfpages-package.
11
- #
12
- #Only pages-parameter is supported (yet).
13
- class IncludePDF < Element
14
-
15
- Element.add( [:includepdf], IncludePDF )
16
-
17
- add_attributes( {
18
- :pages => Attribute.create( [ :texkeyval], [ String ] ),
19
- }#.update(HTML_ATTR_ALL)
20
- )
21
-
22
- add_output( :latex, '#{linebreak(@crbefore)}\includepdf[#{texkeyval()}]{#{@content}}#{linebreak(@crafter)}')
23
-
24
- end #IncludePDF
@@ -1,172 +0,0 @@
1
- #
2
- #Support for scrpage2.sty.
3
- #-
4
- #
5
- Element.create( [:clearscrheadings], {
6
- }, false, {
7
- :latex => '#{linebreak(@crbefore)}\clearscrheadings #{linebreak(@crafter)}',
8
- })
9
- Element.create( [:clearscrheadfoot], {
10
- }, false, {
11
- :latex => '#{linebreak(@crbefore)}\clearscrheadfoot #{linebreak(@crafter)}',
12
- })
13
- Element.create( [:clearscrplain], {
14
- }, false, {
15
- :latex => '#{linebreak(@crbefore)}\clearscrplain #{linebreak(@crafter)}',
16
- })
17
-
18
- #
19
- #Values: scrheadings, scrplain
20
- #
21
- Element.create( [:pagestyle], {
22
- }, true, {
23
- :latex => '#{linebreak(@crbefore)}\pagestyle{#{@content}}#{linebreak(@crafter)}',
24
- })
25
-
26
- Element.create( [:manualmark], {
27
- }, false, {
28
- :latex => '#{linebreak(@crbefore)}\manualmark #{linebreak(@crafter)}',
29
- })
30
-
31
-
32
- Element.create( [:automark], {
33
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
34
- }, true, {
35
- :latex => '#{linebreak(@crbefore)}\automark#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
36
- })
37
-
38
- Element.create( [:lehead], {
39
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
40
- }, true, {
41
- :latex => '#{linebreak(@crbefore)}\lehead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
42
- })
43
-
44
- Element.create( [:cehead], {
45
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
46
- }, true, {
47
- :latex => '#{linebreak(@crbefore)}\cehead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
48
- })
49
- Element.create( [:rehead], {
50
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
51
- }, true, {
52
- :latex => '#{linebreak(@crbefore)}\rehead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
53
- })
54
- Element.create( [:lefoot], {
55
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
56
- }, true, {
57
- :latex => '#{linebreak(@crbefore)}\lefoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
58
- })
59
- Element.create( [:cefoot], {
60
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
61
- }, true, {
62
- :latex => '#{linebreak(@crbefore)}\cefoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
63
- })
64
- Element.create( [:refoot], {
65
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
66
- }, true, {
67
- :latex => '#{linebreak(@crbefore)}\refoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
68
- })
69
-
70
- Element.create( [:lohead], {
71
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
72
- }, true, {
73
- :latex => '#{linebreak(@crbefore)}\lohead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
74
- })
75
-
76
- Element.create( [:cohead], {
77
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
78
- }, true, {
79
- :latex => '#{linebreak(@crbefore)}\cohead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
80
- })
81
- Element.create( [:rohead], {
82
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
83
- }, true, {
84
- :latex => '#{linebreak(@crbefore)}\rohead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
85
- })
86
- Element.create( [:lofoot], {
87
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
88
- }, true, {
89
- :latex => '#{linebreak(@crbefore)}\lofoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
90
- })
91
- Element.create( [:cofoot], {
92
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
93
- }, true, {
94
- :latex => '#{linebreak(@crbefore)}\cofoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
95
- })
96
- Element.create( [:rofoot], {
97
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
98
- }, true, {
99
- :latex => '#{linebreak(@crbefore)}\rofoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
100
- })
101
-
102
-
103
- Element.create( [:ihead], {
104
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
105
- }, true, {
106
- :latex => '#{linebreak(@crbefore)}\ihead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
107
- })
108
- Element.create( [:chead], {
109
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
110
- }, true, {
111
- :latex => '#{linebreak(@crbefore)}\chead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
112
- })
113
- Element.create( [:ohead], {
114
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
115
- }, true, {
116
- :latex => '#{linebreak(@crbefore)}\ohead#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
117
- })
118
- Element.create( [:ifoot], {
119
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
120
- }, true, {
121
- :latex => '#{linebreak(@crbefore)}\ifoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
122
- })
123
- Element.create( [:cfoot], {
124
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
125
- }, true, {
126
- :latex => '#{linebreak(@crbefore)}\cfoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
127
- })
128
- Element.create( [:ofoot], {
129
- :rightmark => Attribute.create( [ :latex ], [ String ] ),
130
- }, true, {
131
- :latex => '#{linebreak(@crbefore)}\ofoot#{texoptional(:rightmark)}{#{@content}}#{linebreak(@crafter)}',
132
- })
133
-
134
- #~ #
135
- #
136
- #~ class Captionof < Element
137
- #~ #Make the key known to the complete key-list of elements.
138
- #~ Element.add( [:captionof], Captionof)
139
- #~ add_attributes( HTML_ATTR_ALL )
140
- #~ add_attributes( {
141
- #~ :float_type => Attribute.create( [ :latex, :required ], [ 'figure', 'table' ] ),
142
- #~ :lst_entry => Attribute.create( [ ], [ String ] ),
143
- #~ } )
144
-
145
- #~ #Redefine standard output.
146
- #~ #Options are given, if an option is avalaible.
147
- #~ def to_latex()
148
- #~ cmd = linebreak(@crbefore)
149
- #~ cmd << "\\captionof{#{@attr[:float_type]}}"
150
- #~ #Empty [] would return empty entry for list of figures,
151
- #~ cmd << "[#{@attr[:lst_entry]}]" if @attr[:lst_entry].content?
152
- #~ cmd << "{#{@content}}"
153
- #~ cmd << linebreak(@crafter)
154
- #~ return cmd
155
- #~ end
156
- #~ def htmltag(); 'span'; end #fixme
157
- #~ def to_html()
158
- #~ return ''
159
- #~ end
160
- #~ end #
161
-
162
- __END__
163
- pdf.head << element(:usepackage,{}, 'scrpage2' ).cr
164
- pdf.head << element(:usepackage,{}, 'totpages' ).cr
165
-
166
- pdf.head << element(:pagestyle,{}, 'scrheadings' ).cr
167
- pdf.head << element(:automark, {}, 'section').cr
168
-
169
- pdf.head << element(:clearscrheadings).cr
170
- pdf.head << element(:ihead, {}, '\\headmark').cr
171
- pdf.head << element(:ofoot,{}, '\\pagemark/\\ref{TotPages}').cr
172
- pdf.head << element(:ifoot,{}, '\\url{http://www.lickert.net}').cr