mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 13:31:49 +00:00
When we use InPremable styles, we want to write as many versions
to the premable as the user enters.
(cherry picked from commit fa190691a8
)
This commit is contained in:
parent
8a1578e405
commit
0e6b63a262
@ -579,11 +579,12 @@ bool LaTeXFeatures::isAvailable(string const & name)
|
||||
}
|
||||
|
||||
|
||||
void LaTeXFeatures::addPreambleSnippet(string const & preamble)
|
||||
void LaTeXFeatures::addPreambleSnippet(string const & preamble,
|
||||
bool allowdupes)
|
||||
{
|
||||
SnippetList::const_iterator begin = preamble_snippets_.begin();
|
||||
SnippetList::const_iterator end = preamble_snippets_.end();
|
||||
if (find(begin, end, preamble) == end)
|
||||
if (allowdupes || find(begin, end, preamble) == end)
|
||||
preamble_snippets_.push_back(preamble);
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,8 @@ public:
|
||||
/// Print requirements to lyxerr
|
||||
void showStruct() const;
|
||||
///
|
||||
void addPreambleSnippet(std::string const &);
|
||||
void addPreambleSnippet(std::string const & snippet,
|
||||
bool allowdupes = false);
|
||||
///
|
||||
std::string getPreambleSnippets() const;
|
||||
///
|
||||
|
@ -1397,7 +1397,7 @@ void Paragraph::Private::validate(LaTeXFeatures & features) const
|
||||
}
|
||||
}
|
||||
string const snippet = to_utf8(ods.str());
|
||||
features.addPreambleSnippet(snippet);
|
||||
features.addPreambleSnippet(snippet, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,6 +37,8 @@ What's new
|
||||
|
||||
* DOCUMENT INPUT/OUTPUT
|
||||
|
||||
- InPreamble styles should be written to the premable as many times as the
|
||||
user requests them, even if it results in duplicate commands.
|
||||
|
||||
|
||||
* LYX2LYX
|
||||
|
Loading…
Reference in New Issue
Block a user