# Incremented to format 56, 20 May 2015 by spitz
# New Float tags "AllowedPlacement", "AllowsWide", "AllowsSideways"
+# Incremented to format 57, 30 May 2015 by spitz
+# New Layout tag "ParagraphGroup"
+
# Do not forget to document format change in Customization
# Manual (section "Declaring a new text class").
# development/tools/updatelayouts.py script to update all
# layout files to the new format.
-currentFormat = 56
+currentFormat = 57
def usage(prog_name):
i += 1
continue
- if format >= 50 and format <= 55:
+ if format >= 50 and format <= 56:
# nothing to do.
i += 1
continue
LT_NEED_PROTECT,
LT_NEWLINE,
LT_NEXTNOINDENT,
+ LT_PAR_GROUP,
LT_PARINDENT,
LT_PARSEP,
LT_PARSKIP,
forcelocal = 0;
itemcommand_ = "item";
toggle_indent = ITOGGLE_DOCUMENT_DEFAULT;
+ par_group_ = false;
}
{ "newline", LT_NEWLINE },
{ "nextnoindent", LT_NEXTNOINDENT },
{ "obsoletedby", LT_OBSOLETEDBY },
+ { "paragraphgroup", LT_PAR_GROUP },
{ "parbreakisnewline", LT_PARBREAK_IS_NEWLINE },
{ "parindent", LT_PARINDENT },
{ "parsep", LT_PARSEP },
counter = trim(counter);
break;
+ case LT_PAR_GROUP:
+ lex >> par_group_;
+ break;
+
case LT_FREE_SPACING:
lex >> free_spacing;
break;
return;
case LATEX_PARAGRAPH:
case LATEX_COMMAND:
- case LATEX_ENVIRONMENT:
case LATEX_ITEM_ENVIRONMENT:
- case LATEX_BIB_ENVIRONMENT:
case LATEX_LIST_ENVIRONMENT:
latextype = static_cast<LatexType>(le);
break;
+ case LATEX_ENVIRONMENT:
+ case LATEX_BIB_ENVIRONMENT:
+ latextype = static_cast<LatexType>(le);
+ par_group_ = true;
+ break;
default:
LYXERR0("Unhandled value " << le);
break;
os << "\tEndLabelType Static\n";
break;
}
+ os << "\tParagraphGroup \"" << par_group_ << "\"\n";
if (!leftmargin.empty())
os << "\tLeftMargin \"" << to_utf8(leftmargin) << "\"\n";
if (!rightmargin.empty())
}
/// Is this the kind of layout in which adjacent paragraphs
/// are handled as one group?
- bool isParagraphGroup() const {
- return latextype == LATEX_ENVIRONMENT
- || latextype == LATEX_BIB_ENVIRONMENT;
- }
+ bool isParagraphGroup() const { return par_group_; }
///
bool labelIsInline() const {
return labeltype == LABEL_STATIC
docstring langpreamble_;
/// Language and babel dependent macro definitions needed for this layout
docstring babelpreamble_;
+ /// Are adjacent paragraphs handled as one group?
+ bool par_group_;
/// Packages needed for this layout
std::set<std::string> requires_;
///
// You should also run the development/tools/updatelayouts.py script,
// to update the format of all of our layout files.
//
-int const LAYOUT_FORMAT = 56; //spitz: New Float tags AllowedPlacement, AllowsWide, AllowsSideways
+int const LAYOUT_FORMAT = 57; //spitz: New Layout tag ParagraphGroup
namespace {