This gist outlines a method to embed a secret message within a LaTeX document through the use of variable length spaces, ultimately rendered in a PDF. This technique is a form of steganography, allowing information to be hidden in plain sight, with the secret message being undetectable to casual observation.
The first step involves creating a Python script that processes a given text (the content of the LaTeX file) and a secret message. This script converts the secret message into a binary string, where each bit (0 or 1) corresponds to a specific spacing in the LaTeX document. The spaces are not uniform; 0 might correspond to a smaller space, while 1 corresponds to a larger space. This variation in spacing is subtle and typically unnoticed by readers, but it can be used to encode binary data.
Below is a simplified version of the Python script that generates a LaTeX file embedding a secret message:
content = '''Your document content goes here...'''