title: Docx4j - indent table
body: <p>I have a nice little problem with docx4j. I have a document which I build from a template (replace MailMerge fields and adding text to it)
  In this document I want to insert two tables. So far, everything works fine, no problem here.
  I just want to indent my tables, to put a tab in front of it.</p>
  
  <p>I work with a class which represents the docx4j document and work with helper methods like these:</p>
  
  <pre><code>public void buildTable(Map&lt;String, String&gt; data, boolean indent) {      
      Tbl table = factory.createTbl();
      Tr tableRow = null;
  
      for (String key : data.keySet()) {
          tableRow = factory.createTr();
  
          addTableCell(tableRow, key);
          addTableCell(tableRow, data.get(key));
          table.getContent().add(tableRow);           
      }
  
      if (indent) {
          R run = factory.createR();
          P para = factory.createP();
          R.Tab tab = factory.createRTab();
  
          run.getContent().add(tab);
          para.getContent().add(run);
  
          table.setParent(para);
  
          documentPart.addObject(para);
          documentPart.addObject(table);
  
      } else {
          documentPart.addObject(table);
      }       
  }
  </code></pre>
  
  <p>I have tried different things, the tab is inserted. But either my table isn't rendered or my it is appended below the tabs. <br/>
  I tried to add the table to the run object -> No table<br/>
  to the paragraph object -> No table<br/>
  setting the paragraph as parent for the table and then add the table -> table below the tabbed paragraph<br/></p>
  
  <p>So... obviously I'm doing something wrong. Do you have a solution for this problem?
  I saw that the text object has a property like text.setSpace("preserve"); to preserve the space for the text, is there something similar for the table object?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Matthias</p>