From 429d2171b15a6bea964c203a9b22e257e8496278 Mon Sep 17 00:00:00 2001 From: Richard Kimberly Heck Date: Sat, 14 Mar 2020 18:31:25 -0400 Subject: [PATCH] Fix bug #11780. The preamble snippets are for LaTeX and do not need to be output with HTML. (cherry picked from commit f044d3a3595912415806707582e8aa6b0890bbe7) --- src/Buffer.cpp | 4 ---- src/LaTeXFeatures.h | 3 ++- status.23x | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 92c3d5d9c7..4c43acbb67 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -2208,10 +2208,6 @@ void Buffer::writeLyXHTMLSource(odocstream & os, if (!styles.empty()) os << "\n\n" << styles << '\n'; - styles = features.getPreambleSnippets().str; - if (!styles.empty()) - os << "\n\n" << styles << '\n'; - // we will collect CSS information in a stream, and then output it // either here, as part of the header, or else in a separate file. odocstringstream css; diff --git a/src/LaTeXFeatures.h b/src/LaTeXFeatures.h index 85f3771304..7353f0c6b6 100644 --- a/src/LaTeXFeatures.h +++ b/src/LaTeXFeatures.h @@ -95,7 +95,8 @@ public: void addPreambleSnippet(docstring const & snippet, bool allowdupes = false); /// TexString getPreambleSnippets() const; - /// + /// Adds CSS information for HTML export. + /// Note that addPreambleSnippet is for LaTeX-type export void addCSSSnippet(std::string const &); /// docstring getCSSSnippets() const; diff --git a/status.23x b/status.23x index 6b30e90bac..3fbb135d68 100644 --- a/status.23x +++ b/status.23x @@ -91,6 +91,7 @@ What's new * LYXHTML +- Don't output LaTeX preamble snippets with HTML (bug 11780). * ADVANCED FIND AND REPLACE -- 2.39.5