RelaxNG/publidoc.rnc
changeset 460 7e0c719c9526
parent 448 9bc794bf36b0
child 476 6c30a3543cd8
--- a/RelaxNG/publidoc.rnc	dim. août 19 23:56:14 2018 +0200
+++ b/RelaxNG/publidoc.rnc	jeu. août 23 23:53:03 2018 +0200
@@ -982,7 +982,7 @@
 
 math.content =
    mixed { sup* & sub* & var* & warning* }
- | latex
+ | (preambule?, latex)
 
 # ~~~~~~ latex
 latex = element latex { latex.attributes, latex.content }
@@ -993,6 +993,21 @@
 
 latex.content = text
 
+# ~~~~~~ preambule
+preambule = element preambule { preambule.content }
+
+preambule.content =
+    newcommand+
+
+# ~~~~~~ newcommand
+newcommand = element newcommand { newcommand.attributes, newcommand.content }
+
+newcommand.attributes =
+    newcommand.name.attribute
+newcommand.name.attribute = attribute name { xsd:NMTOKEN }
+
+newcommand.content = text
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 quote = element quote { quote.content }