Index: trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java
===================================================================
--- trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java	(revision 45)
+++ trunk/de.ugoe.cs.swe.bnftools.ebnf.ui/src/de/ugoe/cs/swe/bnftools/ui/formatter/EbnfHtmlFormatterVisitor.java	(revision 46)
@@ -303,10 +303,30 @@
 		
 		lastWasSectionHeading=true;
-		
-		metaText("<h3><span lang=EN-GB>\n");
 		String text = node.getSectionHeader().replaceAll("[\n\r]", "");
+
+		int sectionType = 0; // 0=h3, 1=h4, 2=h2
+		
+		if (text.replaceAll("[\n\r]", "").matches("^A\\.\\d\\.\\d\\.\\d.\\d[ \t]+.*"))
+			sectionType = 1;
+		
+		if (text.replaceAll("[\n\r]", "").matches("^A\\.\\d\\.\\d[ \t]+.*"))
+			sectionType = 2;
+				
+		if (sectionType == 0) {
+			metaText("<h3><span lang=EN-GB>\n");
+		} else if (sectionType == 1) {
+			metaText("<h4><span lang=EN-GB>\n");
+		} else {
+			metaText("<h2><span lang=EN-GB>\n");
+		}
 		textTransformed(text, StringEscapeUtils.escapeHtml(text).replaceAll("[\n\r]", ""));
 //		textTransformed(text, text.replaceAll("[\t]", "\\<span style='mso-tab-count:1'\\>"));
-		metaText("\n</span></h3>\n");
+		if (sectionType == 0) {
+			metaText("\n</span></h3>\n");
+		} else if (sectionType == 1) {
+			metaText("\n</span></h4>\n");
+		} else {
+			metaText("\n</span></h2>\n");
+		}
 	}
 
