I'd like to produce two slightly different versions of a document. One will include confidential information, the other will be slightly redacted.
Is it possible to use an environment variable and the \if command to achieve this? I will compile the document twice, but with the environment variable set and not-set depending on which version I am trying to produce?
commentpackage can create environments which can be turned into comments, i.e. ignored, or included, see How to exclude text portions by simply setting a variable or option? For passing settings or a switch to the document see Passing parameters to a document. Both in combination should do what you want. – Martin Scharrer Jan 30 '19 at 10:35