]> git.lyx.org Git - lyx.git/blob - src/tex2lyx/tex2lyx.h
6f2f4f5d17c60e7a58a89b89eb31388453a4b201
[lyx.git] / src / tex2lyx / tex2lyx.h
1 #ifndef TEX2LYX_H
2 #define TEX2LYX_H
3
4 #include "texparser.h"
5 #include "lyxtextclass.h"
6
7 #include <iosfwd>
8 #include <string>
9 #include <vector>
10
11 class LyXTextClass;
12
13 LyXTextClass const parse_preamble(Parser & p, std::ostream & os);
14
15 void parse_text(Parser & p, std::ostream & os, unsigned flags, bool outer,
16                 LyXTextClass const & textclass,
17                 LyXLayout_ptr layout_ptr = LyXLayout_ptr());
18
19
20
21 void parse_table(Parser & p, std::ostream & os, unsigned flags);
22
23 void parse_math(Parser & p, std::ostream & os, unsigned flags, mode_type mode);
24
25 void handle_tabular(Parser & p, std::ostream & os,
26                     LyXTextClass const & textclass);
27
28 // Helper
29 std::string parse_text(Parser & p, unsigned flags, const bool outer,
30                        LyXTextClass const & textclass, 
31                        LyXLayout_ptr layout_ptr = LyXLayout_ptr());
32
33 void handle_comment(Parser & p);
34 std::string const trim(std::string const & a, char const * p = " \t\n\r");
35
36 void split(std::string const & s, std::vector<std::string> & result,
37         char delim = ',');
38 std::string join(std::vector<std::string> const & input,
39         char const * delim);
40
41 bool is_math_env(std::string const & name);
42 char const ** is_known(std::string const & str, char const ** what);
43
44 // Access to environment stack
45 extern std::vector<std::string> active_environments;
46 std::string active_environment();
47
48 #endif