I was going through two of my own *.dtx files and noticed that the content between \StopEventually and \Finale would be hidden or displayed based on the document class and not on the setting of \OnlyDescription. That is the one document using l3doc displays the later half of the document while the document using ltxdoc does not. I toggled between the classes on both files and the behavior appears to be consistent.

Is it standard for ltxdoc not to print out the content between \StopEventually and \Finale ?

1 Answer 1


Firstly, ltxdoc is just a thin wrapper around the doc package and the article class, while l3doc is for now a much larger class file. Eventually l3doc will be split into a class and a package to document LaTeX3 code, much like ltxdoc and doc are for LaTeX2ε.

The doc package does not define \StopEventually directly, but by means of the macros \AlsoImplementation and \OnlyDescription, which turn on and off the implementation section of the documentation.
When you use \AlsoImplementation (the default), \StopEventually{<code>} makes it so that \Finale executes <code> (and checks the document's checksum), and nothing else.
When you use \OnlyDescription, \StopEventually{<code>} immediately does <code>\endinput, essentially ignoring everything else in the current file, which is what you see.

The idea is that you put \StopEventually{<code>} between the user documentation and the implementation section, so that with a simple switch you can turn the implementation section on and off.

l3doc behaves similarly, except that the documentation should be inside a documentation environment, and the implementation inside an implementation section. Then, the usual doc switches \AlsoImplementation and \OnlyDocumentation work as usual. Placing the contents inside an environment in l3doc makes it so that you have more control over the document, so you have four more switches: \EnableDocumentation and \EnableImplementation to enable each environment, and \DisableDocumentation and \DisableImplementation to disable them. l3doc also has the full and onlydoc options which are synonyms for the \AlsoImplementation and \OnlyDescription switches, respectively.

  • Thanks for the explanation I did not know about \AlsoImplmenetation and I certainly did not know about the two environments. Using l3doc simply compiled everything; since I was using neither environment. I appear to be using ltxdoc properly in but the implementation section is not compiled for some reason, I don't invoke \OnlyDescription within the document at all; perhaps i'vé set this globally and forgotten about it, i'll take a look.
    – Carel
    Commented Nov 15, 2019 at 8:16
  • @Carel The default is for the implementation to be printed, so something changed that, somewhere. If you show me the code I can find it out. Also note that you don't need to use \StopEventually. If you don't, then neither switch will have effect. Commented Nov 15, 2019 at 10:09

You must log in to answer this question.

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