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;
60 Format() : in_degree(0) {}
62 Format(string const & n);
78 void Add(string const & name);
81 void SetViewer(string const & name, string const & command);
84 bool View(Buffer const * buffer, string const & filename);
87 Format * GetFormat(string const & name);
90 string const PrettyName(string const & name);
94 std::map<string, Format> formats;
102 void Add(string const & from, string const & to,
103 string const & command, string const & flags);
106 std::vector<std::pair<string, string> > const
107 GetReachable(string const & from,
108 bool only_viewable = false);
111 bool Convert(Buffer * buffer, string const & from_file,
112 string const & to_file, string const & using_format,
113 string * view_file = 0);
116 string const SplitFormat(string const & str, string & format);
119 string const dvi_papersize(Buffer const * buffer);
122 string const dvips_options(Buffer const * buffer);
126 bool scanLog(Buffer * buffer, string const & command,
127 string const & filename);
130 bool runLaTeX(Buffer * buffer, string const & command);
133 std::vector<Command> commands;
136 string latex_command;