Command/setinjector

From Wiki
< Command
Revision as of 11:38, 21 August 2020 by Willi (talk | contribs) (Created page with "Documentation for \setinjector")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


\setinjector

Summary

The command \setinjector is used for injecting actions on a TOC or register during the final stage of a document production: empty lines, page breaks etc.

Settings

\setinjector[...][...,...][...]
[...]name
[...,...]number
[...]command

OptionExplanation
name list,register
number entry number where the action must take place
command \blank, \page

Description

The command is only used in the final stage of the deocument development. It is providing a possibility to tweak the automatically assembled list.

The command \setinjector has three arguments. It works on automatically generated lists e.g. TOC, registers. The first argument gives the name of the list to which the injector applies. The second argument is a number denoting the number of the section to which the third argument applies. All section numbers are sequentially numbered throughout all section levels. The third argument contains a command which is injected at the point given in the second argument.

Before setting up \setinjector one needs to run the document with \showinjector enabled. This command will show the number of the different entries in the different lists in the left margin.

This mechanism allows the user to tweak the list e.g. when a page break must occur after a certain entry or one needs to insert white space after an entry. One needs to be aware of the fact, that the mechanism only works when no \setuplist[name][alternative=command,command=...] is used for the respective list.

Examples

Example 1

\setinjector[list][10][\page]

Example 2

\setinjector[list][1][{\blank[6*big]}]

Example 3

\setinjector[register][3][\column]

Notes

See also

Help from ConTeXt-Mailinglist/Forum

All issues with: