From Wiki
Jump to navigation Jump to search



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.



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


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.


Example 1


Example 2


Example 3



See also

Help from ConTeXt-Mailinglist/Forum

All issues with: