How to obfuscate my LaTeX document?

My LaTeX document uncovers bugs in some LaTeX tools. Therefore I would like to provide the LaTeX sources to the tool author.

My problem is that the document I am writing on has to be kept secret and is very large. Therefore I tried to create an "minimal example" demonstrating the bug. But that does not work because the bug is very difficult to reproduce and seems to depend on the combination of a number of used LaTeX features.

Is there an easy way to obfuscate / replace all my text content (including all sections headers, captions, labels, itemize items, citations, ...) with "Lorem ipsum" or similar text garbage so that I could provide an example document demonstrating the bug?

• It's not as good as the answer by Alex, but the package lipsum generates the "Lorem ipsum" blocks of text. – qubyte Nov 29 '11 at 11:57
• @Mark: My question is not about generating a document without content it is about converting an existing document, preserving all used LaTeX featured but not the text content. – Robert Nov 29 '11 at 12:01
• IMHO a LuaTeX approach might be suitable. :) – Paulo Cereda Nov 29 '11 at 12:05
• When you submit bug reports you should isolate the bug. That points to creating a MWE, thus making this exercise a little pointless IMO. – qubyte Nov 29 '11 at 12:26
• @MarkS.Everitt: You are right of course – in general. However, so far for the theory: Sometimes there are bugs that just show up when the documents contains more than a hundred nontrivial sections in combination with a certain load-order of packages. Consider some internal counter overflow cause by the interaction of two packages. Or sudden crash of pdflatex (no error message at all). I had all that, learning that sometimes a problem is just not reproducible with a "minimal" WE. I think the OP made clear that this is his problem. – Daniel Nov 29 '11 at 12:47

You might like the blindtext package. From the description on CTAN:

The package provides the commands \blindtext and \Blindtext for creating ‘blind' text useful in testing new classes and packages, and \blinddocument, \Blinddocument for creating an entire random document with sections, lists, mathematics, etc.

That sounds like the sort of thing you’re looking for. If you fill the document with blind text, you should be able to spot the bugs without giving out your secret information

• That would be useful if I would know what combination of features is causing the bug. My document has more than 100 pages containing dozens of figures, tables, itemize environments, referencres, citations... If I change to much on the structure the bug is gone. – Robert Nov 29 '11 at 11:58
• @Robert ho hum, I see. In which case, I’m afraid I don’t have any more suggestions. Sorry I can’t be more useful. – alexwlchan Nov 29 '11 at 13:40

What you are asking is not possible with TeX or LaTeX. To isolate the problem and reduce the text to what at least can be nearer to a MWE, I suggest that you use a method that resembles the bisection method that one uses to calculate roots.

First more or less position an \end{document} at the place where as far as you remember the bug did not exist. If this compiles with no error, you are now sure that there is no bug in the lines up to that point. Move the \end{document} to the line approximately half-way between the remaining text and repeat until, you got a block, where the problem is located. You can then start clearing text to make a minimal.

In many instances, problems arise with auxiliary files and is worth trying deleting all auxiliary files and running plain pdfLaTeX or its variants, i.e., without indexing and bibliographies to see if the error disappears.

Unfortunately, it's all tedious, but this is the only way.