mml 2.3.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (336) hide show
  1. checksums.yaml +4 -4
  2. data/.gitmodules +9 -0
  3. data/.rubocop.yml +4 -0
  4. data/.rubocop_todo.yml +83 -18
  5. data/Gemfile +0 -2
  6. data/README.adoc +176 -47
  7. data/Rakefile +16 -1
  8. data/lib/mml/base/common_attributes.rb +44 -0
  9. data/lib/mml/base/content/annotation.rb +28 -0
  10. data/lib/mml/base/content/annotation_xml.rb +31 -0
  11. data/lib/mml/base/content/apply.rb +27 -0
  12. data/lib/mml/base/content/arith.rb +243 -0
  13. data/lib/mml/base/content/bind.rb +27 -0
  14. data/lib/mml/base/content/bvar.rb +20 -0
  15. data/lib/mml/base/content/calculus.rb +103 -0
  16. data/lib/mml/base/content/cbytes.rb +24 -0
  17. data/lib/mml/base/content/cerror.rb +24 -0
  18. data/lib/mml/base/content/ci.rb +77 -0
  19. data/lib/mml/base/content/cn.rb +33 -0
  20. data/lib/mml/base/content/condition.rb +20 -0
  21. data/lib/mml/base/content/constants.rb +173 -0
  22. data/lib/mml/base/content/cs.rb +22 -0
  23. data/lib/mml/base/content/csymbol.rb +79 -0
  24. data/lib/mml/base/content/declare.rb +34 -0
  25. data/lib/mml/base/content/degree.rb +20 -0
  26. data/lib/mml/base/content/elementary_functions.rb +309 -0
  27. data/lib/mml/base/content/fn.rb +25 -0
  28. data/lib/mml/base/content/functions.rb +85 -0
  29. data/lib/mml/base/content/interval.rb +24 -0
  30. data/lib/mml/base/content/inverse.rb +25 -0
  31. data/lib/mml/base/content/lambda.rb +20 -0
  32. data/lib/mml/base/content/linear_algebra.rb +122 -0
  33. data/lib/mml/base/content/logic.rb +93 -0
  34. data/lib/mml/base/content/otherwise.rb +20 -0
  35. data/lib/mml/base/content/piece.rb +20 -0
  36. data/lib/mml/base/content/piecewise.rb +20 -0
  37. data/lib/mml/base/content/relations.rb +113 -0
  38. data/lib/mml/base/content/reln.rb +19 -0
  39. data/lib/mml/base/content/semantics.rb +27 -0
  40. data/lib/mml/base/content/sep.rb +19 -0
  41. data/lib/mml/base/content/sets.rb +163 -0
  42. data/lib/mml/base/content/share.rb +22 -0
  43. data/lib/mml/base/content/statistics.rb +95 -0
  44. data/lib/mml/base/content/vector_calculus.rb +63 -0
  45. data/lib/mml/base/content_loader.rb +195 -0
  46. data/lib/mml/base/maction.rb +1 -0
  47. data/lib/mml/base/math.rb +47 -0
  48. data/lib/mml/base/menclose.rb +1 -1
  49. data/lib/mml/base/mfenced.rb +2 -2
  50. data/lib/mml/base/mglyph.rb +2 -2
  51. data/lib/mml/base/mi.rb +9 -6
  52. data/lib/mml/base/mlabeledtr.rb +2 -6
  53. data/lib/mml/base/mn.rb +3 -2
  54. data/lib/mml/base/mo.rb +3 -3
  55. data/lib/mml/base/mrow.rb +0 -2
  56. data/lib/mml/base/ms.rb +4 -6
  57. data/lib/mml/base/mscarries.rb +1 -1
  58. data/lib/mml/base/mspace.rb +0 -2
  59. data/lib/mml/base/mstyle.rb +4 -8
  60. data/lib/mml/base/mtable.rb +8 -0
  61. data/lib/mml/base/mtd.rb +6 -0
  62. data/lib/mml/base/mtext.rb +0 -2
  63. data/lib/mml/base/semantics.rb +4 -2
  64. data/lib/mml/base/universal_presentation_attributes.rb +46 -0
  65. data/lib/mml/base/v3_common.rb +16 -0
  66. data/lib/mml/base/v3_presentation_attributes.rb +15 -0
  67. data/lib/mml/base/v4_attributes.rb +4 -18
  68. data/lib/mml/base.rb +11 -0
  69. data/lib/mml/common_elements.rb +336 -0
  70. data/lib/mml/context_configuration.rb +29 -0
  71. data/lib/mml/v2/annotation.rb +9 -0
  72. data/lib/mml/v2/annotation_xml.rb +9 -0
  73. data/lib/mml/v2/apply.rb +9 -0
  74. data/lib/mml/v2/arith.rb +93 -0
  75. data/lib/mml/v2/bind.rb +9 -0
  76. data/lib/mml/v2/bvar.rb +9 -0
  77. data/lib/mml/v2/calculus.rb +33 -0
  78. data/lib/mml/v2/ci.rb +9 -0
  79. data/lib/mml/v2/cn.rb +9 -0
  80. data/lib/mml/v2/common_elements.rb +34 -0
  81. data/lib/mml/v2/condition.rb +9 -0
  82. data/lib/mml/v2/configuration.rb +13 -0
  83. data/lib/mml/v2/constants.rb +65 -0
  84. data/lib/mml/v2/csymbol.rb +9 -0
  85. data/lib/mml/v2/degree.rb +9 -0
  86. data/lib/mml/v2/elementary_functions.rb +121 -0
  87. data/lib/mml/v2/fn.rb +9 -0
  88. data/lib/mml/v2/functions.rb +29 -0
  89. data/lib/mml/v2/interval.rb +9 -0
  90. data/lib/mml/v2/inverse.rb +9 -0
  91. data/lib/mml/v2/lambda.rb +9 -0
  92. data/lib/mml/v2/linear_algebra.rb +41 -0
  93. data/lib/mml/v2/logic.rb +33 -0
  94. data/lib/mml/v2/maction.rb +9 -0
  95. data/lib/mml/v2/maligngroup.rb +9 -0
  96. data/lib/mml/v2/malignmark.rb +9 -0
  97. data/lib/mml/v2/math.rb +11 -0
  98. data/lib/mml/v2/menclose.rb +9 -0
  99. data/lib/mml/v2/merror.rb +9 -0
  100. data/lib/mml/v2/mfenced.rb +9 -0
  101. data/lib/mml/v2/mfrac.rb +9 -0
  102. data/lib/mml/v2/mfraction.rb +9 -0
  103. data/lib/mml/v2/mglyph.rb +9 -0
  104. data/lib/mml/v2/mi.rb +9 -0
  105. data/lib/mml/v2/mlabeledtr.rb +9 -0
  106. data/lib/mml/v2/mlongdiv.rb +9 -0
  107. data/lib/mml/v2/mmultiscripts.rb +9 -0
  108. data/lib/mml/v2/mn.rb +9 -0
  109. data/lib/mml/v2/mo.rb +10 -0
  110. data/lib/mml/v2/mover.rb +9 -0
  111. data/lib/mml/v2/mpadded.rb +9 -0
  112. data/lib/mml/v2/mphantom.rb +9 -0
  113. data/lib/mml/v2/mprescripts.rb +9 -0
  114. data/lib/mml/v2/mroot.rb +9 -0
  115. data/lib/mml/v2/mrow.rb +9 -0
  116. data/lib/mml/v2/ms.rb +9 -0
  117. data/lib/mml/v2/mscarries.rb +9 -0
  118. data/lib/mml/v2/mscarry.rb +9 -0
  119. data/lib/mml/v2/msgroup.rb +9 -0
  120. data/lib/mml/v2/msline.rb +9 -0
  121. data/lib/mml/v2/mspace.rb +9 -0
  122. data/lib/mml/v2/msqrt.rb +9 -0
  123. data/lib/mml/v2/msrow.rb +9 -0
  124. data/lib/mml/v2/mstack.rb +9 -0
  125. data/lib/mml/v2/mstyle.rb +10 -0
  126. data/lib/mml/v2/msub.rb +9 -0
  127. data/lib/mml/v2/msubsup.rb +9 -0
  128. data/lib/mml/v2/msup.rb +9 -0
  129. data/lib/mml/v2/mtable.rb +9 -0
  130. data/lib/mml/v2/mtd.rb +9 -0
  131. data/lib/mml/v2/mtext.rb +9 -0
  132. data/lib/mml/v2/mtr.rb +9 -0
  133. data/lib/mml/v2/munder.rb +9 -0
  134. data/lib/mml/v2/munderover.rb +9 -0
  135. data/lib/mml/v2/namespace.rb +7 -0
  136. data/lib/mml/v2/none.rb +9 -0
  137. data/lib/mml/v2/otherwise.rb +9 -0
  138. data/lib/mml/v2/piece.rb +9 -0
  139. data/lib/mml/v2/piecewise.rb +9 -0
  140. data/lib/mml/v2/relations.rb +41 -0
  141. data/lib/mml/v2/reln.rb +13 -0
  142. data/lib/mml/v2/semantics.rb +9 -0
  143. data/lib/mml/v2/sep.rb +9 -0
  144. data/lib/mml/v2/sets.rb +57 -0
  145. data/lib/mml/v2/statistics.rb +33 -0
  146. data/lib/mml/v2/vector_calculus.rb +21 -0
  147. data/lib/mml/v2.rb +311 -0
  148. data/lib/mml/v3/annotation.rb +10 -0
  149. data/lib/mml/v3/annotation_xml.rb +10 -0
  150. data/lib/mml/v3/apply.rb +10 -0
  151. data/lib/mml/v3/arith.rb +115 -0
  152. data/lib/mml/v3/bind.rb +10 -0
  153. data/lib/mml/v3/calculus.rb +40 -0
  154. data/lib/mml/v3/cbytes.rb +10 -0
  155. data/lib/mml/v3/cerror.rb +10 -0
  156. data/lib/mml/v3/ci.rb +10 -0
  157. data/lib/mml/v3/cn.rb +10 -0
  158. data/lib/mml/v3/common_elements.rb +34 -0
  159. data/lib/mml/v3/constants.rb +80 -0
  160. data/lib/mml/v3/constructs.rb +55 -0
  161. data/lib/mml/v3/cs.rb +10 -0
  162. data/lib/mml/v3/csymbol.rb +10 -0
  163. data/lib/mml/v3/deprecated_content.rb +29 -0
  164. data/lib/mml/v3/elementary_functions.rb +145 -0
  165. data/lib/mml/v3/functions.rb +35 -0
  166. data/lib/mml/v3/linear_algebra.rb +50 -0
  167. data/lib/mml/v3/logic.rb +40 -0
  168. data/lib/mml/v3/maction.rb +1 -1
  169. data/lib/mml/v3/math.rb +7 -1
  170. data/lib/mml/v3/mi.rb +1 -0
  171. data/lib/mml/v3/mn.rb +1 -0
  172. data/lib/mml/v3/mo.rb +1 -0
  173. data/lib/mml/v3/mrow.rb +1 -0
  174. data/lib/mml/v3/ms.rb +1 -0
  175. data/lib/mml/v3/mstyle.rb +1 -0
  176. data/lib/mml/v3/mtext.rb +1 -0
  177. data/lib/mml/v3/relations.rb +50 -0
  178. data/lib/mml/v3/sets.rb +70 -0
  179. data/lib/mml/v3/statistics.rb +40 -0
  180. data/lib/mml/v3/vector_calculus.rb +25 -0
  181. data/lib/mml/v3.rb +25 -0
  182. data/lib/mml/v4/a.rb +4 -3
  183. data/lib/mml/v4/annotation.rb +10 -0
  184. data/lib/mml/v4/annotation_xml.rb +14 -0
  185. data/lib/mml/v4/apply.rb +9 -0
  186. data/lib/mml/v4/arith.rb +93 -0
  187. data/lib/mml/v4/calculus.rb +25 -0
  188. data/lib/mml/v4/cbytes.rb +9 -0
  189. data/lib/mml/v4/cerror.rb +9 -0
  190. data/lib/mml/v4/ci.rb +9 -0
  191. data/lib/mml/v4/cn.rb +9 -0
  192. data/lib/mml/v4/common_elements.rb +33 -0
  193. data/lib/mml/v4/constants.rb +65 -0
  194. data/lib/mml/v4/constructs.rb +49 -0
  195. data/lib/mml/v4/cs.rb +9 -0
  196. data/lib/mml/v4/csymbol.rb +9 -0
  197. data/lib/mml/v4/deprecated_content.rb +25 -0
  198. data/lib/mml/v4/elementary_functions.rb +118 -0
  199. data/lib/mml/v4/factorof.rb +9 -0
  200. data/lib/mml/v4/functions.rb +30 -0
  201. data/lib/mml/v4/limit.rb +9 -0
  202. data/lib/mml/v4/linear_algebra.rb +41 -0
  203. data/lib/mml/v4/logic.rb +33 -0
  204. data/lib/mml/v4/maction.rb +1 -2
  205. data/lib/mml/v4/maligngroup.rb +0 -1
  206. data/lib/mml/v4/malignmark.rb +0 -1
  207. data/lib/mml/v4/math.rb +1 -1
  208. data/lib/mml/v4/menclose.rb +0 -1
  209. data/lib/mml/v4/merror.rb +0 -1
  210. data/lib/mml/v4/mfenced.rb +0 -1
  211. data/lib/mml/v4/mfrac.rb +0 -1
  212. data/lib/mml/v4/mfraction.rb +0 -1
  213. data/lib/mml/v4/mglyph.rb +0 -1
  214. data/lib/mml/v4/mi.rb +1 -1
  215. data/lib/mml/v4/mlabeledtr.rb +0 -1
  216. data/lib/mml/v4/mlongdiv.rb +0 -1
  217. data/lib/mml/v4/mmultiscripts.rb +0 -1
  218. data/lib/mml/v4/mn.rb +1 -1
  219. data/lib/mml/v4/mo.rb +1 -1
  220. data/lib/mml/v4/mover.rb +0 -1
  221. data/lib/mml/v4/mpadded.rb +0 -1
  222. data/lib/mml/v4/mphantom.rb +0 -1
  223. data/lib/mml/v4/mprescripts.rb +0 -1
  224. data/lib/mml/v4/mroot.rb +0 -1
  225. data/lib/mml/v4/mrow.rb +1 -1
  226. data/lib/mml/v4/ms.rb +1 -1
  227. data/lib/mml/v4/mscarries.rb +0 -1
  228. data/lib/mml/v4/mscarry.rb +0 -1
  229. data/lib/mml/v4/msgroup.rb +0 -1
  230. data/lib/mml/v4/msline.rb +0 -1
  231. data/lib/mml/v4/mspace.rb +0 -1
  232. data/lib/mml/v4/msqrt.rb +0 -1
  233. data/lib/mml/v4/msrow.rb +0 -1
  234. data/lib/mml/v4/mstack.rb +0 -1
  235. data/lib/mml/v4/mstyle.rb +1 -1
  236. data/lib/mml/v4/msub.rb +0 -1
  237. data/lib/mml/v4/msubsup.rb +0 -1
  238. data/lib/mml/v4/msup.rb +0 -1
  239. data/lib/mml/v4/mtable.rb +0 -1
  240. data/lib/mml/v4/mtd.rb +0 -1
  241. data/lib/mml/v4/mtext.rb +1 -1
  242. data/lib/mml/v4/mtr.rb +0 -1
  243. data/lib/mml/v4/munder.rb +0 -1
  244. data/lib/mml/v4/munderover.rb +0 -1
  245. data/lib/mml/v4/none.rb +0 -1
  246. data/lib/mml/v4/relations.rb +37 -0
  247. data/lib/mml/v4/semantics.rb +0 -1
  248. data/lib/mml/v4/sets.rb +57 -0
  249. data/lib/mml/v4/statistics.rb +33 -0
  250. data/lib/mml/v4/tendsto.rb +9 -0
  251. data/lib/mml/v4/vector_calculus.rb +21 -0
  252. data/lib/mml/v4.rb +421 -44
  253. data/lib/mml/version.rb +1 -1
  254. data/lib/mml/versioned_parser.rb +1 -1
  255. data/lib/mml.rb +3 -1
  256. data/reference-docs/mathml-source/pubtext/mathmlspec.dtd +150 -0
  257. data/reference-docs/mathml-source/pubtext/xmlspec.dtd +2649 -0
  258. data/reference-docs/mathml-source/readme.txt +40 -0
  259. data/reference-docs/mathml-source/run +296 -0
  260. data/reference-docs/mathml-source/style/html/html2xhtml.xsl +216 -0
  261. data/reference-docs/mathml-source/style/html/images.xsl +98 -0
  262. data/reference-docs/mathml-source/style/html/mml6.xsl +1156 -0
  263. data/reference-docs/mathml-source/style/html/mmldiff.xsl +566 -0
  264. data/reference-docs/mathml-source/style/html/mmlspec.xsl +2531 -0
  265. data/reference-docs/mathml-source/style/html/slices-common.xsl +312 -0
  266. data/reference-docs/mathml-source/style/html/slices.xsl +48 -0
  267. data/reference-docs/mathml-source/style/html/xmlspec.xsl +2542 -0
  268. data/reference-docs/mathml-source/style/pdf/mathmlspec.xsl +2510 -0
  269. data/reference-docs/mathml-source/xml/changes.xml +773 -0
  270. data/reference-docs/mathml-source/xml/character-set.xml +1011 -0
  271. data/reference-docs/mathml-source/xml/content-element-def.xml +6143 -0
  272. data/reference-docs/mathml-source/xml/content-markup.xml +8178 -0
  273. data/reference-docs/mathml-source/xml/contributors.xml +425 -0
  274. data/reference-docs/mathml-source/xml/dom-bindings.xml +20 -0
  275. data/reference-docs/mathml-source/xml/dom-intro.xml +114 -0
  276. data/reference-docs/mathml-source/xml/fundamentals.xml +1646 -0
  277. data/reference-docs/mathml-source/xml/glossary.xml +519 -0
  278. data/reference-docs/mathml-source/xml/interface.xml +1096 -0
  279. data/reference-docs/mathml-source/xml/introduction.xml +724 -0
  280. data/reference-docs/mathml-source/xml/mathml-css-sample.xml +304 -0
  281. data/reference-docs/mathml-source/xml/mathml-dom.xml +3813 -0
  282. data/reference-docs/mathml-source/xml/mathml-spec.xml +356 -0
  283. data/reference-docs/mathml-source/xml/mixing.xml +982 -0
  284. data/reference-docs/mathml-source/xml/operator-dict.xml +551 -0
  285. data/reference-docs/mathml-source/xml/parsing.xml +2565 -0
  286. data/reference-docs/mathml-source/xml/presentation-markup.xml +6834 -0
  287. data/reference-docs/mathml-source/xml/references.xml +323 -0
  288. data/reference-docs/mathml-source/xml/validation-grammar.xml +877 -0
  289. data/schemas/README.adoc +17 -0
  290. data/schemas/mathml2/common/common-attribs.xsd +41 -0
  291. data/schemas/mathml2/common/math.xsd +126 -0
  292. data/schemas/mathml2/common/xlink-href.xsd +20 -0
  293. data/schemas/mathml2/content/CVS/Entries +16 -0
  294. data/schemas/mathml2/content/CVS/Repository +1 -0
  295. data/schemas/mathml2/content/CVS/Root +1 -0
  296. data/schemas/mathml2/content/arith.xsd +90 -0
  297. data/schemas/mathml2/content/calculus.xsd +146 -0
  298. data/schemas/mathml2/content/common-attrib.xsd +30 -0
  299. data/schemas/mathml2/content/constants.xsd +83 -0
  300. data/schemas/mathml2/content/constructs.xsd +260 -0
  301. data/schemas/mathml2/content/elementary-functions.xsd +117 -0
  302. data/schemas/mathml2/content/functions.xsd +73 -0
  303. data/schemas/mathml2/content/linear-algebra.xsd +173 -0
  304. data/schemas/mathml2/content/logic.xsd +53 -0
  305. data/schemas/mathml2/content/relations.xsd +55 -0
  306. data/schemas/mathml2/content/semantics.xsd +85 -0
  307. data/schemas/mathml2/content/sets.xsd +236 -0
  308. data/schemas/mathml2/content/statistics.xsd +136 -0
  309. data/schemas/mathml2/content/tokens.xsd +120 -0
  310. data/schemas/mathml2/content/tokens.xsd.~1.3.~ +119 -0
  311. data/schemas/mathml2/content/vector-calculus.xsd +88 -0
  312. data/schemas/mathml2/mathml2.xsd +59 -0
  313. data/schemas/mathml2/presentation/action.xsd +44 -0
  314. data/schemas/mathml2/presentation/characters.xsd +37 -0
  315. data/schemas/mathml2/presentation/common-attribs.xsd +113 -0
  316. data/schemas/mathml2/presentation/common-types.xsd +103 -0
  317. data/schemas/mathml2/presentation/error.xsd +40 -0
  318. data/schemas/mathml2/presentation/layout.xsd +195 -0
  319. data/schemas/mathml2/presentation/scripts.xsd +186 -0
  320. data/schemas/mathml2/presentation/space.xsd +52 -0
  321. data/schemas/mathml2/presentation/style.xsd +69 -0
  322. data/schemas/mathml2/presentation/table.xsd +216 -0
  323. data/schemas/mathml2/presentation/tokens.xsd +124 -0
  324. data/schemas/mathml3/mathml3-common.xsd +99 -0
  325. data/schemas/mathml3/mathml3-content.xsd +684 -0
  326. data/schemas/mathml3/mathml3-presentation.xsd +2151 -0
  327. data/schemas/mathml3/mathml3-strict-content.xsd +186 -0
  328. data/schemas/mathml3/mathml3.xsd +9 -0
  329. data/schemas/mathml4/mathml4-content.rnc +382 -0
  330. data/schemas/mathml4/mathml4-core.rnc +361 -0
  331. data/schemas/mathml4/mathml4-presentation.rnc +358 -0
  332. data/schemas/mathml4/mathml4-strict-content.rnc +86 -0
  333. data/schemas/mathml4/mathml4.rnc +21 -0
  334. data/schemas/mathml4/mathml4.rnc.1 +21 -0
  335. data/schemas/mathml4/mathml4.rng +37 -0
  336. metadata +249 -2
@@ -0,0 +1,40 @@
1
+
2
+ The sources for the MathML specification
3
+ the file run in this directory is a bash shell script
4
+ which details the commands required to generate the MathML
5
+ specificaton. It does not use any advanced bash features and
6
+ could be easily modified to other environments such as the
7
+ windows command line.
8
+
9
+ It requires:
10
+
11
+ An XML validator
12
+ rxp is used in the script
13
+ this is not used for production but just to check the input
14
+ and generated output is valid.
15
+
16
+ An SGML Parser
17
+ nsgmls is used in the script.
18
+ Again this is not used for production, but just to check that all
19
+ generated HTML is valid.
20
+
21
+
22
+ The unicode.xml and its dtd, charlist.dtd, available from
23
+ http://www.w3.org/Math/characters
24
+ These are used as the source for the character tables in chapter 6.
25
+ In addition, to generate the diff-marked version of byalpha.html
26
+ showing differences from the MathML 2.0 rec, you will need the version
27
+ of unicode.xml distributed in the XML source zip file linked from that
28
+ recommendation.
29
+
30
+
31
+ An XSLT system.
32
+ The free java implementation saxon is used in the script.
33
+
34
+ pdflatex to generate the PDF versions of the specification.
35
+ The documents use the rapport3 LaTeX class file which should be part
36
+ of most TeX distributions but is available from TeX archives as part of
37
+ the ntgclass distribution. It also uses several commonly available
38
+ package files, hyperref, url,ae,pslatex.
39
+
40
+
@@ -0,0 +1,296 @@
1
+ #!/bin/bash
2
+
3
+ SOURCE=xml
4
+ HSTYLE=style/html
5
+ PSTYLE=style/pdf
6
+ W3CMATH=../..
7
+
8
+ # echo validate source
9
+ # rxp -sxV $SOURCE/mathml-spec.xml
10
+ # echo make html version
11
+ #
12
+ # saxon $SOURCE/mathml-spec.xml $HSTYLE/mmldiff.xsl show.diff.markup=0
13
+ #
14
+ # echo make diff marked html version
15
+ # saxon ../spec/xml/mathml-spec.xml $HSTYLE/mmldiff.xsl
16
+ # exit
17
+
18
+
19
+ echo validate sources
20
+ rxp -sxV $SOURCE/mathml-spec.xml
21
+
22
+ echo ""
23
+ echo ""
24
+ echo make standard html version
25
+ saxon $SOURCE/mathml-spec.xml $HSTYLE/mmldiff.xsl show.diff.markup=0
26
+
27
+
28
+ echo make diff marked html version
29
+ saxon ../spec/xml/mathml-spec.xml $HSTYLE/mmldiff.xsl
30
+
31
+ echo make xhtml stylesheets
32
+ echo " " mmldiff
33
+ saxon -o $HSTYLE/xmmldiff.xsl $HSTYLE/mmldiff.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd stylesheet.pi="/Math/XSL/mathml.xsl"
34
+ echo " " mmlspec
35
+ saxon -o $HSTYLE/xmmlspec.xsl $HSTYLE/mmlspec.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd stylesheet.pi="/Math/XSL/mathml.xsl"
36
+ echo " " slices
37
+ saxon -o $HSTYLE/xslices.xsl $HSTYLE/slices.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd
38
+ echo " " slices-common
39
+ saxon -o $HSTYLE/xslices-common.xsl $HSTYLE/slices-common.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd
40
+ echo " " xmlspec
41
+ saxon -o $HSTYLE/xxmlspec.xsl $HSTYLE/xmlspec.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd
42
+
43
+
44
+ echo make xhtml version
45
+ saxon $SOURCE/mathml-spec.xml $HSTYLE/mathmlx.xsl
46
+
47
+ #echo ""
48
+ #echo ""
49
+ #echo Chapter 6 Tables
50
+ #saxon ../../characters/unicode.xml $HSTYLE/mml6.xsl status=REC
51
+ #
52
+ #echo "Chapter 6 diff marked (byalpha) Tables"
53
+ #saxon ../../characters/unicode.xml $HSTYLE/mml6.xsl diff=1 ext="-d.html" status=REC
54
+ #
55
+ #echo xhtml mml6 stylesheet
56
+ #saxon -o $HSTYLE/xmml6.xsl $HSTYLE/mml6.xsl $HSTYLE/html2xhtml.xsl system-dtd=mathml.dtd stylesheet.pi="/Math/XSL/mathml.xsl" status=REC
57
+ #
58
+ #echo Chapter 6 xhtml Tables
59
+ #saxon ../../characters/unicode.xml $HSTYLE/xmml6.xsl ext=.xml
60
+
61
+ echo ""
62
+ echo ""
63
+ echo validate generated xhtml+mathml
64
+ for i in *.xml ;do echo -n $i ""; rxp -sxV $i ;done
65
+
66
+ echo ""
67
+ echo validate html
68
+ for i in *.html
69
+ do
70
+ echo -n $i ""
71
+
72
+ nsgmls -s -E4 $i
73
+ done
74
+
75
+
76
+ #echo ""
77
+ #mv images.tex images.old
78
+ #saxon -o images.tex $SOURCE/mathml-spec.xml $HSTYLE/images.xsl
79
+ #if (cmp images.tex images.old)
80
+ #then
81
+ #echo images same
82
+ #else
83
+ #echo images differ
84
+ #latex images.tex
85
+ #echo ""
86
+ #echo ""
87
+ #echo running generated images script
88
+ #bash images.sh
89
+ #fi
90
+
91
+
92
+ echo ""
93
+ echo PDF
94
+ echo generate TeX files
95
+ saxon $SOURCE/mathml-spec.xml $PSTYLE/mathmlspec.xsl
96
+
97
+ if test ! -f w3c_home.png
98
+ then
99
+ echo copy W3C logo
100
+ cp $SOURCE/../image/w3c_home.png .
101
+ fi
102
+
103
+ if test ! -f braids.png
104
+ then
105
+ echo copy braids
106
+ cp $SOURCE/../image/braids.png .
107
+ fi
108
+
109
+ if test ! -f intersect.png
110
+ then
111
+ echo copy intersect
112
+ cp $SOURCE/../image/intersect.png .
113
+ fi
114
+
115
+ # use nested if rather than while to limit looping
116
+ echo generate mathml-p.pdf
117
+ pdflatex \\batchmode \\input mathml-p.tex
118
+ if (grep -i rerun mathml-p.log)
119
+ then
120
+ pdflatex \\batchmode \\input mathml-p.tex
121
+ if (grep -i rerun mathml-p.log)
122
+ then
123
+ pdflatex \\batchmode \\input mathml-p.tex
124
+ if (grep -i rerun mathml-p.log)
125
+ then
126
+ pdflatex \\batchmode \\input mathml-p.tex
127
+ fi
128
+ fi
129
+ fi
130
+
131
+ echo generate mathml-s.pdf
132
+ pdflatex \\batchmode \\input mathml-s.tex
133
+ if (grep -i rerun mathml-s.log)
134
+ then
135
+ pdflatex \\batchmode \\input mathml-s.tex
136
+ if (grep -i rerun mathml-s.log)
137
+ then
138
+ pdflatex \\batchmode \\input mathml-s.tex
139
+ if (grep -i rerun mathml-s.log)
140
+ then
141
+ pdflatex \\batchmode \\input mathml-s.tex
142
+ fi
143
+ fi
144
+ fi
145
+
146
+
147
+
148
+ echo grep latex warnings
149
+ grep "^\!" mathml-?.log
150
+ grep -i warning mathml-?.log | grep -v bookmarks | grep -v "Font Warning"
151
+ grep -i rerun mathml-?.log
152
+
153
+
154
+ echo ""
155
+ echo make directories for zip files
156
+
157
+
158
+ mkdir mathml-html 2> /dev/null
159
+
160
+
161
+ if test ! -d mathml-html/image
162
+ then
163
+ echo cp image
164
+ cp -r image mathml-html
165
+ else
166
+ echo "(not) assuming mathml-html/image up to date"
167
+ cp -r image mathml-html
168
+ fi
169
+
170
+
171
+ cp $SOURCE/../image/w3c_home.png mathml-html/image
172
+ cp $HSTYLE/base.css mathml-html
173
+
174
+ if test ! -d mathml-html/glyphs
175
+ then
176
+ echo cp glyphs
177
+ cp -r glyphs mathml-html
178
+ else
179
+ echo "(not) assuming mathml-html/glyphs up to date"
180
+ cp -r glyphs mathml-html
181
+ fi
182
+
183
+ echo cp dtd and xsl
184
+ cp $W3CMATH/DTD/mathml2/xhtml-math11-f.dtd mathml-html
185
+ cp $W3CMATH/XSL/*.xsl mathml-html
186
+
187
+ echo sed xml
188
+ sed \
189
+ -e "s@/Math/DTD/mathml2/@@" \
190
+ mathml.dtd > mathml-html/mathml.dtd
191
+
192
+ for i in *.xml
193
+ do
194
+ sed \
195
+ -e "s@/Math/XSL/mathml.xsl@mathml.xsl@" \
196
+ -e "s@http://www.w3.org/StyleSheets/TR.*css@base.css@" \
197
+ -e "s@http://www.w3.org/Icons/w3c_home@image/w3c_home.png@" \
198
+ $i > mathml-html/$i
199
+ done
200
+
201
+ echo sed html
202
+
203
+ for i in *.html
204
+ do
205
+ sed \
206
+ -e "s@http://www.w3.org/StyleSheets/TR.*css@base.css@" \
207
+ -e "s@http://www.w3.org/Icons/w3c_home@image/w3c_home.png@" \
208
+ $i > mathml-html/$i
209
+ done
210
+
211
+
212
+ mkdir mathml-source 2> /dev/null
213
+ mkdir mathml-source/xml 2> /dev/null
214
+ mkdir mathml-source/pubtext 2> /dev/null
215
+ mkdir mathml-source/style 2> /dev/null
216
+ mkdir mathml-source/style/html 2> /dev/null
217
+ mkdir mathml-source/style/pdf 2> /dev/null
218
+
219
+
220
+ cp $SOURCE/{changes.xml,fundamentals.xml,operator-dict.xml,\
221
+ character-set.xml,glossary.xml,parsing.xml,\
222
+ content-element-def.xml,interface.xml,presentation-markup.xml,\
223
+ content-markup.xml,introduction.xml,references.xml,\
224
+ contributors.xml,mathml-css-sample.xml,\
225
+ mathml-dom.xml,validation-grammar.xml,\
226
+ dom-bindings.xml,mathml-spec.xml,\
227
+ dom-intro.xml,mixing.xml} \
228
+ mathml-source/xml
229
+
230
+ cp $SOURCE/../pubtext/{mathmlspec.dtd,xmlspec.dtd} mathml-source/pubtext
231
+
232
+ cp $HSTYLE/{mmldiff.xsl,html2xhtml.xsl,mmlspec.xsl,slices.xsl,slices-common.xsl,xmlspec.xsl,mml6.xsl,images.xsl} mathml-source/style/html
233
+ cp $PSTYLE/mathmlspec.xsl mathml-source/style/pdf
234
+
235
+
236
+ echo sed run
237
+ sed \
238
+ -e "s@=@=@" \
239
+ -e "s/exit/exit/" \
240
+ run > mathml-source/run
241
+
242
+
243
+ echo readme.txt
244
+ echo "
245
+ The sources for the MathML specification
246
+ the file "run" in this directory is a bash shell script
247
+ which details the commands required to generate the MathML
248
+ specificaton. It does not use any advanced bash features and
249
+ could be easily modified to other environments such as the
250
+ windows command line.
251
+
252
+ It requires:
253
+
254
+ An XML validator
255
+ rxp is used in the script
256
+ this is not used for production but just to check the input
257
+ and generated output is valid.
258
+
259
+ An SGML Parser
260
+ nsgmls is used in the script.
261
+ Again this is not used for production, but just to check that all
262
+ generated HTML is valid.
263
+
264
+
265
+ The unicode.xml and its dtd, charlist.dtd, available from
266
+ http://www.w3.org/Math/characters
267
+ These are used as the source for the character tables in chapter 6.
268
+ In addition, to generate the diff-marked version of byalpha.html
269
+ showing differences from the MathML 2.0 rec, you will need the version
270
+ of unicode.xml distributed in the XML source zip file linked from that
271
+ recommendation.
272
+
273
+
274
+ An XSLT system.
275
+ The free java implementation saxon is used in the script.
276
+
277
+ pdflatex to generate the PDF versions of the specification.
278
+ The documents use the rapport3 LaTeX class file which should be part
279
+ of most TeX distributions but is available from TeX archives as part of
280
+ the ntgclass distribution. It also uses several commonly available
281
+ package files, hyperref, url,ae,pslatex.
282
+
283
+ " > mathml-source/readme.txt
284
+
285
+ echo ""
286
+ echo mathml-source.zip
287
+ zip -qr mathml-source.zip mathml-source
288
+
289
+ echo mathml-html.zip
290
+ zip -qr mathml-html.zip mathml-html
291
+
292
+
293
+
294
+
295
+ echo ""
296
+ echo run ends here
@@ -0,0 +1,216 @@
1
+ <!--
2
+
3
+ html2xhtml.xsl: HTML to XHTML XSL stylesheet converter
4
+ ========================================================
5
+
6
+ $Id: html2xhtml.xsl,v 1.9 2003/01/27 12:55:43 davidc Exp $
7
+
8
+ Copyright 1999 David Carlisle NAG Ltd
9
+
10
+
11
+ The following stylesheet takes as input an XSL stylesheet that writes
12
+ HTML, and produces a stylesheet that writes XML that hopefully matches the
13
+ XHTML specification. (It does not check that the output matches the DTD.)
14
+ It does the following things:
15
+
16
+ * Adds a DOCTYPE giving FPI and URL for one of the three flavours
17
+ of XHTML1. (Transitional unless the original stylesheet asked for
18
+ Frameset or Strict HTML.)
19
+ If the system-dtd parameter is set then instead of the canonical
20
+ XHTML PUBLIC DTD, a SYSTEM declaration is given to the supplied URL.
21
+
22
+ * Writes all HTML elements and attributes as lowercase, with
23
+ elements being written in the XHTML namespace.
24
+
25
+ * Writes canonically empty elements such as <BR> as
26
+ <br class="html-compat"/> .
27
+ (Appendix C recommends <br /> rather than <br/> but an XSL stylesheet
28
+ has no control over the concrete syntax of the linearisation, so
29
+ adding an attribute is probably the best that can be done. (No attribute
30
+ is added if the element already has attributes.)
31
+
32
+ * Changes the output method from html to xml in xsl:output
33
+ (and also in the xt:document extension element).
34
+
35
+ * Forces a line break after opening tags of non elements which are
36
+ not canonically empty, to ensure that they are never written with XML
37
+ empty syntax, so
38
+ <p>
39
+ </p>
40
+ not
41
+ <p/>
42
+
43
+ * Copies any elements from XSL or XT namespaces through to the new
44
+ stylesheet.
45
+
46
+
47
+ * Duplicates name attributes to id unless element already has id.
48
+
49
+ * Adds meta element to head specifying utf-8 encoding.
50
+
51
+ -->
52
+
53
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
54
+ xmlns:saxon="http://icl.com/saxon"
55
+ xmlns:xt="http://www.jclark.com/xt"
56
+ xmlns="http://www.w3.org/1999/xhtml"
57
+ xmlns:lxslt="http://xml.apache.org/xslt"
58
+ xmlns:xalanredirect="org.apache.xalan.xslt.extensions.Redirect"
59
+ version="1.0"
60
+ >
61
+
62
+ <xsl:output method="xml" indent="no"/>
63
+
64
+ <xsl:param name="system-dtd" />
65
+ <xsl:param name="stylesheet.pi" select="''"/>
66
+
67
+ <xsl:template match="xsl:*|xt:*|saxon:*|lxslt:*|xalanredirect:*">
68
+ <xsl:copy>
69
+ <xsl:copy-of select="@*"/>
70
+ <xsl:apply-templates/>
71
+ </xsl:copy>
72
+ </xsl:template>
73
+
74
+ <xsl:template match="xsl:attribute[@name='lang']">
75
+ <xsl:copy>
76
+ <xsl:copy-of select="@*"/>
77
+ <xsl:attribute name="name">xml:lang</xsl:attribute>
78
+ <xsl:apply-templates/>
79
+ </xsl:copy>
80
+ </xsl:template>
81
+
82
+ <xsl:template match="xsl:output|xt:document|saxon:output">
83
+ <xsl:copy>
84
+ <xsl:attribute name="method">xml</xsl:attribute>
85
+ <xsl:choose>
86
+ <xsl:when test="$system-dtd">
87
+ <xsl:attribute name="doctype-system">
88
+ <xsl:value-of select="$system-dtd"/>
89
+ </xsl:attribute>
90
+ </xsl:when>
91
+ <xsl:when test="contains(@doctype-public,'Frameset')">
92
+ <xsl:attribute name="doctype-public">
93
+ <xsl:text>-//W3C//DTD XHTML 1.0 Frameset//EN</xsl:text>
94
+ </xsl:attribute>
95
+ <xsl:attribute name="doctype-system">
96
+ <xsl:text>http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd</xsl:text>
97
+ </xsl:attribute>
98
+ </xsl:when>
99
+ <xsl:when test="contains(@doctype-public,'Strict')">
100
+ <xsl:attribute name="doctype-public">
101
+ <xsl:text>-//W3C//DTD XHTML 1.0 Strict//EN</xsl:text>
102
+ </xsl:attribute>
103
+ <xsl:attribute name="doctype-system">
104
+ <xsl:text>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</xsl:text>
105
+ </xsl:attribute>
106
+ </xsl:when>
107
+ <xsl:otherwise>
108
+ <xsl:attribute name="doctype-public">
109
+ <xsl:text>-//W3C//DTD XHTML 1.0 Transitional//EN</xsl:text>
110
+ </xsl:attribute>
111
+ <xsl:attribute name="doctype-system">
112
+ <xsl:text>http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd</xsl:text>
113
+ </xsl:attribute>
114
+ </xsl:otherwise>
115
+ </xsl:choose>
116
+ <xsl:attribute name="indent">yes</xsl:attribute>
117
+ <xsl:copy-of select="@*[not(
118
+ name(.)='method' or
119
+ name(.)='doctype-public' or
120
+ name(.)='doctype-system' or
121
+ name(.)='indent'
122
+ ) ]"/>
123
+ <xsl:apply-templates/>
124
+ </xsl:copy>
125
+ </xsl:template>
126
+
127
+ <xsl:template match="xsl:import|xsl:include">
128
+ <xsl:copy>
129
+ <xsl:copy-of select="@*"/>
130
+ <xsl:attribute name="href">x<xsl:value-of select="@href"/></xsl:attribute>
131
+ </xsl:copy>
132
+ </xsl:template>
133
+
134
+ <xsl:template match="xsl:element[contains(@name,'{')]">
135
+ <xsl:copy>
136
+ <xsl:attribute name="namespace">http://www.w3.org/1999/xhtml</xsl:attribute>
137
+ <xsl:copy-of select="@*"/>
138
+ <xsl:apply-templates/>
139
+ </xsl:copy>
140
+ </xsl:template>
141
+
142
+ <xsl:template match="*|xsl:element">
143
+ <xsl:variable name="n">
144
+ <xsl:choose>
145
+ <xsl:when test="self::xsl:element">
146
+ <xsl:value-of select="translate(@name,
147
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
148
+ 'abcdefghijklmnopqrstuvwxyz')"/>
149
+ </xsl:when>
150
+ <xsl:otherwise>
151
+ <xsl:value-of select="translate(local-name(.),
152
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
153
+ 'abcdefghijklmnopqrstuvwxyz')"/>
154
+ </xsl:otherwise>
155
+ </xsl:choose>
156
+ </xsl:variable>
157
+ <xsl:if test="$n='html' and string($stylesheet.pi)">
158
+ <xsl:text>&#10;</xsl:text>
159
+ <xsl:element name="xsl:processing-instruction">
160
+ <xsl:attribute name="name">xml-stylesheet</xsl:attribute
161
+ >type="text/xsl" href="<xsl:copy-of
162
+ select="$stylesheet.pi"/>"</xsl:element>
163
+ </xsl:if>
164
+ <xsl:element
165
+ name="{$n}"
166
+ namespace="http://www.w3.org/1999/xhtml">
167
+ <xsl:for-each select="self::*[not(self::xsl:element)]/@* |
168
+ self::xsl:element/@use-attribute-sets">
169
+ <xsl:variable name="name" select="translate(local-name(.),
170
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ',
171
+ 'abcdefghijklmnopqrstuvwxyz')"/>
172
+ <xsl:if test="($name != 'name') and ($name != 'align') and ($name != 'lang')">
173
+ <xsl:attribute name="{$name}">
174
+ <xsl:value-of select="."/>
175
+ </xsl:attribute>
176
+ </xsl:if>
177
+
178
+ </xsl:for-each>
179
+ <xsl:if test="@lang">
180
+ <xsl:attribute name="xml:lang"><xsl:value-of select="@lang"/></xsl:attribute>
181
+ </xsl:if>
182
+ <xsl:if test="@align and not(@style)">
183
+ <xsl:attribute name="style">vertical-align:<xsl:value-of select="@align"/></xsl:attribute>
184
+ </xsl:if>
185
+ <xsl:if test="@name and not(@id)">
186
+ <xsl:attribute name="id"><xsl:value-of select="@name"/></xsl:attribute>
187
+ </xsl:if>
188
+ <xsl:if test="@NAME and not(@id)">
189
+ <xsl:attribute name="id"><xsl:value-of select="@NAME"/></xsl:attribute>
190
+ </xsl:if>
191
+ <xsl:variable name="content">
192
+ <xsl:apply-templates/>
193
+ </xsl:variable>
194
+ <xsl:choose>
195
+ <xsl:when test="$n='br' or $n='hr'
196
+ or $n='link' or $n='img' or $n='base' or $n='meta'">
197
+ <xsl:if test="not(@*) and not(xsl:attribute)">
198
+ <xsl:attribute name="class">html-compat</xsl:attribute>
199
+ </xsl:if>
200
+ <xsl:copy-of select="$content"/>
201
+ </xsl:when>
202
+ <xsl:when test="string-length($content)>0">
203
+ <xsl:copy-of select="$content"/>
204
+ </xsl:when>
205
+ <xsl:otherwise>
206
+ <xsl:element name="xsl:text" xml:space='preserve'>&#xA;</xsl:element>
207
+ <xsl:copy-of select="$content"/>
208
+ </xsl:otherwise>
209
+ </xsl:choose>
210
+ </xsl:element>
211
+ </xsl:template>
212
+
213
+
214
+ </xsl:stylesheet>
215
+
216
+
@@ -0,0 +1,98 @@
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ $Id: images.xsl,v 1.4 2003/09/15 13:51:26 davidc Exp $
4
+
5
+ images.xsl David Carlisle
6
+ -->
7
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
8
+ xmlns:saxon="http://icl.com/saxon"
9
+ extension-element-prefixes="saxon"
10
+ version="1.0">
11
+
12
+ <xsl:output method="text" />
13
+
14
+
15
+ <xsl:template match="/">
16
+ \batchmode
17
+ \documentclass{article}
18
+ \usepackage{amstext,amsfonts,amssymb,color,graphicx}
19
+ \pagestyle{empty}
20
+ \let\normalshape\upshape
21
+ \makeatletter
22
+ \definecolor{background}{rgb}{1.0,1.0,1.0}
23
+ %\pagecolor{background}
24
+ \let\ImageFontsize\large
25
+ \def\ImagePadding{1pt}
26
+ \def\ImageWidth{120mm}
27
+ \newsavebox{\FragmentBox}
28
+ \def\PaddedImage#1{%
29
+ \bgroup\ImageFontsize \savebox{\FragmentBox}{$#1$}%
30
+ \@tempdima\ht\FragmentBox \@tempdimb\dp\FragmentBox
31
+ \ifdim\@tempdima>\@tempdimb
32
+ \dp\FragmentBox\@tempdima
33
+ \else
34
+ \ht\FragmentBox\@tempdimb
35
+ \fi
36
+ \color{background}\fboxsep\ImagePadding%
37
+ \fbox{\color[rgb]{0.0,0.0,0.0}\box\FragmentBox}\egroup
38
+ \newpage}
39
+ \def\UnpaddedImage#1{%
40
+ \bgroup\ImageFontsize \savebox{\FragmentBox}{$#1$}%
41
+ %%%DOES THIS CAUSE PROBLEMS? \dp\FragmentBox\z@
42
+ \color{background}\fboxsep\ImagePadding%
43
+ \fbox{\color[rgb]{0.0,0.0,0.0}\box\FragmentBox}\egroup
44
+ \newpage}
45
+ \def\FDImage#1{%
46
+ \UnpaddedImage{\displaystyle #1}}
47
+ \makeatother
48
+ \renewcommand{\int}{\intop}
49
+ \newcommand{\Nset}{\mathbb{N}}
50
+ \newcommand{\Zset}{\mathbb{Z}}
51
+ \newcommand{\Qset}{\mathbb{Q}}
52
+ \newcommand{\Rset}{\mathbb{R}}
53
+ \newcommand{\Cset}{\mathbb{C}}
54
+ \newcommand{\xor}{\mathbin{\mathrm{xor}}}
55
+ \newcommand{\mod}{\mathbin{\mathrm{mod}}}
56
+ \newcommand{\diffd}{\mathrm{d}}
57
+ \newcommand{\eulere}{\mathrm{e}}
58
+ \newcommand{\ii}{\mathrm{i}}
59
+ \newdimen\boxwd
60
+ \newcommand{\widearrow}[1]{%
61
+ \setbox0=\hbox{$\mathsurround0pt \scriptstyle\;\;#1\;\;$}\boxwd=\wd0%
62
+ \mathrel{\mathop{\hbox to\boxwd{\rightarrowfill}}\limits_{#1}}}
63
+ \newwrite\img
64
+ \immediate\openout\img=images.sh
65
+ \newcount\n
66
+ \n=0
67
+ \begin{document}
68
+
69
+ \immediate\write\img{^^J%
70
+ dvips -Ppdf -j -E -i -S 1 images}
71
+
72
+ <xsl:for-each select="//graphic[@diff='add' or @diff='chg']">
73
+
74
+ \advance\n1
75
+ \immediate\write\img{^^J%
76
+ echo <xsl:value-of select="@source"/>^^J%
77
+ %convert -crop 0x0 -density 110x110 -transparent white eps:images.%
78
+ convert -crop 0x0 -density 110x110 eps:images.%
79
+ \ifnum \n &lt;100 0\fi
80
+ \ifnum \n &lt;10 0\fi
81
+ \the\n\space <xsl:value-of select="@source"/>}
82
+ <xsl:choose>
83
+ <xsl:when test="@role='inline' and @align='bottom'">
84
+ \UnpaddedImage{<xsl:value-of select="@alt"/>}
85
+ </xsl:when>
86
+ <xsl:when test="@role='inline'">
87
+ \PaddedImage{<xsl:value-of select="@alt"/>}
88
+ </xsl:when>
89
+ <xsl:otherwise>
90
+ \FDImage{<xsl:value-of select="@alt"/>}
91
+ </xsl:otherwise>
92
+ </xsl:choose>
93
+ </xsl:for-each>
94
+
95
+ \end{document}
96
+ </xsl:template>
97
+
98
+ </xsl:stylesheet>