Remove unnecessary section titles from the LaTeX file.
(lines)
| 28 | return lines |
| 29 | |
| 30 | def process_tex(lines): |
| 31 | """ |
| 32 | Remove unnecessary section titles from the LaTeX file. |
| 33 | |
| 34 | """ |
| 35 | new_lines = [] |
| 36 | for line in lines: |
| 37 | if (line.startswith(r'\section{numpy.') |
| 38 | or line.startswith(r'\subsection{numpy.') |
| 39 | or line.startswith(r'\subsubsection{numpy.') |
| 40 | or line.startswith(r'\paragraph{numpy.') |
| 41 | or line.startswith(r'\subparagraph{numpy.') |
| 42 | ): |
| 43 | pass # skip! |
| 44 | else: |
| 45 | new_lines.append(line) |
| 46 | return new_lines |
| 47 | |
| 48 | if __name__ == "__main__": |
| 49 | main() |