<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 3/26/20 8:55 PM, Matt Barnard wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEkcm0FSW87zTSGO+yjqB=+k_=SCE4k2fYaySgswq3cAjf+-tw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">Sure, see attached. Adjusting the LyX numbering
          like this is something I've found myself wanting to do a
          number of times.</div>
      </div>
    </blockquote>
    <p>Yes, the only to fix this in LyX itself would be with some LaTeX
      trickery of the sort you describe below. There's not currently any
      way to manipulate LyX's counters within the text itself. I have a
      partial patch that will do this kind of thing but haven't had time
      to finish it.<br>
    </p>
    <p>Riki</p>
    <p><br>
    </p>
    <blockquote type="cite"
cite="mid:CAEkcm0FSW87zTSGO+yjqB=+k_=SCE4k2fYaySgswq3cAjf+-tw@mail.gmail.com">
      <div dir="ltr">
        <div dir="ltr">
          <div><br>
            <div>Example (attached)</div>
            <div>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px
                0.8ex;border-left:1px solid
                rgb(204,204,204);padding-left:1ex"><font
                  face="monospace">\setcounter{part}{9}</font><font
                  face="monospace"><br>
                </font><font face="monospace">Part 10 My document starts
                  on Part 10</font><font face="monospace"><br>
                </font><font face="monospace">1 with one section</font><font
                  face="monospace"><br>
                </font><font face="monospace">\addcontentsline{toc}{part}{*By
                  the way,}*By the way,</font><font face="monospace"><br>
                </font><font face="monospace">This chapter is an aside,
                  but it needs to be at the Part level in the ToC</font><font
                  face="monospace"><br>
                </font><font face="monospace">\setcounter{part}{9}</font><font
                  face="monospace"><br>
                </font><font face="monospace">Part 11 then we continue
                  with Part 10</font><font face="monospace"><br>
                </font><font face="monospace">2 but LyX says this is
                  Part 11</font></blockquote>
              <div><br>
              </div>
              <div>Note that I resolved this for now using the
                following:</div>
            </div>
            <div><br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace">\newcounter{previouschapter}<br>
              </font><font face="monospace">\newcounter{previoussection}<br>
              </font><font face="monospace">\newcounter{uniquechapteranchor}<br>
              </font><font face="monospace">\newcommand{\pushchapter}{%<br>
              </font><font face="monospace">  \let\previouschaptertitle\parttitle%</font><br>
            </blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace"> 
                \setcounter{previouschapter}{\value{part}}%</font><font
                face="monospace"><br>
              </font><font face="monospace"> 
                \setcounter{previoussection}{\value{section}}%<br>
              </font><font face="monospace">}<br>
                \newcommand{\popchapter}{%<br>
  \renewcommand*{\theHpart}{\value{uniquechapteranchor}\the\value{part}} 
                % for hyperref</font></blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace"> 
                \chapt{\value{previouschapter}}                         
                         % shorthand for \setcounter{part}{n-1}</font><font
                face="monospace"><br>
              </font><font face="monospace"> 
                \part{\previouschaptertitle~(cont.)}%<br>
              </font><font face="monospace"> 
                \sect{\value{previoussection}}%<br>
              </font><font face="monospace">  \stepcounter{section}%<br>
              </font><font face="monospace"> 
                \stepcounter{uniquechapteranchor}%<br>
              </font><font face="monospace">}</font></blockquote>
            <div><br>
            </div>
            <div>and then </div>
            <div> <br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace">\part{Real </font>
              part  <font face="monospace">}</font> </blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace">\pushchapter<br>
                \part*{Interrupting part}</font> </blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace">\popchapter
                % output a new part, but don't start a new part in LyX</font></blockquote>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex"><font face="monospace">\section{this
                is in real </font>
              part<font face="monospace">} </font></blockquote>
            <div> </div>
            <div>LyX continues numbering with the previous part even
              though I write a new part in the output</div>
          </div>
        </div>
        <br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">On Thu, Mar 26, 2020 at 4:57
            PM Richard Kimberly Heck <<a
              href="mailto:rikiheck@lyx.org" moz-do-not-send="true">rikiheck@lyx.org</a>>
            wrote:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0px 0px 0px
            0.8ex;border-left:1px solid
            rgb(204,204,204);padding-left:1ex">
            <div>
              <div>On 3/26/20 4:16 PM, Matt Barnard wrote:<br>
              </div>
              <blockquote type="cite">
                <div dir="ltr">Hello,
                  <div><br>
                  </div>
                  <div>I'm interrupting a numbered chapter with an
                    unnumbered chapter, and I would like to continue
                    sections within that previous numbered chapter. I've
                    done this on the output side with <font
                      face="monospace">\setcounter{part}</font><font
                      face="arial, sans-serif">, but in LyX the chapter
                      number is still incremented.</font></div>
                  <div><font face="arial, sans-serif"><br>
                    </font></div>
                  <div><font face="arial, sans-serif">I've fixed this
                      for the first instance using the local layout</font></div>
                  <blockquote style="margin:0px 0px 0px
                    40px;border:none;padding:0px">
                    <div>
                      <p style="margin:0px;white-space:pre-wrap"><font face="monospace">Counter part</font></p>
                    </div>
                    <div>
                      <p style="margin:0px;white-space:pre-wrap"><font face="monospace">  InitialValue 12</font></p>
                    </div>
                    <div>
                      <p style="margin:0px;white-space:pre-wrap"><font face="monospace">End</font></p>
                    </div>
                  </blockquote>
                  <div>
                    <p style="margin:0px;white-space:pre-wrap">but I haven't found a way to give LyX a command mid-document to adjust numbering.</p>
                    <p style="margin:0px;white-space:pre-wrap">Is this currently supported?</p>
                  </div>
                </div>
              </blockquote>
              <p>I'm not sure I entirely understand the issue. Can you
                post a very simple example file?</p>
              <p>Riki</p>
              <p><br>
              </p>
            </div>
          </blockquote>
        </div>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>