Let the LaTeX parser recognise the keyword \chapter.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@1054 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-12-05 16:03:18 +00:00
parent 1edaaa3d6c
commit c36e8de3c8
3 changed files with 16 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2006-12-05 Enrico Tröger <enrico.troeger@uvena.de>
* src/treeviews.c, tagmanager/latex.c:
Let the LaTeX parser recognise the keyword \chapter.
2006-12-05 Nick Treleaven <nick.treleaven@btinternet.com>
* src/socket.c:

View File

@ -141,8 +141,8 @@ void treeviews_init_tag_list(gint idx)
gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_variable), 0, _("Subsubsection"), -1);
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_struct), NULL);
gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_struct), 0, _("Label"), -1);
//gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_namespace), NULL);
//gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_namespace), 0, _("Begin"), -1);
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_namespace), NULL);
gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_namespace), 0, _("Chapter"), -1);
gtk_tree_store_append(doc_list[idx].tag_store, &(tv.tag_other), NULL);
gtk_tree_store_set(doc_list[idx].tag_store, &(tv.tag_other), 0, _("Other"), -1);
break;

View File

@ -32,6 +32,7 @@ typedef enum {
K_SECTION,
K_SUBSECTION,
K_SUBSUBSECTION,
K_CHAPTER,
K_LABEL
} TeXKind;
@ -41,6 +42,7 @@ static kindOption TeXKinds[] = {
{ TRUE, 'm', "member", "labels, sections and bibliography" },
{ TRUE, 'd', "macro", "subsections" },
{ TRUE, 'v', "variable", "subsubsections" },
{ TRUE, 'n', "namespace", "chapters"},
{ TRUE, 's', "struct", "labels and bibliography" }
};
@ -205,6 +207,12 @@ static void findTeXTags(void)
createTag(TEX_LABEL, K_SUBSUBSECTION, cp);
continue;
}
/* \chapter{key} */
else if (getWord("chapter", &cp))
{
createTag(TEX_LABEL, K_CHAPTER, cp);
continue;
}
}
}
}