function IndexEntry($txt, $xref = '')
	{
		if ($xref) {
			$this->IndexEntrySee($txt, $xref);
			return;
		}

		// Search the reference (AND Ref/PageNo) in the array
		$Present = false;
		if ($this->keep_block_together) {
			// do nothing
		} /* -- TABLES -- */ elseif ($this->kwt) {
			$size = count($this->kwt_Reference);
			for ($i = 0; $i < $size; $i++) {
				if (isset($this->kwt_Reference[$i]['t']) && $this->kwt_Reference[$i]['t'] == $txt) {
					$Present = true;
					if ($this->page != $this->kwt_Reference[$i]['op']) {
						$this->kwt_Reference[$i]['op'] = $this->page;
					}
				}
			}
			if (!$Present) { // If not found, add it
				$this->kwt_Reference[] = ['t' => $txt, 'op' => $this->page];
			}
		} /* -- END TABLES -- */ else {
			$size = count($this->Reference);
			for ($i = 0; $i < $size; $i++) {
				if (isset($this->Reference[$i]['t']) && $this->Reference[$i]['t'] == $txt) {
					$Present = true;
					if (!in_array($this->page, $this->Reference[$i]['p'])) {
						$this->Reference[$i]['p'][] = $this->page;
					}
				}
			}
			if (!$Present) { // If not found, add it
				$this->Reference[] = ['t' => $txt, 'p' => [$this->page]];
			}
		}
	}