<div>Hi Jonathan,</div>
<div> </div>
<div>Like a fwe others I&#39;m not that up with REGEX, but looking at the configuration file I thought if I want my own book marks to fit in to the general heading structure along with the standard LaTeX h\eadings in the edotir tag window, what if I define headings for them so my bookmarks start with an indicator as to where they should fall, so that they keep within the structure when the file is parsed for generating the Tag window in the editor?  </div>

<div> </div>
<div>And ones that dont have the necessaary prefix will continue to fall to tag level 0 at the end.</div>
<div> </div>
<div>I just have to use the prefix for ones I want in the right place in the headings heirachy.</div>
<div> </div>
<div>So after looking at the tag-patterns.txt file, and some help on the web, I wondered, would some sort of scheme like this would work ...</div>
<div> </div>
<div> - I&#39;m not sure if I got the REGEX right.</div>
<div> </div>
<div># Patterns for LaTeX sectioning commands:<br>1 ^\s*\\part\*?\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}</div>
<div>#<br>1 ^%:\s*part-\s*(.+)<br># (i.e.  in LaTeX on new line)  %: part- Camels My 1st Div<br>#</div>
<div>2 ^\s*\\chapter\*?\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}</div>
<div>#<br>2 ^%:\s*chapter-\s*(.+)<br># (i.e.  in LaTeX on new line)  %: chapter- Deserts My 1st Chapt</div>
<div>#<br>3 ^\s*\\section\*?\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}</div>
<div>#<br>3 ^%:\s*section-\s*(.+)<br># (i.e.  in LaTeX on new line)  %: section- Well Water My top Section</div>
<div>#<br>4 ^\s*\\ssection\*?\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}</div>
<div>#<br>4 ^%:\s*subsection-\s*(.+)<br># (i.e.  in LaTeX on new line)  %: ssection- Straw Supply My Sub Section</div>
<div>#<br>5 ^\s*\\sssection\*?\s*(?:\[[^]]*\]\s*)?\{([^}]*)\}</div>
<div>#<br>5 ^%:\s*sssection-\s*(.+)<br># (i.e.  in LaTeX on new line)  %: sssection- Feed My SubSub Section<br></div>
<div>Any help appreciated please.</div>
<div> </div>
<div>Paul</div>
<div> </div>
<div class="gmail_quote">2009/9/10 Paul A Norman <span dir="ltr">&lt;<a href="mailto:paul.a.norman@gmail.com">paul.a.norman@gmail.com</a>&gt;</span><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>Thanks Jonathan I&#39;ll have  alook into that file and idea,  sounds intereseting and worthwhile.</div>
<div> </div>
<div>Will I need any other information?</div>
<div> </div>
<div>Paul<br><br></div>
<div class="gmail_quote">2009/9/10 Jonathan Kew <span dir="ltr">&lt;<a href="mailto:jfkthame@googlemail.com" target="_blank">jfkthame@googlemail.com</a>&gt;</span> 
<div>
<div></div>
<div class="h5"><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div>On 9 Sep 2009, at 13:23, Paul A Norman wrote:<br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Great Stuff!<br><br>So just to clarify things,  when using things like<br><br>\phantomsection<br>\addcontentsline{toc}{section}{&lt;section-name&gt;}<br>
<br>to get appropriate bookmark in editor tags, I can add<br><br>%:section-name<br>\phantomsection<br>\addcontentsline{toc}{section}{&lt;section-name&gt;}<br></blockquote><br></div>Yes, that should work. Though the default configuration for the editor Tags feature (you can customize it via a file in the texworks configuration folder) will display %: bookmarks in a separate section from the (hierarchical) display of the document structure as defined by \section, \subsection, etc.<br>
<br>If you wanted to add &quot;phantom&quot; bookmarks that become part of the section hierarchy, you&#39;d need to invent a new form of &quot;bookmark comment&quot; that indicates the level in the hierarchy, rather than simply &quot;flat&quot; (level 0) markers, and add these to the configuration file.<br>
<br>(But maybe that&#39;s getting into too much detail!)<br><font color="#888888"><br>JK<br><br></font></blockquote></div></div></div><br></blockquote></div><br>