X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FLayout.cpp;h=4d0a468d2b8b1980f1e0baa76c25e7951faf5598;hb=12dbcf2ee1792391a81d265ee8875ccf621033ca;hp=903fb24162dad4021a1bba84bffb4897a06c4db0;hpb=4a53fa6e018c2809a3e829c7d8d90590e420a2e3;p=lyx.git diff --git a/src/Layout.cpp b/src/Layout.cpp index 903fb24162..4d0a468d2b 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -115,7 +115,7 @@ Layout::Layout () labelbottomsep = 0.0; parsep = 0; align = LYX_ALIGN_BLOCK; - alignpossible = LYX_ALIGN_BLOCK; + alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT; labeltype = LABEL_NO_LABEL; endlabeltype = END_LABEL_NO_LABEL; // Should or should not. That is the question. @@ -241,7 +241,8 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) case LT_OBSOLETEDBY: // replace with a known style if (lexrc.next()) { - docstring const style = lexrc.getDocString(); + docstring const style = + subst(lexrc.getDocString(), '_', ' '); if (tclass.hasLayout(style)) { docstring const tmpname = name_; @@ -262,7 +263,7 @@ bool Layout::read(Lexer & lexrc, TextClass const & tclass) case LT_DEPENDSON: if (lexrc.next()) - depends_on_ = lexrc.getDocString(); + depends_on_ = subst(lexrc.getDocString(), '_', ' '); break; case LT_MARGIN: // margin style definition. @@ -551,7 +552,7 @@ void Layout::readAlignPossible(Lexer & lexrc) }; lexrc.pushTable(alignTags, AT_LAYOUT); - alignpossible = LYX_ALIGN_NONE; + alignpossible = LYX_ALIGN_NONE | LYX_ALIGN_LAYOUT; int lineno = lexrc.getLineNo(); do { int le = lexrc.lex();