MCPcopy Create free account
hub / github.com/numpy/numpy / process_tex

Function process_tex

doc/postprocess.py:30–46  ·  view source on GitHub ↗

Remove unnecessary section titles from the LaTeX file.

(lines)

Source from the content-addressed store, hash-verified

28 return lines
29
30def 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
48if __name__ == "__main__":
49 main()

Callers 1

mainFunction · 0.85

Calls 1

startswithMethod · 0.80

Tested by

no test coverage detected