   }
   documentEnvironment: {
     comment: 'To stop the entire contents of the document environment being labelled. Its useless anyway, as I split up my work and just include it into the main file.'
-    begin: '(\\\\)(begin)(\\{)(document)(\\})'
-    beginCaptures:
-      1:
-        name: 'punctuation.definition.function.latex'
-      2:
+    begin: '\\\\begin(\\{)(document)(\\})'
+    beginCaptures:
+      0:
         name: 'support.function.environment.begin.latex'
-      3:
-        name: 'punctuation.definition.argument.begin.latex'
-      4:
+      1:
+        name: 'punctuation.definition.argument.begin.latex'
+      2:
         name: 'variable.parameter.argument.latex'
-      5:
-        name: 'punctuation.definition.argument.end.latex'
-    end: '(\\\\)(end)(\\{)(document)(\\})'
-    endCaptures:
-      1:
-        name: 'punctuation.definition.function.latex'
-      2:
+      3:
+        name: 'punctuation.definition.argument.end.latex'
+    end: '\\\\end(\\{)(document)(\\})'
+    endCaptures:
+      0:
         name: 'support.function.environment.end.latex'
-      3:
-        name: 'punctuation.definition.argument.begin.latex'
-      4:
+      1:
+        name: 'punctuation.definition.argument.begin.latex'
+      2:
         name: 'variable.parameter.argument.latex'
-      5:
+      3:
         name: 'punctuation.definition.argument.end.latex'
     patterns: [
       {

  sectioning: {
    comment: 'Covers all sectioning commands such as section, subsection, subparagraph, etc.'
    name: 'support.function.section.latex'
    begin: '(\\\\)((sub){0,2}section|(sub){0,1}paragraph|part|chapter)(\\*)?(?=[^a-zA-Z@])'
    beginCaptures:
      0:
        name: 'keyword.control.section.latex'
      1:
        name: 'punctuation.definition.function.latex'
    end: '(?<=\\})|(^\\s*$)'
    endCaptures:
      1:

        include: '#makeatsomething'
      }
      {
        include: '#verbatim'
      }
      {
        include: '#genericMacro'
      }
    ]
