public ITableOfContent appendHead(String rawHead, int headLevel,
boolean noToC, int headCounter, int startPosition, int endPosition) {
TagStack localStack = WikipediaParser.parseRecursive(rawHead.trim(),
this, true, true);
HTMLBlockTag headTagNode = new HTMLBlockTag("h" + headLevel,
Configuration.SPECIAL_BLOCK_TAGS);
TagNode spanTagNode = new TagNode("span");
// Example:
// <h2><span class="mw-headline" id="Header_level_2">Header level
// 2</span></h2>
spanTagNode.addChildren(localStack.getNodeList());
headTagNode.addChild(spanTagNode);
String tocHead = headTagNode.getBodyString();
String anchor = Encoder.encodeDotUrl(tocHead);
createTableOfContent(false);
if (!noToC && (headCounter > 3)) {
fTableOfContentTag.setShowToC(true);
}