| # Copyright (c) 2018, Intel Corporation |
| # SPDX-License-Identifier: Apache-2.0 |
| # Fix the .tex file produced by doxygen |
| # before feeding to pdflatex or latexmk. |
| def regex_replace(tex_file): |
| ("}}\r?\n=\r?\n\r?\n\t{6}", "}} = ") |
| f = open(tex_file, mode='r', encoding="utf-8") |
| content = re.sub(p[0], p[1], content) |
| f = open(tex_file, mode='w', encoding="utf-8") |
| parser = argparse.ArgumentParser(description='Fix the .tex file produced ' |
| 'by doxygen before feeding it to ' |
| 'latexmk (or pdflatex).') |
| parser.add_argument('tex_file', nargs=1) |
| args = parser.parse_args() |
| regex_replace(args.tex_file[0]) |
| if __name__ == "__main__": |