// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3),
opt_enginetype_("authoryear|numerical"), opt_fontsize_("10|11|12"),
opt_pagestyle_("empty|plain|headings|fancy"), pagestyle_("default"),
columns_(1), sides_(OneSide), secnumdepth_(3), tocdepth_(3),
- outputType_(LATEX), outputFormat_("latex"),
+ 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),
defaultfont_(sane_font),
titletype_(TITLE_COMMAND_AFTER), titlename_("maketitle"),
min_toclevel_(0), max_toclevel_(0), maxcitenames_(2),
- // Format of files before the 'Format' tag was introduced
- int format = 1;
- bool error = false;
+ // The first usable line should be
+ // Format LAYOUT_FORMAT
+ if (lexrc.lex() != TC_FORMAT || !lexrc.next()
+ || lexrc.getInteger() != LAYOUT_FORMAT)
+ return FORMAT_MISMATCH;
- FileName tmp = libFileSearch("layouts", inc,
+ if (!path().empty() && (prefixIs(inc, "./") ||
+ prefixIs(inc, "../")))
+ tmp = fileSearch(path(), inc, "layout");
+ else
+ tmp = libFileSearch("layouts", inc,
// If the layout already exists, then we want to add it to
// the existing layout, as long as we are not in an ProvideStyle
// block.
// If the layout already exists, then we want to add it to
// the existing layout, as long as we are not in an ProvideStyle
// block.
- // false positive from coverity
- // coverity[CHECKED_RETURN]
- readStyle(lexrc, lay);
+ // signal to coverity that we do not care about the result
+ (void)readStyle(lexrc, lay);
if (type & ENGINE_TYPE_AUTHORYEAR)
cite_macros_[ENGINE_TYPE_AUTHORYEAR][etype] = definition;
if (type & ENGINE_TYPE_NUMERICAL)
if (type & ENGINE_TYPE_AUTHORYEAR)
cite_macros_[ENGINE_TYPE_AUTHORYEAR][etype] = definition;
if (type & ENGINE_TYPE_NUMERICAL)
-docstring TextClass::outlinerName(std::string const & type) const
-{
- std::map<std::string,docstring>::const_iterator const it
- = outliner_names_.find(type);
- if (it == outliner_names_.end()) {
- LYXERR0("Missing OutlinerName for " << type << "!");
- return from_utf8(type);
- } else
- return it->second;
-}
-
-
string const & TextClass::prerequisites(string const & sep) const
{
if (contains(prerequisites_, ',')) {
string const & TextClass::prerequisites(string const & sep) const
{
if (contains(prerequisites_, ',')) {
for (; lit != len; ++lit) {
int const level = lit->toclevel;
// we don't want Part or unnumbered sections
for (; lit != len; ++lit) {
int const level = lit->toclevel;
// we don't want Part or unnumbered sections
string const DocumentClass::getCiteFormat(CiteEngineType const & type,
string const & entry, bool const punct, string const & fallback) const
{
string const DocumentClass::getCiteFormat(CiteEngineType const & type,
string const & entry, bool const punct, string const & fallback) const
{
- string default_format = "{%author%[[%author%, ]][[{%editor%[[%editor%, ed., ]]}]]}\"%title%\"{%journal%[[, {!<i>!}%journal%{!</i>!}]][[{%publisher%[[, %publisher%]][[{%institution%[[, %institution%]]}]]}]]}{%year%[[ (%year%)]]}{%pages%[[, %pages%]]}";
+ string default_format = "{%fullnames:author%[[%fullnames:author%, ]][[{%fullnames:editor%[[%fullnames:editor%, ed., ]]}]]}\"%title%\"{%journal%[[, {!<i>!}%journal%{!</i>!}]][[{%publisher%[[, %publisher%]][[{%institution%[[, %institution%]]}]]}]]}{%year%[[ (%year%)]]}{%pages%[[, %pages%]]}";