mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add an HTML output flavor, and do something with it.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31719 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d7d1b39adc
commit
14bb003b7e
@ -1392,7 +1392,7 @@ void Buffer::makeLyXHTMLFile(FileName const & fname,
|
||||
OutputParams const & runparams,
|
||||
bool const body_only) const
|
||||
{
|
||||
LYXERR(Debug::LATEX, "makeLYXHTMLFile...");
|
||||
LYXERR(Debug::LATEX, "makeLyXHTMLFile...");
|
||||
|
||||
ofdocstream ofs;
|
||||
if (!openFileWrite(ofs, fname))
|
||||
@ -3124,10 +3124,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
|
||||
// Plain text backend
|
||||
if (backend_format == "text")
|
||||
writePlaintextFile(*this, FileName(filename), runparams);
|
||||
// no backend
|
||||
else if (backend_format == "xhtml")
|
||||
// HTML backend
|
||||
else if (backend_format == "xhtml") {
|
||||
runparams.flavor = OutputParams::HTML;
|
||||
makeLyXHTMLFile(FileName(filename), runparams);
|
||||
else if (backend_format == "lyx")
|
||||
} else if (backend_format == "lyx")
|
||||
writeFile(FileName(filename));
|
||||
// Docbook backend
|
||||
else if (isDocBook()) {
|
||||
|
@ -34,7 +34,8 @@ public:
|
||||
LATEX,
|
||||
PDFLATEX,
|
||||
XETEX,
|
||||
XML
|
||||
XML,
|
||||
HTML
|
||||
};
|
||||
|
||||
enum TableCell {
|
||||
|
@ -115,6 +115,12 @@ string findTargetFormat(string const & format, OutputParams const & runparams)
|
||||
// Convert everything else to png
|
||||
return "png";
|
||||
}
|
||||
// for HTML, we leave the known formats and otherwise convert to png
|
||||
if (runparams.flavor == OutputParams::HTML) {
|
||||
if (format == "jpg" || format == "png" || format == "gif")
|
||||
return format;
|
||||
return "png";
|
||||
}
|
||||
// If it's postscript, we always do eps.
|
||||
LYXERR(Debug::GRAPHICS, "findTargetFormat: PostScript mode");
|
||||
if (format != "ps")
|
||||
|
Loading…
Reference in New Issue
Block a user