<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix"><br>
    </div>
    <div class="moz-cite-prefix">On 4/15/20 7:24 PM, Richard Kimberly
      Heck wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:99c17bc6-8720-62fc-bee2-7a75ac8a7aa5@lyx.org">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <div class="moz-cite-prefix">On 3/27/20 12:53 PM, Matt Barnard
        wrote:<br>
      </div>
      <blockquote type="cite"
cite="mid:CAEkcm0HOK-fV7_oGYkQoQuWt-Eew3hwfLbVabQGqxRQOAJ8chQ@mail.gmail.com">
        <meta http-equiv="content-type" content="text/html;
          charset=UTF-8">
        <div dir="auto">That seemed to be the case, thanks for
          confirming.
          <div dir="auto">Is your patch on github? I have time now due
            to current events and could take a look at finishing it. <br>
          </div>
        </div>
      </blockquote>
      <p>I can't remember if I replied to this. It turned out that I
        hadn't done much work on the patch, but I've started working on
        it again, and it ought to be pretty close. You can see what I've
        got here:</p>
      <p>   
        <a class="moz-txt-link-freetext"
href="https://git.lyx.org/?p=developers/rgheck/lyx.git;a=log;h=refs/heads/features/Counters"
          moz-do-not-send="true">https://git.lyx.org/?p=developers/rgheck/lyx.git;a=log;h=refs/heads/features/Counters</a></p>
      <p>though it definitely needs some cleanup, even if it does
        actually work (which it probably doesn't). I'm hoping to work on
        it more over the next few days.</p>
    </blockquote>
    <p>I did finish this patch. It is now in master and will be in
      2.4.0.</p>
    <p>Riki</p>
    On Fri, Mar 27, 2020, 9:19 AM Richard Kimberly Heck <<a
      href="mailto:rikiheck@lyx.org" moz-do-not-send="true">rikiheck@lyx.org</a>>
    wrote:<br>
    <blockquote type="cite"
      cite="mid:99c17bc6-8720-62fc-bee2-7a75ac8a7aa5@lyx.org">
      <blockquote type="cite"
cite="mid:CAEkcm0HOK-fV7_oGYkQoQuWt-Eew3hwfLbVabQGqxRQOAJ8chQ@mail.gmail.com">
        <div class="gmail_quote">
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div>On 3/26/20 8:55 PM, Matt Barnard wrote:<br>
              </div>
              <blockquote type="cite">
                <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">
                <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" target="_blank"
                        rel="noreferrer" 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>
            </div>
          </blockquote>
        </div>
      </blockquote>
      <p><br>
      </p>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>