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
47 /// Command to convert the program output to a LaTeX log file format
50 /// Used by the BFS algorithm
52 /// Used by the BFS algorithm
53 std::vector<Command>::iterator previous;
62 Format(string const & n);
80 FormatPair(Format * f1, Format * f2, string c)
81 : format(f1), from(f2), command(c) {}
89 void Add(string const & name);
92 void SetViewer(string const & name, string const & command);
95 bool View(Buffer const * buffer, string const & filename);
98 Format * GetFormat(string const & name);
101 string const PrettyName(string const & name);
105 std::map<string, Format> formats;
113 void Add(string const & from, string const & to,
114 string const & command, string const & flags);
119 std::vector<FormatPair> const
120 GetReachable(string const & from,
121 bool only_viewable = false);
124 bool IsReachable(string const & from, string const & target_format);
127 bool Convert(Buffer const * buffer, string const & from_file,
128 string const & to_file, string const & using_format,
129 string * view_file = 0);
132 string const SplitFormat(string const & str, string & format);
135 string const dvi_papersize(Buffer const * buffer);
138 string const dvips_options(Buffer const * buffer);
145 bool scanLog(Buffer const * buffer, string const & command,
146 string const & filename);
149 bool runLaTeX(Buffer const * buffer, string const & command);
152 std::vector<Command> commands;
155 string latex_command;