mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
fix bug 2174
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10807 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
26cae2254e
commit
e4ddd93da4
@ -1,3 +1,9 @@
|
||||
2006-02-02 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* configure.m4: add lyx13x format and converter
|
||||
* configure.m4: remove viewer from lyx format to exclude it from the
|
||||
View menu
|
||||
|
||||
2006-01-26 Jürgen Spitzmüller <j.spitzmueller@gmx.de>
|
||||
|
||||
* chkconfig.ltx: add missing tests for bibtopic and jurabib;
|
||||
|
@ -590,7 +590,8 @@ cat >$outfile <<EOF
|
||||
\\Format jpg jpg JPEG "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
|
||||
\\Format latex tex LaTeX L "" "$TEXT_EDITOR"
|
||||
\\Format linuxdoc sgml LinuxDoc x "" "$TEXT_EDITOR"
|
||||
\\Format lyx lyx LyX "" "lyx" "lyx"
|
||||
\\Format lyx lyx LyX "" "" ""
|
||||
\\Format lyx13x lyx13 "LyX 1.3.x" "" "" ""
|
||||
\\Format lyxpreview lyxpreview "LyX Preview" "" "" ""
|
||||
\\Format literate nw NoWeb N "" "$TEXT_EDITOR"
|
||||
\\Format pbm pbm PBM "" "$RASTERIMAGE_VIEWER" "$RASTERIMAGE_EDITOR"
|
||||
@ -636,6 +637,7 @@ cat >$outfile <<EOF
|
||||
\\converter linuxdoc lyx "$linuxdoc_to_lyx_command" ""
|
||||
\\converter literate latex "$literate_to_tex_command" ""
|
||||
\\converter literate lyx "$literate_to_lyx_command" ""
|
||||
\\converter lyx lyx13x "python \$\$s/lyx2lyx/lyx2lyx -t 221 \$\$i > \$\$o" ""
|
||||
\\converter lyxpreview png "$lyxpreview_to_png_command" ""
|
||||
\\converter lyxpreview ppm "$lyxpreview_to_bitmap_command" ""
|
||||
\\converter ps fax "$fax_command" ""
|
||||
|
@ -1,3 +1,10 @@
|
||||
2006-02-02 Georg Baum <Georg.Baum@post.rwth-aachen.de>
|
||||
|
||||
* exporter.C (Backends): Add "lyx" backend
|
||||
* exporter.C (Export): Handle "lyx" backend
|
||||
* graph.C (getReachable): Don't exclude "lyx"
|
||||
* MenuBackend.C (expandFormats): exclude "lyx" from export menu
|
||||
|
||||
2006-02-03 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* cursor.C (bruteFind2): convert relative to absolute co-ordinates
|
||||
|
@ -517,6 +517,11 @@ void expandFormats(MenuItem::Kind kind, Menu & tomenu, LyXView const * view)
|
||||
else if ((*fit)->name() == "textparagraph")
|
||||
label = _("Plain Text as Paragraphs");
|
||||
label += "...";
|
||||
} else if (kind == MenuItem::ExportFormats) {
|
||||
// exporting to LyX does not make sense
|
||||
// FIXME: Introduce noexport flag
|
||||
if ((*fit)->name() == "lyx")
|
||||
continue;
|
||||
}
|
||||
if (!(*fit)->shortcut().empty())
|
||||
label += '|' + (*fit)->shortcut();
|
||||
|
@ -61,6 +61,7 @@ vector<string> const Backends(Buffer const & buffer)
|
||||
if (buffer.params().getLyXTextClass().isTeXClassAvailable())
|
||||
v.push_back(BufferFormat(buffer));
|
||||
v.push_back("text");
|
||||
v.push_back("lyx");
|
||||
return v;
|
||||
}
|
||||
|
||||
@ -143,11 +144,19 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
runparams.flavor = OutputParams::LATEX;
|
||||
runparams.linelen = lyxrc.ascii_linelen;
|
||||
vector<string> backends = Backends(*buffer);
|
||||
if (find(backends.begin(), backends.end(), format) == backends.end()) {
|
||||
// FIXME: Without this test export to lyx13 would be through
|
||||
// latex -> lyx -> lyx13, because the first backend below with a
|
||||
// working conversion path is used. We should replace this test and
|
||||
// the explicit loop below with a method
|
||||
// getShortestPath(vector<string> const & from, string const & to)
|
||||
// which returns the shortest path from one of the formats in 'from'
|
||||
// to 'to'.
|
||||
if (format == "lyx13x" && !converters.getPath("lyx", format).empty())
|
||||
backend_format = "lyx";
|
||||
else if (find(backends.begin(), backends.end(), format) == backends.end()) {
|
||||
for (vector<string>::const_iterator it = backends.begin();
|
||||
it != backends.end(); ++it) {
|
||||
Graph::EdgePath p =
|
||||
converters.getPath(*it, format);
|
||||
Graph::EdgePath p = converters.getPath(*it, format);
|
||||
if (!p.empty()) {
|
||||
runparams.flavor = converters.getFlavor(p);
|
||||
backend_format = *it;
|
||||
@ -171,6 +180,9 @@ bool Exporter::Export(Buffer * buffer, string const & format,
|
||||
// Ascii backend
|
||||
if (backend_format == "text")
|
||||
writeFileAscii(*buffer, filename, runparams);
|
||||
// no backend
|
||||
else if (backend_format == "lyx")
|
||||
buffer->writeFile(filename);
|
||||
// Linuxdoc backend
|
||||
else if (buffer->isLinuxDoc()) {
|
||||
runparams.nice = !put_in_tempdir;
|
||||
|
@ -77,8 +77,6 @@ Graph::getReachable(int from, bool only_viewable,
|
||||
int const i = Q_.front();
|
||||
Q_.pop();
|
||||
Format const & format = formats.get(i);
|
||||
if (format.name() == "lyx")
|
||||
continue;
|
||||
if (!only_viewable || !format.viewer().empty() ||
|
||||
format.isChildFormat())
|
||||
result.push_back(i);
|
||||
|
Loading…
Reference in New Issue
Block a user