/**
   * Process a list (text:ordered-lst or text:unordered-list tag)
   *
   * @param node The element containing the list
   * @param ldp the <code>LaTeXDocumentPortion</code> to which LaTeX code should be added
   * @param oc the current context
   */
  public void handleList(Element node, LaTeXDocumentPortion ldp, Context oc) {
    // Set up new context
    Context ic = (Context) oc.clone();
    ic.incListLevel();

    // Get the style name, if we don't know it already
    if (ic.getListStyleName() == null) {
      ic.setListStyleName(node.getAttribute(XMLString.TEXT_STYLE_NAME));
    }

    // Use the style to determine the type of list
    ListStyle style = ofr.getListStyle(ic.getListStyleName());
    boolean bOrdered = style != null && style.isNumber(ic.getListLevel());

    // If the list contains headings, ignore it!
    if (ic.isIgnoreLists() || listContainsHeadings(node)) {
      ic.setIgnoreLists(true);
      traverseList(node, ldp, ic);
      return;
    }

    // Apply the style
    BeforeAfter ba = new BeforeAfter();
    palette
        .getListSc()
        .applyListStyle(
            ic.getListStyleName(),
            ic.getListLevel(),
            bOrdered,
            "true".equals(node.getAttribute(XMLString.TEXT_CONTINUE_NUMBERING)),
            ba);

    // Export the list
    if (ba.getBefore().length() > 0) {
      ldp.append(ba.getBefore()).nl();
    }
    traverseList(node, ldp, ic);
    if (ba.getAfter().length() > 0) {
      ldp.append(ba.getAfter()).nl();
    }
  }