Toolbar "frac-square" "Fractions"
Item "Standard \\frac" "math-insert \frac"
Item "Nice fraction (3/4) \\nicefrac" "math-insert \nicefrac"
- Item "Unit (km) \\unitone" "math-insert \unitone"
- Item "Unit (864 m) \\unittwo" "math-insert \unittwo"
+ Item "Unit (km) \\unit" "math-insert \unitone"
+ Item "Unit (864 m) \\unit" "math-insert \unittwo"
Item "Unit fraction (km/h) \\unitfrac" "math-insert \unitfrac"
- Item "Unit fraction (20 km/h) \\unitfracthree" "math-insert \unitfracthree"
+ Item "Unit fraction (20 km/h) \\unitfrac" "math-insert \unitfracthree"
Item "Text fraction \\tfrac" "math-insert \tfrac"
Item "Display fraction \\dfrac" "math-insert \dfrac"
Item "Continued fraction \\cfrac" "math-insert \cfrac"
- Item "Continued fraction (left) \\cfracleft" "math-insert \cfracleft"
- Item "Continued fraction (right) \\cfracright" "math-insert \cfracright"
+ Item "Continued fraction (left) \\cfrac" "math-insert \cfracleft"
+ Item "Continued fraction (right) \\cfrac" "math-insert \cfracright"
Item "Binomial \\binom" "math-insert \binom"
Item "Text binomial \\tbinom" "math-insert \tbinom"
Item "Display binomial \\dbinom" "math-insert \dbinom"
DocumentClass const & newtc = *newone;
// layouts
- ParIterator it = par_iterator_begin(in);
ParIterator end = par_iterator_end(in);
- // for remembering which layouts we've had to add
- set<docstring> newlayouts;
- for (; it != end; ++it) {
+ for (ParIterator it = par_iterator_begin(in); it != end; ++it) {
docstring const name = it->layout().name();
// the pasted text will keep their own layout name. If this layout does
// not exist in the new document, it will behave like a standard layout.
- bool const added_one = newtc.addLayoutIfNeeded(name);
- if (added_one)
- newlayouts.insert(name);
-
- if (added_one || newlayouts.find(name) != newlayouts.end()) {
- // Warn the user.
- docstring const s = bformat(_("Layout `%1$s' was not found."), name);
- errorlist.push_back(
- ErrorItem(_("Layout Not Found"), s, it->id(), 0, it->size()));
- }
+ newtc.addLayoutIfNeeded(name);
if (in.usePlainLayout())
it->setLayout(newtc.plainLayout());
// of this document. For example, when you apply class article to a beamer document,
// all unknown layouts such as frame will be added to document class article so that
// these layouts can keep their original names.
- bool const added_one = tclass.addLayoutIfNeeded(layoutname);
- if (added_one) {
- // Warn the user.
- docstring const s = bformat(_("Layout `%1$s' was not found."), layoutname);
- errorList.push_back(
- ErrorItem(_("Layout Not Found"), s, par.id(), 0, par.size()));
- }
par.setLayout(bp.documentClass()[layoutname]);
}
-bool DocumentClass::addLayoutIfNeeded(docstring const & n) const
+void DocumentClass::addLayoutIfNeeded(docstring const & n) const
{
- if (hasLayout(n))
- return false;
-
- layoutlist_.push_back(createBasicLayout(n, true));
- return true;
+ if (!hasLayout(n))
+ layoutlist_.push_back(createBasicLayout(n, true));
}
/// a plain inset layout for use as a default
static InsetLayout const & plainInsetLayout() { return plain_insetlayout_; }
/// add a new layout \c name if it does not exist in layoutlist_
- /// \return whether we had to add one.
- bool addLayoutIfNeeded(docstring const & name) const;
+ void addLayoutIfNeeded(docstring const & name) const;
///////////////////////////////////////////////////////////////////
// accessors
- Fix output of decimally aligned columns in unviewed (on screen) tables.
-- Inform user of unknown layouts caused by class change (bug 7571).
-
- Avoid LaTeX errors if font changing commands are used in the wrong mode
by assuring to switch to the right mode on export.
- Enable OK/Apply in Document>Settings dialog when bullet size is changed.
-- Display LyX's internal \unit equivalents in the math toolbar menu (bug 7620).
-
* ADVANCED FIND AND REPLACE