mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-09 18:52:46 +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,
|
OutputParams const & runparams,
|
||||||
bool const body_only) const
|
bool const body_only) const
|
||||||
{
|
{
|
||||||
LYXERR(Debug::LATEX, "makeLYXHTMLFile...");
|
LYXERR(Debug::LATEX, "makeLyXHTMLFile...");
|
||||||
|
|
||||||
ofdocstream ofs;
|
ofdocstream ofs;
|
||||||
if (!openFileWrite(ofs, fname))
|
if (!openFileWrite(ofs, fname))
|
||||||
@ -3124,10 +3124,11 @@ bool Buffer::doExport(string const & format, bool put_in_tempdir,
|
|||||||
// Plain text backend
|
// Plain text backend
|
||||||
if (backend_format == "text")
|
if (backend_format == "text")
|
||||||
writePlaintextFile(*this, FileName(filename), runparams);
|
writePlaintextFile(*this, FileName(filename), runparams);
|
||||||
// no backend
|
// HTML backend
|
||||||
else if (backend_format == "xhtml")
|
else if (backend_format == "xhtml") {
|
||||||
|
runparams.flavor = OutputParams::HTML;
|
||||||
makeLyXHTMLFile(FileName(filename), runparams);
|
makeLyXHTMLFile(FileName(filename), runparams);
|
||||||
else if (backend_format == "lyx")
|
} else if (backend_format == "lyx")
|
||||||
writeFile(FileName(filename));
|
writeFile(FileName(filename));
|
||||||
// Docbook backend
|
// Docbook backend
|
||||||
else if (isDocBook()) {
|
else if (isDocBook()) {
|
||||||
|
@ -34,7 +34,8 @@ public:
|
|||||||
LATEX,
|
LATEX,
|
||||||
PDFLATEX,
|
PDFLATEX,
|
||||||
XETEX,
|
XETEX,
|
||||||
XML
|
XML,
|
||||||
|
HTML
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TableCell {
|
enum TableCell {
|
||||||
|
@ -115,6 +115,12 @@ string findTargetFormat(string const & format, OutputParams const & runparams)
|
|||||||
// Convert everything else to png
|
// Convert everything else to png
|
||||||
return "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.
|
// If it's postscript, we always do eps.
|
||||||
LYXERR(Debug::GRAPHICS, "findTargetFormat: PostScript mode");
|
LYXERR(Debug::GRAPHICS, "findTargetFormat: PostScript mode");
|
||||||
if (format != "ps")
|
if (format != "ps")
|
||||||
|
Loading…
Reference in New Issue
Block a user