indexinsert
(mPDF ≥ 3.0)
indexinsert — Generate an Index for the document
Description
Upto mPDF < v6.0:
<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().
Note: Since mPDF ≥ 6.0 some attributes are removed: $font, $font-size, $line-spacing, $cols, $gap and $offset
Attributes
- $font
-
(mPDF < 6.0) Set the font-family for the Index.
BLANK or omitted uses default font-family for the document.
- $font-size
-
(mPDF < 6.0) 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
-
(mPDF < 6.0) 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
-
(mPDF < 6.0) 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
-
(mPDF < 6.0) Sets the gap between columns (if set) in millimeters.
BLANK or omitted uses the default value.
Default:
'5'
(mm) - $offset
-
(mPDF < 6.0) 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 3 mm.
- $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 directory /data/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
Version | Description |
---|---|
3.0 | Tag was added. |
6.0 |
Parameters removed: $font, $font-size, $line-spacing, $cols, $gap, $offset, $links, $usedivletters, $div-font and $div-font-size Parameters added: $collation and $collation-group |
Examples
<html>
Text of document...
<indexentry content="Buffalo" />Your text which refers to a buffalo, which
you would like to see in the Index
...rest of document
<pagebreak />
<h2>Index</h2>
<indexinsert usedivletters="on" links="on" collation="en_US.utf8"
collation-group="English_United_States"/>
</html>