mPDF Manual – HTML control tags

indexinsert

(mPDF >= 3.0)

indexinsert  — Generate an Index for the document

Description

<indexinsert [ $font ] [$font-size ] [ $line-spacing ] [$cols ] [ $gap ] [$offset ] [ $links ] [$usedivletters ] [ $div-font ] [$div-font-size ] />

From mPDF v 6.0 onwards, the attributes have changed. See Indexes for more information. The following is for mPDF >= v6.0:

<indexinsert [ $links ] [$usedivletters ] [ $collation ] [$collation-group ] />

Inserts an Index for the document based on index entries made using <indexentry> or CreateIndex().

Attributes

$font Set the font-family for the Index. BLANK or omitted uses default font-family for the document.$font-size

Sets the font size for the Index in points (pt)

BLANK or omitted or 0 uses the default font-size for the document.

$line-spacing Sets the line-height used for index entries. Usual values between 1.0 and 1.4. BLANK or omitted or 0 uses the default value of the document. DEFAULT: 1.2$cols

Set the number of (vertical) columns to use for the Index

BLANK or omitted or 0 or 1 uses the whole page is used as one column.

DEFAULT: 1

$gap Sets the gap between columns (if set) in millimeters. BLANK or omitted uses the default value. DEFAULT: 5 (mm)$offset

Sets the text indent (in mm) for subsequent lines, if an index entry flows onto two or more lines.

BLANK or omitted uses a default value of 3mm.

 $links = 1 on 0 off Specify whether to generate hyperlinks to the pages in the Index. BLANK or omitted uses a default value of OFF. DEFAULT: OFF Values (case-insensitive) ON or 1: show hyperlinks in the Index OFF or 0: do not show hyperlinks in the Index $usedivletters = 1 on 0 off -1

Specify whether to insert a CAPITAL letter to divide each group of entries starting with the same letter in the Index.

BLANK or omitted uses a default value of ON.

DEFAULT: ON

Values (case-insensitive)

ON or 1 or Omitted: show dividing letters in the Index.

OFF or 0 or -1: do not show dividing letters in the Index.

$div-font Set the font-family for the dividing letters in the Index. NB Will always appear in BOLD style. BLANK or omitted uses default font-family for the document.$div-font-size

Sets the font size for the dividing letters  in the Index in points (pt)

BLANK or omitted or 0 uses the default font-size for the document.

$$indexCollationLocale Set a Locale to determine the overall sort order of index entries e.g. ‘en_GB.utf8’. Available options are determined by the locales available in your system configuration. Always use a utf-8 locale. BLANK or omitted uses current locale set in your system.$$indexCollationGroup

If you have set your index to use Dividing letters, this value will determine how letters are grouped under a dividing letter. Values should be selected from the files in folder /collations/ e.g. ‘English_United_Kingdom’

NB This will not affect the overall order of entries, which is determined by the value above.

BLANK or omitted - grouping occurs under the first letter of the index entries.

Changelog

VersionDescription
6.0 Parameters removed: $font |$font-size | $line-spacing |$cols | $gap |$offset | $links |$usedivletters $|$div-font$| div-font-size Parameters added:$collation | \$collation-group