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