src/latex_include/main.py
latexInclude(inFile, outFile, includeDir=None)
Start recursively resolving inputs/includes
| Parameters: |
|
|---|
Source code in src/latex_include/main.py
107 108 109 110 111 112 113 114 115 116 117 118 | |
latexIncludeFiles(inPath, outPath=None, overwrite=False)
Open files and call latexInclude with them using inPath's parent as includeDir
Both files can be given as pathlib.Path or string.
We require inPath instead of defaulting to stdin, because we need
its directory to resolve relative input/include paths in the LaTeX code
| Parameters: |
|
|---|
| Raises: |
|
|---|
Note
FileNotFoundError and FileExistsError are specializations of OSError,
so catch them before OSError.
Source code in src/latex_include/main.py
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 | |
main()
Called from command line
Parses command line for input and output and calls latexIncludeFiles with them.
If output exists an additional command line flag is required to overwrite it.
Source code in src/latex_include/main.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | |