commit 20bcaec061193a3984d42040ee65d2723872ecf4 Author: Juergen Spitzmueller <sp...@lyx.org> Date: Thu May 29 14:10:32 2014 +0200
Add layout tag that determines if/when a paragraph can be indented. Fixes: #7327, #7458, #8670 diff --git a/lib/doc/Customization.lyx b/lib/doc/Customization.lyx index 41eaf63..f25ca0b 100644 --- a/lib/doc/Customization.lyx +++ b/lib/doc/Customization.lyx @@ -1,5 +1,5 @@ #LyX 2.1 created this file. For more info see http://www.lyx.org/ -\lyxformat 474 +\lyxformat 476 \begin_document \begin_header \textclass scrbook @@ -145,11 +145,12 @@ End \papercolumns 1 \papersides 2 \paperpagestyle headings -\tracking_changes false +\tracking_changes true \output_changes false \html_math_output 0 \html_css_as_file 0 \html_be_strict true +\author -712698321 "Jürgen Spitzmüller" \end_header \begin_body @@ -5850,6 +5851,10 @@ latex foiltex.ins \begin_layout Enumerate Now you need to decide if the package should be available for all users or only for you. +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -6144,6 +6149,10 @@ latex \begin_layout Enumerate Now one only need to tell LaTeX that there are new files. This depends on the used LaTeX-Distribution: +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -10495,6 +10504,10 @@ EndArgument . So a command with two optional arguments has: +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -12553,6 +12566,10 @@ Itemize, Bibliography \end_inset ] +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -12973,6 +12990,10 @@ LatexType \end_inset +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -13430,6 +13451,10 @@ Static \end_inset The kind of margin that the style has on the left side. +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -14504,6 +14529,128 @@ int=3 \series default The level of the style in the table of contents. This is used for automatic numbering of section headings. +\change_inserted -712698321 1401363541 + +\end_layout + +\begin_layout Description + +\change_inserted -712698321 1401363906 +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363547 +ToggleIndent +\end_layout + +\end_inset + + [ +\emph on + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363664 + +\emph on +default +\change_unchanged + +\end_layout + +\end_inset + + +\emph default +, +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363669 +always +\change_unchanged + +\end_layout + +\end_inset + +, +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363675 +never +\change_unchanged + +\end_layout + +\end_inset + +] This tag determines whether the first line indentation of this paragraph + can be toggled via the Paragraph settings dialog. + If +\emph on + +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363761 + +\emph off +default +\end_layout + +\end_inset + + +\emph default + is set, indentation can be toggled if the document settings use +\begin_inset Quotes eld +\end_inset + +indent +\begin_inset Quotes erd +\end_inset + + paragraph style, with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363844 +always +\end_layout + +\end_inset + +, indentation can always be toggled, notwithstanding the document settings, + with +\begin_inset Flex Code +status collapsed + +\begin_layout Plain Layout + +\change_inserted -712698321 1401363901 +never +\end_layout + +\end_inset + +, indentation can never be toggled. +\change_unchanged + \end_layout \begin_layout Description @@ -14602,6 +14749,10 @@ theorems-ams.inc \begin_layout LyX-Code Preamble +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -17314,6 +17465,10 @@ LatexType \end_inset +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper @@ -18249,6 +18404,10 @@ LabelStringAppendix to the same value. The following special constructs can be used in the string: +\begin_inset Separator parbreak +\end_inset + + \end_layout \begin_deeper diff --git a/lib/layouts/IEEEtran.layout b/lib/layouts/IEEEtran.layout index bdd44b5..7d6e2a5 100644 --- a/lib/layouts/IEEEtran.layout +++ b/lib/layouts/IEEEtran.layout @@ -345,6 +345,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/aastex.layout b/lib/layouts/aastex.layout index 9c3b866..6187e2c 100644 --- a/lib/layouts/aastex.layout +++ b/lib/layouts/aastex.layout @@ -405,6 +405,7 @@ Style References LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/agutex.layout b/lib/layouts/agutex.layout index 6cf2882..514d45a 100644 --- a/lib/layouts/agutex.layout +++ b/lib/layouts/agutex.layout @@ -210,6 +210,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/amsdefs.inc b/lib/layouts/amsdefs.inc index fcc1a29..1e39976 100644 --- a/lib/layouts/amsdefs.inc +++ b/lib/layouts/amsdefs.inc @@ -202,6 +202,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/apa.layout b/lib/layouts/apa.layout index 578918c..6df439d 100644 --- a/lib/layouts/apa.layout +++ b/lib/layouts/apa.layout @@ -357,6 +357,7 @@ Style Itemize LatexType Item_Environment LatexName APAitemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -379,6 +380,7 @@ Style Enumerate LatexType Item_Environment LatexName APAenumerate NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ParSkip 0.0 diff --git a/lib/layouts/apa6.layout b/lib/layouts/apa6.layout index f8c22f9..12f81cc 100644 --- a/lib/layouts/apa6.layout +++ b/lib/layouts/apa6.layout @@ -457,6 +457,7 @@ Style Itemize LatexType Item_Environment LatexName APAitemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -480,6 +481,7 @@ Style Enumerate LatexType Item_Environment LatexName APAenumerate NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ParSkip 0.0 diff --git a/lib/layouts/beamer.layout b/lib/layouts/beamer.layout index f5dfe60..b02f162 100644 --- a/lib/layouts/beamer.layout +++ b/lib/layouts/beamer.layout @@ -100,6 +100,7 @@ Style Itemize RightDelim > EndArgument NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -137,6 +138,7 @@ Style Enumerate RightDelim > EndArgument NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ParSkip 0.0 @@ -209,6 +211,7 @@ Style Part EndArgument NeedProtect 1 NextNoIndent 1 + ToggleIndent Never Labelsep xx ParSkip 0.4 TopSep 4 @@ -236,6 +239,7 @@ Style Section LatexName section NeedProtect 1 NextNoIndent 1 + ToggleIndent Never LabelSep xx ParSkip 0.4 TopSep 2 @@ -293,6 +297,7 @@ Style Subsection LatexName subsection NeedProtect 1 NextNoIndent 1 + ToggleIndent Never LabelSep xx ParSkip 0.4 TopSep 2 @@ -350,6 +355,7 @@ Style Subsubsection LatexName subsubsection NeedProtect 1 NextNoIndent 1 + ToggleIndent Never LabelSep xx ParSkip 0.4 TopSep 2 @@ -596,6 +602,7 @@ Style Column LabelType Static LabelSep xx LabelString "Start column (increase depth!), width:" + ToggleIndent Never Argument 1 MenuString "Column Options" LabelString "Options" @@ -1048,6 +1055,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 @@ -1075,6 +1083,7 @@ Style Quotation LatexType Environment LatexName quotation NextNoIndent 1 + ToggleIndent Always LeftMargin MMM RightMargin MMM ParIndent MM @@ -1100,6 +1109,7 @@ Style Quote LatexType Environment LatexName quote NextNoIndent 1 + ToggleIndent Never LeftMargin MMM RightMargin MMM TopSep 0.5 diff --git a/lib/layouts/cl2emult.layout b/lib/layouts/cl2emult.layout index e012f99..5ff8ed3 100644 --- a/lib/layouts/cl2emult.layout +++ b/lib/layouts/cl2emult.layout @@ -109,6 +109,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/egs.layout b/lib/layouts/egs.layout index 18cac86..6772b50 100644 --- a/lib/layouts/egs.layout +++ b/lib/layouts/egs.layout @@ -104,6 +104,7 @@ Style Quotation LatexType Environment LatexName quotation NextNoIndent 1 + ToggleIndent Always LeftMargin MMM RightMargin MMM ParIndent MM @@ -122,6 +123,7 @@ Style Quote LatexType Environment LatexName quote NextNoIndent 1 + ToggleIndent Never LeftMargin MMM RightMargin MMM TopSep 0.5 @@ -180,6 +182,7 @@ Style Itemize LatexType Item_Environment LatexName itemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -201,6 +204,7 @@ Style Description LatexType Item_environment LatexName description NextNoIndent 1 + ToggleIndent Never LeftMargin MM LabelSep xxx ParSkip 0.4 @@ -576,6 +580,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 @@ -586,7 +591,7 @@ Style Bibliography AlignPossible Block, Left LabelType Bibliography LabelString "References" - LabelBottomSep 0.7 + LabelBottomSep 0.7 LabelFont Series Bold EndFont diff --git a/lib/layouts/elsarticle.layout b/lib/layouts/elsarticle.layout index a5720e9..074cd5e 100644 --- a/lib/layouts/elsarticle.layout +++ b/lib/layouts/elsarticle.layout @@ -310,6 +310,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/ijmpc.layout b/lib/layouts/ijmpc.layout index bca85d3..f49ac24 100644 --- a/lib/layouts/ijmpc.layout +++ b/lib/layouts/ijmpc.layout @@ -286,6 +286,7 @@ Style ItemList LatexType Item_Environment LatexName itemlist NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -449,6 +450,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/ijmpd.layout b/lib/layouts/ijmpd.layout index 008a752..f7c5c81 100644 --- a/lib/layouts/ijmpd.layout +++ b/lib/layouts/ijmpd.layout @@ -289,6 +289,7 @@ Style ItemList LatexType Item_Environment LatexName itemlist NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -462,6 +463,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/iopart.layout b/lib/layouts/iopart.layout index 55d1941..3ecd4b1 100644 --- a/lib/layouts/iopart.layout +++ b/lib/layouts/iopart.layout @@ -269,6 +269,7 @@ Style "Bibliography (plain)" LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/jasatex.layout b/lib/layouts/jasatex.layout index a67dea4..ea102a2 100644 --- a/lib/layouts/jasatex.layout +++ b/lib/layouts/jasatex.layout @@ -272,6 +272,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/kluwer.layout b/lib/layouts/kluwer.layout index 872af1e..8ce45da 100644 --- a/lib/layouts/kluwer.layout +++ b/lib/layouts/kluwer.layout @@ -349,6 +349,7 @@ Style References LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/llncs.layout b/lib/layouts/llncs.layout index a8b07f6..0cede75 100644 --- a/lib/layouts/llncs.layout +++ b/lib/layouts/llncs.layout @@ -272,6 +272,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 @@ -282,7 +283,7 @@ Style Bibliography AlignPossible Block, Left LabelType Bibliography LabelString "References" - LabelBottomSep 0.7 + LabelBottomSep 0.7 LabelFont Series Bold EndFont diff --git a/lib/layouts/moderncv.layout b/lib/layouts/moderncv.layout index 61d2e59..1d204e8 100644 --- a/lib/layouts/moderncv.layout +++ b/lib/layouts/moderncv.layout @@ -465,6 +465,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/powerdot.layout b/lib/layouts/powerdot.layout index 7a3f19c..60824e9 100644 --- a/lib/layouts/powerdot.layout +++ b/lib/layouts/powerdot.layout @@ -257,6 +257,7 @@ Style Itemize LatexType Item_Environment LatexName itemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -305,6 +306,7 @@ Style Enumerate LatexType Item_Environment LatexName enumerate NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ParSkip 0.0 @@ -356,6 +358,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 @@ -378,6 +381,7 @@ Style Quotation LatexType Environment LatexName quotation NextNoIndent 1 + ToggleIndent Always LeftMargin MMM RightMargin MMM ParIndent MM @@ -399,6 +403,7 @@ Style Quote LatexType Environment LatexName quote NextNoIndent 1 + ToggleIndent Never LeftMargin MMM RightMargin MMM TopSep 0.5 diff --git a/lib/layouts/siamltex.layout b/lib/layouts/siamltex.layout index 282eee0..a4f6f58 100644 --- a/lib/layouts/siamltex.layout +++ b/lib/layouts/siamltex.layout @@ -328,6 +328,7 @@ Style Bibliography LatexType Bib_Environment LatexName thebibliography NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/simplecv.layout b/lib/layouts/simplecv.layout index ee4b033..9fb1992 100644 --- a/lib/layouts/simplecv.layout +++ b/lib/layouts/simplecv.layout @@ -89,6 +89,7 @@ Style Itemize LatexType Item_Environment LatexName itemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -157,6 +158,7 @@ Style Bibliography LatexType Bib_Environment LabelType Bibliography LabelBottomSep 0.7 + ToggleIndent Never LabelFont Size Tiny EndFont diff --git a/lib/layouts/stdlayouts.inc b/lib/layouts/stdlayouts.inc index 1e6deb8..73d928d 100644 --- a/lib/layouts/stdlayouts.inc +++ b/lib/layouts/stdlayouts.inc @@ -15,6 +15,7 @@ Style Quotation LatexType Environment LatexName quotation NextNoIndent 1 + ToggleIndent Always LeftMargin MMM RightMargin MMM ParIndent MM @@ -36,6 +37,7 @@ Style Quote LatexType Environment LatexName quote NextNoIndent 1 + ToggleIndent Never LeftMargin MMM RightMargin MMM TopSep 0.5 diff --git a/lib/layouts/stdlists.inc b/lib/layouts/stdlists.inc index de794b6..0d0dca1 100644 --- a/lib/layouts/stdlists.inc +++ b/lib/layouts/stdlists.inc @@ -16,6 +16,7 @@ Style Itemize LatexType Item_Environment LatexName itemize NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ItemSep 0.2 @@ -41,6 +42,7 @@ Style Enumerate LatexType Item_Environment LatexName enumerate NextNoIndent 1 + ToggleIndent Never LeftMargin MMN LabelSep xx ParSkip 0.0 diff --git a/lib/layouts/stdsections.inc b/lib/layouts/stdsections.inc index 82c3cec..37bac04 100644 --- a/lib/layouts/stdsections.inc +++ b/lib/layouts/stdsections.inc @@ -20,6 +20,7 @@ Style Part LatexName part NeedProtect 1 NextNoIndent 1 + ToggleIndent Never Labelsep xxx ParSkip 0.4 TopSep 4 @@ -51,6 +52,7 @@ Style Chapter LatexName chapter NeedProtect 1 NextNoIndent 1 + ToggleIndent Never ParSkip 0.4 TopSep 4 BottomSep 0.8 @@ -78,6 +80,7 @@ Style Section LatexName section NeedProtect 1 NextNoIndent 1 + ToggleIndent Never LabelSep xxx ParSkip 0.4 TopSep 1.3 diff --git a/lib/layouts/stdstruct.inc b/lib/layouts/stdstruct.inc index da79240..6583e1a 100644 --- a/lib/layouts/stdstruct.inc +++ b/lib/layouts/stdstruct.inc @@ -15,6 +15,7 @@ Style Abstract LatexName abstract Category FrontMatter NextNoIndent 1 + ToggleIndent Always LeftMargin MMM RightMargin MMM ParIndent MM @@ -56,6 +57,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/layouts/svcommon.inc b/lib/layouts/svcommon.inc index dd139ad..7b35222 100644 --- a/lib/layouts/svcommon.inc +++ b/lib/layouts/svcommon.inc @@ -577,6 +577,7 @@ Style Bibliography LatexName thebibliography Category BackMatter NextNoIndent 1 + ToggleIndent Never LeftMargin MM ParSkip 0.4 ItemSep 0 diff --git a/lib/scripts/layout2layout.py b/lib/scripts/layout2layout.py index 1326a81..62d5d6d 100644 --- a/lib/scripts/layout2layout.py +++ b/lib/scripts/layout2layout.py @@ -168,6 +168,9 @@ import os, re, string, sys # Incremented to format 50, 9 May 2014 by forenr # Removal of "Separator" layouts +# Incremented to format 51, 29 May 2014 by spitz +# New Style tag "ToggleIndent" + # Do not forget to document format change in Customization # Manual (section "Declaring a new text class"). @@ -399,6 +402,11 @@ def convert(lines): i += 1 continue + if format == 50: + # nothing to do. + i += 1 + continue + if format == 49: separator = [] diff --git a/src/Layout.cpp b/src/Layout.cpp index b7b7d1d..bb31287 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -105,6 +105,7 @@ enum LayoutTags { LT_RESETARGS, LT_RIGHTDELIM, LT_FORCELOCAL, + LT_TOGGLE_INDENT, LT_INTITLE // keep this last! }; @@ -148,6 +149,7 @@ Layout::Layout() spellcheck = true; forcelocal = 0; itemcommand_ = "item"; + toggle_indent = ITOGGLE_DOCUMENT_DEFAULT; } @@ -243,6 +245,7 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass) { "spellcheck", LT_SPELLCHECK }, { "textfont", LT_TEXTFONT }, { "toclevel", LT_TOCLEVEL }, + { "toggleindent", LT_TOGGLE_INDENT }, { "topsep", LT_TOPSEP } }; @@ -383,6 +386,19 @@ bool Layout::readIgnoreForcelocal(Lexer & lex, TextClass const & tclass) lex >> nextnoindent; break; + case LT_TOGGLE_INDENT: { + string tog; + lex >> tog; + tog = support::ascii_lowercase(tog); + if (tog == "always") + toggle_indent = ITOGGLE_ALWAYS; + else if (tog == "never") + toggle_indent = ITOGGLE_NEVER; + else + toggle_indent = ITOGGLE_DOCUMENT_DEFAULT; + break; + } + case LT_COMMANDDEPTH: lex >> commanddepth; break; diff --git a/src/Layout.h b/src/Layout.h index d0abcec..0f5ebbf 100644 --- a/src/Layout.h +++ b/src/Layout.h @@ -280,6 +280,8 @@ public: /// bool nextnoindent; /// + ToggleIndentation toggle_indent; + /// bool free_spacing; /// bool pass_thru; diff --git a/src/LayoutEnums.h b/src/LayoutEnums.h index c90c968..8bb206c 100644 --- a/src/LayoutEnums.h +++ b/src/LayoutEnums.h @@ -64,6 +64,17 @@ enum LyXAlignment { LYX_ALIGN_DECIMAL = 64 }; + +/// Paragraph indendation control +enum ToggleIndentation { + /// Indentation can be toggled if document uses "indent" paragraph style + ITOGGLE_DOCUMENT_DEFAULT = 1, + /// Indentation cannot be toggled + ITOGGLE_NEVER, + /// Indentation can always be toggled + ITOGGLE_ALWAYS +}; + /// inline void operator|=(LyXAlignment & la1, LyXAlignment la2) { diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index c551ea0..75f0171 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -2237,7 +2237,8 @@ int Paragraph::Private::startTeXParParams(BufferParams const & bparams, { int column = 0; - if (params_.noindent() && !layout_->pass_thru) { + if (params_.noindent() && !layout_->pass_thru + && (layout_->toggle_indent != ITOGGLE_NEVER)) { os << "\\noindent "; column += 10; } diff --git a/src/frontends/qt4/GuiParagraph.cpp b/src/frontends/qt4/GuiParagraph.cpp index 306085d..975b651 100644 --- a/src/frontends/qt4/GuiParagraph.cpp +++ b/src/frontends/qt4/GuiParagraph.cpp @@ -227,7 +227,7 @@ void GuiParagraph::applyView() // label width params_.labelWidthString(qstring_to_ucs4(labelWidth->text())); - // indendation + // indentation params_.noindent(!indentCB->isChecked()); dispatchParams(); @@ -336,8 +336,11 @@ bool GuiParagraph::haveMultiParSelection() const bool GuiParagraph::canIndent() const { - return buffer().params().paragraph_separation - == BufferParams::ParagraphIndentSeparation; + Layout const lay = bufferview()->cursor().innerParagraph().layout(); + if (buffer().params().paragraph_separation + == BufferParams::ParagraphIndentSeparation) + return (lay.toggle_indent != ITOGGLE_NEVER); + return (lay.toggle_indent == ITOGGLE_ALWAYS); }