summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt')
-rw-r--r--Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt b/Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt
new file mode 100644
index 00000000000..7e3837da249
--- /dev/null
+++ b/Master/texmf-dist/context/data/texworks/configuration/tag-patterns.txt
@@ -0,0 +1,33 @@
+# TeXworks: Patterns for tag recognition
+
+# Each entry consists of two whitespace-separated fields:
+# <level> <regex>
+
+# <level> is the position in the document structure hierarchy, with 1 being the top level.
+# <regex> is the regular expression to match.
+
+# If there is a (capture group) in the regex, this is the fragment that will be used
+# as the actual tag text; if there is no group, the entire match will be used.
+
+# Patterns for ConTeXt sectioning commands:
+
+1 ^\s*\\part\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+2 ^\s*\\chapter\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+2 ^\s*\\title\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+3 ^\s*\\section\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+3 ^\s*\\subject\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+4 ^\s*\\subsection\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+4 ^\s*\\subsubject\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+5 ^\s*\\subsubsection\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+5 ^\s*\\subsubsubject\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+6 ^\s*\\subsubsubsection\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+6 ^\s*\\subsubsubsubject\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+6 ^\s*\\subsubsubsubsection\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+6 ^\s*\\subsubsubsubsubject\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}
+
+# Tags with level = 0 are special bookmarks that are separate from the hierarchy
+# and collected in a separate flat list.
+0 ^\s*\\environment\s+([\S]+)
+0 ^\s*\\component\s+([\S]+)
+0 ^\s*\\project\s+([\S]+)
+0 ^\s*\\product\s+([\S]+)