1  /*
2  *      bibtex.h
3  *
4  *      Copyright 2008-2012 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
5  *
6  *      This program is free software; you can redistribute it and/or modify
7  *      it under the terms of the GNU General Public License as published by
8  *      the Free Software Foundation; either version 2 of the License, or
9  *      (at your option) any later version.
10  *
11  *      This program is distributed in the hope that it will be useful,
12  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *      GNU General Public License for more details.
15  *
16  *      You should have received a copy of the GNU General Public License
17  *      along with this program; if not, write to the Free Software
18  *      Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19  *      MA 02110-1301, USA.
20  */
21 
22 #ifndef LATEXBIBTEX_H
23 #define LATEXBIBTEX_H
24 
25 #include "latex.h"
26 
27 
28 /* Define generic stuff */
29 enum {
30 	GLATEX_BIBTEX_ARTICLE = 0,
31 	GLATEX_BIBTEX_BOOK,
32 	GLATEX_BIBTEX_BOOKLET,
33 	GLATEX_BIBTEX_CONFERENCE,
34 	GLATEX_BIBTEX_INBOOK,
35 	GLATEX_BIBTEX_INCOLLECTION,
36 	GLATEX_BIBTEX_INPROCEEDINGS,
37 	GLATEX_BIBTEX_MANUAL,
38 	GLATEX_BIBTEX_MASTERSTHESIS,
39 	GLATEX_BIBTEX_MISC,
40 	GLATEX_BIBTEX_PHDTHESIS,
41 	GLATEX_BIBTEX_PROCEEDINGS,
42 	GLATEX_BIBTEX_TECHREPORT,
43 	GLATEX_BIBTEX_UNPUBLISHED,
44 	GLATEX_BIBTEX_N_TYPES
45 };
46 
47 enum {
48 	GLATEX_BIBTEX_ADDRESS = 0,
49 	GLATEX_BIBTEX_ANNOTE,
50 	GLATEX_BIBTEX_AUTHOR,
51 	GLATEX_BIBTEX_BOOKTITLE,
52 	GLATEX_BIBTEX_CHAPTER,
53 	GLATEX_BIBTEX_CROSSREF,
54 	GLATEX_BIBTEX_EDITION,
55 	GLATEX_BIBTEX_EDITOR,
56 	GLATEX_BIBTEX_EPRINT,
57 	GLATEX_BIBTEX_HOWPUBLISHED,
58 	GLATEX_BIBTEX_INSTITUTION,
59 	GLATEX_BIBTEX_JOURNAL,
60 	GLATEX_BIBTEX_KEY,
61 	GLATEX_BIBTEX_MONTH,
62 	GLATEX_BIBTEX_NOTE,
63 	GLATEX_BIBTEX_NUMBER,
64 	GLATEX_BIBTEX_ORGANIZATION,
65 	GLATEX_BIBTEX_PAGES,
66 	GLATEX_BIBTEX_PUBLISHER,
67 	GLATEX_BIBTEX_SCHOOL,
68 	GLATEX_BIBTEX_SERIES,
69 	GLATEX_BIBTEX_TITLE,
70 	GLATEX_BIBTEX_TYPE,
71 	GLATEX_BIBTEX_URL,
72 	GLATEX_BIBTEX_VOLUME,
73 	GLATEX_BIBTEX_YEAR,
74 	GLATEX_BIBTEX_N_ENTRIES
75 };
76 
77 extern const gchar *glatex_label_tooltips[];
78 extern const gchar *glatex_label_entry_keywords[];
79 extern const gchar *glatex_label_entry[];
80 extern BibTeXType glatex_bibtex_types[];
81 
82 int glatex_push_bibtex_entry(int style, GeanyDocument *doc);
83 void glatex_insert_bibtex_entry(G_GNUC_UNUSED GtkMenuItem * menuitem, gpointer gdata);
84 void glatex_bibtex_write_entry(GPtrArray *entry, gint doctype);
85 GPtrArray *glatex_bibtex_init_empty_entry(void);
86 void glatex_bibtex_insert_cite(gchar *reference_name, gchar *option);
87 void glatex_parse_bib_file(const gchar* file, gpointer combobox);
88 LaTeXLabel* glatex_parseLine_bib(const gchar *line);
89 
90 
91 #endif
92