title: Numbered lists continues when Apps Script appends template-content into document
body: <p>I have an Apps Script that copies the content of an template-file to the end of a document. It works with one minor annoyance: the numbered list continues from one copy to the next.</p>
  
  <p>I have many different templates that users can append to the end of the document. Each template is stored in its own Document.</p>
  
  <pre><code>    function addSub(template_id){
        var mainBody = DocumentApp.getActiveDocument().getBody();
        var tempBody = DocumentApp.openById(template_id).getBody();
        for(var i = 0;i&lt;tempBody .getNumChildren();i++){
          var element = tempBody .getChild(i);
          if(element.getType() == DocumentApp.ElementType.TABLE)
            mainBody.appendTable(element.copy());
          else if(element.getType() == DocumentApp.ElementType.PARAGRAPH)
            mainBody.appendParagraph(element.copy());
          else if(element.getType() == DocumentApp.ElementType.LIST_ITEM)
            mainBody.appendListItem(element.copy());
          else if(element.getType() == DocumentApp.ElementType.PAGE_BREAK)
            mainBody.appendPageBreak(element.copy());
        }
      }
  </code></pre>
  
  <p>It could look like this: ( I want the list to reset for each new copy of the template)</p>
  
  <p><strong>table with name of this template</strong></p>
  
  <p>some raw text</p>
  
  <ol>
  <li>List item1</li>
  <li>List item2</li>
  </ol>
  
  <p><strong>table with name of this template</strong></p>
  
  <p>some raw text</p>
  
  <ol start="3">
  <li>List item1</li>
  <li>List item2</li>
  </ol>