// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 75; // spitz: FreeSpacing (Argument)
+int const LAYOUT_FORMAT = 80; // spitz: Requires for floats
// Layout format for the current lyx file format. Controls which format is
TextClass::TextClass()
: loaded_(false), tex_class_avail_(false),
opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
- opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
- tablestyle_("default"), columns_(1), sides_(OneSide), secnumdepth_(3),
- tocdepth_(3), outputType_(LATEX), outputFormat_("latex"),
- has_output_format_(false), defaultfont_(sane_font),
+ opt_pagesize_("default|a4|a5|b5|letter|legal|executive"),
+ opt_pagestyle_("empty|plain|headings|fancy"), fontsize_format_("$$spt"), pagesize_("default"),
+ pagesize_format_("$$spaper"), pagestyle_("default"), tablestyle_("default"),
+ columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3), outputType_(LATEX),
+ outputFormat_("latex"), has_output_format_(false), defaultfont_(sane_font),
titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
min_toclevel_(0), max_toclevel_(0), maxcitenames_(2),
- cite_full_author_list_(true)
+ cite_full_author_list_(true), bibintoc_(false)
{
}
TC_COLUMNS,
TC_SIDES,
TC_PAGESTYLE,
+ TC_PAGESIZE,
TC_DEFAULTFONT,
TC_SECNUMDEPTH,
TC_TOCDEPTH,
TC_DEFAULTBIBLIO,
TC_FULLAUTHORLIST,
TC_OUTLINERNAME,
- TC_TABLESTYLE
+ TC_TABLESTYLE,
+ TC_BIBINTOC
};
{ "addtohtmlpreamble", TC_ADDTOHTMLPREAMBLE },
{ "addtohtmlstyles", TC_ADDTOHTMLSTYLES },
{ "addtopreamble", TC_ADDTOPREAMBLE },
+ { "bibintoc", TC_BIBINTOC },
{ "citeengine", TC_CITEENGINE },
{ "citeenginetype", TC_CITEENGINETYPE },
{ "citeformat", TC_CITEFORMAT },
{ "outputformat", TC_OUTPUTFORMAT },
{ "outputtype", TC_OUTPUTTYPE },
{ "packageoptions", TC_PKGOPTS },
+ { "pagesize", TC_PAGESIZE },
{ "pagestyle", TC_PAGESTYLE },
{ "preamble", TC_PREAMBLE },
{ "provides", TC_PROVIDES },
}
break;
+ case TC_PAGESIZE:
+ lexrc.next();
+ pagesize_ = rtrim(lexrc.getString());
+ break;
+
case TC_PAGESTYLE:
lexrc.next();
pagestyle_ = rtrim(lexrc.getString());
break;
}
docstring const name = subst(lexrc.getDocString(), '_', ' ');
+ bool const validating = (rt == VALIDATION);
if (name.empty()) {
string s = "Could not read name for InsetLayout: `$$Token' "
+ lexrc.getString() + " is probably not valid UTF-8!";
// Since we couldn't read the name, we just scan the rest
// of the style and discard it.
il.read(lexrc, *this);
- // Let's try to continue rather than abort.
- // error = true;
+ // Let's try to continue rather than abort, unless we're validating
+ // in which case we want to report the error
+ if (validating)
+ error = true;
} else if (hasInsetLayout(name)) {
InsetLayout & il = insetlayoutlist_[name];
- error = !il.read(lexrc, *this);
+ error = !il.read(lexrc, *this, validating);
} else {
InsetLayout il;
il.setName(name);
- error = !il.read(lexrc, *this);
+ error = !il.read(lexrc, *this, validating);
if (!error)
insetlayoutlist_[name] = il;
}
}
break;
+ case TC_BIBINTOC:
+ if (lexrc.next())
+ bibintoc_ = lexrc.getBool();
+ break;
+
case TC_FULLAUTHORLIST:
if (lexrc.next())
cite_full_author_list_ &= lexrc.getBool();
{
enum {
CO_FONTSIZE = 1,
+ CO_FONTSIZE_FORMAT,
+ CO_PAGESIZE,
+ CO_PAGESIZE_FORMAT,
CO_PAGESTYLE,
CO_OTHER,
CO_HEADER,
LexerKeyword classOptionsTags[] = {
{"end", CO_END },
{"fontsize", CO_FONTSIZE },
+ {"fontsizeformat", CO_FONTSIZE_FORMAT },
{"header", CO_HEADER },
{"other", CO_OTHER },
+ {"pagesize", CO_PAGESIZE },
+ {"pagesizeformat", CO_PAGESIZE_FORMAT },
{"pagestyle", CO_PAGESTYLE }
};
lexrc.next();
opt_fontsize_ = rtrim(lexrc.getString());
break;
+ case CO_FONTSIZE_FORMAT:
+ lexrc.next();
+ fontsize_format_ = rtrim(lexrc.getString());
+ break;
+ case CO_PAGESIZE:
+ lexrc.next();
+ opt_pagesize_ = rtrim(lexrc.getString());
+ break;
+ case CO_PAGESIZE_FORMAT:
+ lexrc.next();
+ pagesize_format_ = rtrim(lexrc.getString());
+ break;
case CO_PAGESTYLE:
lexrc.next();
opt_pagestyle_ = rtrim(lexrc.getString());
FT_REFPREFIX,
FT_ALLOWED_PLACEMENT,
FT_ALLOWS_SIDEWAYS,
- FT_ALLOWS_WIDE,
+ FT_ALLOWS_WIDE,
+ FT_REQUIRES,
FT_END
};
{ "numberwithin", FT_WITHIN },
{ "placement", FT_PLACEMENT },
{ "refprefix", FT_REFPREFIX },
+ { "requires", FT_REQUIRES },
{ "style", FT_STYLE },
{ "type", FT_TYPE },
{ "usesfloatpkg", FT_USESFLOAT }
string style;
string type;
string within;
+ string requires;
bool usesfloat = true;
bool ispredefined = false;
bool allowswide = true;
lexrc.next();
usesfloat = lexrc.getBool();
break;
+ case FT_REQUIRES:
+ lexrc.next();
+ requires = lexrc.getString();
+ break;
case FT_PREDEFINED:
lexrc.next();
ispredefined = lexrc.getBool();
}
Floating fl(type, placement, ext, within, style, name,
listname, listcommand, refprefix, allowed_placement,
- htmltag, htmlattr, htmlstyle, usesfloat, ispredefined,
- allowswide, allowssideways);
+ htmltag, htmlattr, htmlstyle, requires, usesfloat,
+ ispredefined, allowswide, allowssideways);
floatlist_.newFloat(fl);
// each float has its own counter
counters_.newCounter(from_ascii(type), from_ascii(within),