def iter_tex_documents(base_dir="."):
    """Iterate through all .tex documents in the current directory."""
    for path, dirlist, filelist in os.walk(base_dir):
        for name in fnmatch.filter(filelist, "*.tex"):
            yield os.path.join(path, name)
Iterate through all .tex documents in the current directory.