2

In docstrip, there is something called guard. For example, %<*install> and %</install> are used for producing the .ins installation file. %<*driver> and %</driver> are used for the documentation.

  • What is the function of the internal guard (see the post of Joseph Wright for example)?
  • How many predefined guards there are?

1 Answer 1

3

There are no predefined guards, the use of install and driver in this manner is at best conventional. In the batch file options get passed to \from which decide which guards are active when building the current file.

Therefore it's not possible to say in general what internal is used for without seeing the actual package / batch file.

Sometimes there is a guard which which is not referenced by any \from in the batch file, often named gobble or internal. Since it is never referenced it is always inactive and the code guarded by it is never written into any output file. These are useful to add some commands to the .dtx file without having it appear anywhere else.

1
  • Comments are not for extended discussion; this conversation has been moved to chat.
    – Joseph Wright
    Commented Dec 27, 2022 at 9:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .