<commit_before>// .\=(@counters) {
//   counter-reset: @counters;
// }
// .\+(@counters) {
//   counter-increment: @counters;
// }

// div[data-type='book']{
//   .\=(chapter);
// }

// div[data-type='chapter'] {
//   .\=(section figure table list);
//   .\+(chapter);

//   div[data-type="page"] {
//     .\=(subsection);
//     .\+(section);
//   }
//   .eoc-exercises {
//     .\=(exercise);
//   }
//   div[data-type='exercise'] {
//     .\+(exercise);
//   }
//   // <div data-type="document-title">Stuff</div>
//   // becomes
//   // <div data-type="document-title"><span class="titling">1</span><span class="titling">Stuff</span></div>
//   > div[data-type='document-title'] {
//     string-set: chapter-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       content: counter(chapter);
//     }
//     &::span {
//       class: 'titling';
//       content: string(chapter-title);
//     }
//   }

//   div[data-type="page"] {
//     .\=(subsection);
//     .\+(section);

//     > div[data-type='document-title'] {
//       string-set: section-title content();
//       content: '';

//       &::span {
//         class: 'titling';
//         content: counter(chapter) '.' counter(section);
//       }
//       &::span {
//         class: 'titling';
//         content: string(section-title);
//       }
//     }
//     > section {
//         .\+(subsection);
//     }
//   }

//   .eoc-section-summary > section h1.title {
//     string-set: section-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       // This implies that group-by stores a "xref" attribute
//       // with a cross reference, eg #id-5352435.
//       // These are an INTERNAL cross reference, they are not baked in
//       // to the cooked document as attributes.
//       content: target-counter(attr(xref), chapter) '.' target-counter(attr(xref), section);
//     }
//     &::span {
//       class: 'titling';
//       content: string(section-title);
//     }
//   }
//   .eoc-exercises div[data-type='problem']::before {
//     content: 'Exercise ' counter(exercise);
//   }
// }


// .x-numb () {
//   .\=(exercise);

//   > section h1.title {
//     string-set: section-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       content: target-counter(attr(xhref), chapter) '.' target-counter(attr(xref), section);
//     }
//     &::span {
//       class: 'titling';
//       content: string(section-title);
//     }
//   }

//   div[data-type='exercise'] {
//   //  .\+(exercise);
//   }
//   div[data-type='problem'] {
//     &::before {
//       content: counter(exercise) '.';
//       // If you needed to, you could also do this with
//       // the internal cross references and target-counter
//       // instead of "recounting" them here. Sometimes it's
//       // basic and this "easy" way is fine, sometimes it isn't...
//     }
//   }
// }
body {
  counter-reset: chapter;
  div[data-type="chapter"] {
    pass: @pass-20-numbering-eoc;
    counter-reset: exercises;
  }
  div[data-type="chapter"] {
    counter-reset: section;
    counter-reset: example;
    counter-reset: lab;
    counter-increment: chapter;

    &::before {
      container: span;
      class: "number";<commit_msg>'Number' appendix titles, even though old ones are still in content<commit_after>// .\=(@counters) {
//   counter-reset: @counters;
// }
// .\+(@counters) {
//   counter-increment: @counters;
// }

// div[data-type='book']{
//   .\=(chapter);
// }

// div[data-type='chapter'] {
//   .\=(section figure table list);
//   .\+(chapter);

//   div[data-type="page"] {
//     .\=(subsection);
//     .\+(section);
//   }
//   .eoc-exercises {
//     .\=(exercise);
//   }
//   div[data-type='exercise'] {
//     .\+(exercise);
//   }
//   // <div data-type="document-title">Stuff</div>
//   // becomes
//   // <div data-type="document-title"><span class="titling">1</span><span class="titling">Stuff</span></div>
//   > div[data-type='document-title'] {
//     string-set: chapter-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       content: counter(chapter);
//     }
//     &::span {
//       class: 'titling';
//       content: string(chapter-title);
//     }
//   }

//   div[data-type="page"] {
//     .\=(subsection);
//     .\+(section);

//     > div[data-type='document-title'] {
//       string-set: section-title content();
//       content: '';

//       &::span {
//         class: 'titling';
//         content: counter(chapter) '.' counter(section);
//       }
//       &::span {
//         class: 'titling';
//         content: string(section-title);
//       }
//     }
//     > section {
//         .\+(subsection);
//     }
//   }

//   .eoc-section-summary > section h1.title {
//     string-set: section-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       // This implies that group-by stores a "xref" attribute
//       // with a cross reference, eg #id-5352435.
//       // These are an INTERNAL cross reference, they are not baked in
//       // to the cooked document as attributes.
//       content: target-counter(attr(xref), chapter) '.' target-counter(attr(xref), section);
//     }
//     &::span {
//       class: 'titling';
//       content: string(section-title);
//     }
//   }
//   .eoc-exercises div[data-type='problem']::before {
//     content: 'Exercise ' counter(exercise);
//   }
// }


// .x-numb () {
//   .\=(exercise);

//   > section h1.title {
//     string-set: section-title content();
//     content: '';

//     &::span {
//       class: 'titling';
//       content: target-counter(attr(xhref), chapter) '.' target-counter(attr(xref), section);
//     }
//     &::span {
//       class: 'titling';
//       content: string(section-title);
//     }
//   }

//   div[data-type='exercise'] {
//   //  .\+(exercise);
//   }
//   div[data-type='problem'] {
//     &::before {
//       content: counter(exercise) '.';
//       // If you needed to, you could also do this with
//       // the internal cross references and target-counter
//       // instead of "recounting" them here. Sometimes it's
//       // basic and this "easy" way is fine, sometimes it isn't...
//     }
//   }
// }
body {
  counter-reset: appendix;
  counter-reset: chapter;
  div.appendix {
    counter-increment: appendix;
    &::before {
      container: span;
      class: "label";
      content: "Appendix";
      move-to: appendixLabel
    }
    &::before {
      container: span;
      class: "number";
      content: counter(appendix, upper-alpha);
      move-to: appendixNumber;
    }
    &::before {
      content: ": ";
      container: span;
      class: "divider";
      move-to: appendixDivider;
    }
    > div[data-type="document-title"] {
      container: h1;
      content: pending(appendixLabel) " " pending(appendixNumber) pending(appendixDivider) content() ;
    }
  }
  div[data-type="chapter"] {
    pass: @pass-20-numbering-eoc;
    counter-reset: exercises;
  }
  div[data-type="chapter"] {
    counter-reset: section;
    counter-reset: example;
    counter-reset: lab;
    counter-increment: chapter;

    &::before {
      container: span;
      class: "number";
{'fraction_non_alphanumeric': 0.21782178217821782, 'fraction_numerical': 0.003437843784378438, 'mean_word_length': 1.8656422379826636, 'pattern_counts': {'":': 1, '<': 19, '<?xml version=': 0, '>': 30, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7571648', 'n_tokens_mistral': 2483, 'n_tokens_neox': 2392, 'n_words': 455}