close = true;
}
-#ifdef WITH_WARNINGS
-#warning Bug: we can have an empty font change here!
+// FIXME: Bug: we can have an empty font change here!
// if there has just been a font change, we are going to close it
// right now, which means stupid latex code like \textsf{}. AFAIK,
// this does not harm dvi output. A minor bug, thus (JMarc)
-#endif
// Some insets cannot be inside a font change command.
// However, even such insets *can* be placed in \L or \R
// or their equivalents (for RTL language switches), so we don't
{
BOOST_ASSERT(pos >= 0);
- Layout_ptr const & lout = layout();
+ Font font = getFontSettings(bparams, pos);
pos_type const body_pos = beginOfBody();
-
- Font layoutfont;
if (pos < body_pos)
- layoutfont = lout->labelfont;
+ font.realize(layout_->labelfont);
else
- layoutfont = lout->font;
+ font.realize(layout_->font);
- Font font = getFontSettings(bparams, pos);
- font.realize(layoutfont);
font.realize(outerfont);
font.realize(bparams.getFont());
else
fmt = translateIfPossible(layout->labelstring(), bparams);
+ if (fmt.empty() && layout->labeltype == LABEL_COUNTER
+ && !layout->counter.empty())
+ fmt = "\\the" + layout->counter;
+
// handle 'inherited level parts' in 'fmt',
// i.e. the stuff between '@' in '@Section@.\arabic{subsection}'
size_t const i = fmt.find('@', 0);
size_t const j = fmt.find('@', i + 1);
if (j != docstring::npos) {
docstring parent(fmt, i + 1, j - i - 1);
- docstring label = expandLabel(tclass[parent], bparams);
- fmt = docstring(fmt, 0, i) + label + docstring(fmt, j + 1, docstring::npos);
+ docstring label = expandLabel(tclass[parent], bparams,
+ process_appendix);
+ fmt = docstring(fmt, 0, i) + label
+ + docstring(fmt, j + 1, docstring::npos);
}
}
{
layout(new_layout);
LyXAlignment const oldAlign = params().align();
- // FIXME The first check is due to the fact that LYX_ALIGN_LAYOUT
- // is not required to be possible. A fix is on the way.
- if ((oldAlign != LYX_ALIGN_LAYOUT) &&
- !(oldAlign & layout()->alignpossible)) {
+
+ if (!(oldAlign & layout()->alignpossible)) {
frontend::Alert::warning(_("Alignment not permitted"),
_("The new layout does not permit the alignment previously used.\nSetting to default."));
params().align(LYX_ALIGN_LAYOUT);
runparams, basefont, basefont);
}
#else
-#ifdef WITH_WARNINGS
-//#warning For now we ALWAYS have to close the foreign font settings if they are
-//#warning there as we start another \selectlanguage with the next paragraph if
-//#warning we are in need of this. This should be fixed sometime (Jug)
-#endif
+//FIXME: For now we ALWAYS have to close the foreign font settings if they are
+//FIXME: there as we start another \selectlanguage with the next paragraph if
+//FIXME: we are in need of this. This should be fixed sometime (Jug)
running_font.latexWriteEndChanges(os, bparams, runparams,
basefont, basefont);
#endif
{
if (!empty())
return getFirstFontSettings(bparams).language();
-#ifdef WITH_WARNINGS
-#warning FIXME we should check the prev par as well (Lgb)
-#endif
+ // FIXME: we should check the prev par as well (Lgb)
return bparams.language;
}