fix: updated docstrings and variable naming

This commit is contained in:
Caffein3 2026-06-17 10:07:55 +08:00
commit 9c8b61e722

View file

@ -188,7 +188,8 @@ def compile_tex(
tex_file
File name of TeX file to be typeset.
tex_compiler
String containing the compiler to be used, e.g. ``pdflatex`` or ``lualatex``
The TeX compiler(s) to be used.
Can be a single compiler (e.g. ``"latex"``, ``"pdflatex"`` ``"lualatex"``) or a list of compilers to compile in order (e.g. ``["lualatex", "pdflatex"]``).
output_format
String containing the output format generated by the compiler, e.g. ``.dvi`` or ``.pdf``
@ -199,11 +200,11 @@ def compile_tex(
"""
result = tex_file.with_suffix(output_format)
tex_dir = config.get_dir("tex_dir")
tex_compiler = [tex_compiler] if isinstance(tex_compiler, str) else tex_compiler
tex_compilers = [tex_compiler] if isinstance(tex_compiler, str) else tex_compiler
if not result.exists():
for i, compiler in enumerate(tex_compiler, start=1):
if len(tex_compiler) > 1:
logger.info(f"Compiling {i} of {len(tex_compiler)}: {compiler}")
for i, compiler in enumerate(tex_compilers, start=1):
if len(tex_compilers) > 1:
logger.info(f"Compiling {i} of {len(tex_compilers)}: {compiler}")
command = make_tex_compilation_command(
compiler,
output_format,