0

This question already has an answer here:

I have a project which compiles a document written in LaTeX, compiled to PDF with xelatex.

I would like to automatically produce 2 versions of the document:

  • A "confidential" version which all sections included and special page-headers which indicate that the document contains sensitive information.

  • A "redacted" version which includes a cover sheet explaining that the document has been redacted, no special headers, and those certain sections removed. It doesn't have to be blacked-out, but it would be nice if I could replace the text with something which indicates where a redaction has taken place.

I was thinking of implementing this with an additional pre-compilation step. I could easily write a Python script that prepares 2 versions of the .tex files, however, I was wondering if there's a more idiomatic way to solve this problem.

Does LaTeX have a method that would allow me to automatically include one thing or another thing depending on a command-line argument or an environment variable? Or is there some other more Texy way of solving this problem?

marked as duplicate by CarLaTeX, Stefan Pinnow, dexteritas, TeXnician, Sebastiano Jan 17 at 9:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

migrated from stackoverflow.com Jan 17 at 5:56

This question came from our site for professional and enthusiast programmers.

Browse other questions tagged or ask your own question.