summaryrefslogtreecommitdiff
path: root/context/data/texworks/configuration/tag-patterns.txt
blob: 7e3837da249d6b7a481164fbf8b323e44e6911d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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]+)