2 /* This file is part of
3 * ======================================================
5 * LyX, The Document Processor
7 * Copyright 1995 Matthias Ettrich
8 * Copyright 1995-2000 The LyX Team.
10 * ====================================================== */
28 Command(string const & f, string const & t, string const & c)
29 : from(f), to(t), command(c),
30 original_dir(false), need_aux(false) {}
37 /// Do we need to run the converter in the original directory?
39 /// This converter needs the .aux files
41 /// If the converter put the result in a directory, then result_dir
42 /// is the name of the directory
44 /// If the converter put the result in a directory, then result_file
45 /// is the name of the main file in that directory
50 std::vector<Command>::iterator previous;
57 Format() : in_degree(0) {}
59 Format(string const & n);
75 void Add(string const & name);
78 void SetViewer(string const & name, string const & command);
81 bool View(Buffer * buffer, string const & filename);
84 Format * GetFormat(string const & name);
87 string const PrettyName(string const & name);
91 std::map<string, Format> formats;
99 void Add(string const & from, string const & to,
100 string const & command, string const & flags);
103 std::vector<std::pair<string, string> > const
104 GetReachable(string const & from,
105 bool only_viewable = false);
108 bool Convert(Buffer * buffer, string const & from_file,
109 string const & to_file, string const & using_format,
110 string * view_file = 0);
112 string const SplitFormat(string const & str, string & format);
115 string dvi_papersize(Buffer * buffer);
118 string dvips_options(Buffer * buffer);
122 bool runLaTeX(Buffer * buffer, string const & command);
125 std::vector<Command> commands;
128 string latex_command;