{"record":{"id":"ab913bd62842cc16","repo":"3b1b/manim","slug":"compiler-compiler-is-not-implemented","errorCode":null,"errorMessage":"Compiler '{compiler}' is not implemented","messagePattern":"Compiler '(.+?)' is not implemented","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"manimlib/utils/tex_file_writing.py","lineNumber":99,"sourceCode":"\n    compiler, preamble = get_tex_config(template)\n\n    preamble = \"\\n\".join([preamble, additional_preamble])\n    full_tex = get_full_tex(latex, preamble)\n    return full_tex_to_svg(full_tex, compiler, message)\n\n\n@cache_on_disk\ndef full_tex_to_svg(full_tex: str, compiler: str = \"latex\", message: str = \"\"):\n    if message:\n        print(message, end=\"\\r\")\n\n    if compiler == \"latex\":\n        dvi_ext = \".dvi\"\n    elif compiler == \"xelatex\":\n        dvi_ext = \".xdv\"\n    else:\n        raise NotImplementedError(f\"Compiler '{compiler}' is not implemented\")\n\n    # Use the custom LaTeX cache directory from the config\n    temp_dir = Path(manim_config.directories.latex_cache)\n    temp_dir.mkdir(exist_ok=True)  # Create the directory if it does not already exist\n\n    # Define paths for the intermediate TeX and DVI files\n    tex_path = temp_dir / \"working.tex\"\n    dvi_path = tex_path.with_suffix(dvi_ext)\n\n    # Write tex file\n    tex_path.write_text(full_tex)\n\n    # Run latex compiler\n    process = subprocess.run(\n        [\n            compiler,\n            *([\"-no-pdf\"] if compiler == \"xelatex\" else []),\n            \"-interaction=batchmode\",","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/3b1b/manim/blob/dee01804d47b9f94402d71472674710dcac125b8/manimlib/utils/tex_file_writing.py#L81-L117","documentation":"Raised by full_tex_to_svg (tex_file_writing.py:99) when the compiler string is anything other than 'latex' or 'xelatex' — those two names determine the dvi extension ('.dvi' vs '.xdv'), and no other compiler is mapped. It is a NotImplementedError by design: only the DVI-producing pipelines are wired up.","triggerScenarios":"Setting tex_compiler: 'pdflatex' or 'lualatex' in the manim config, or calling full_tex_to_svg(tex, compiler='pdflatex'). Passing 'latex' or 'xelatex' works; any other string (including case variants like 'LaTeX') raises.","commonSituations":"Users porting configs from manim-community (which supports pdflatex/lualatex) to manimlib; needing CJK/Unicode and trying compilers other than xelatex; typos or case mismatch in the config key.","solutions":["Use compiler='xelatex' (or 'latex'); for Unicode/CJK documents choose xelatex with appropriate fonts","Check for typos/case in the config value; it must match exactly","If you truly need another compiler, patch full_tex_to_svg to map it to a dvi-like extension — but prefer the supported pair"],"exampleFix":"# before\nfull_tex_to_svg(tex, compiler='pdflatex')  # raises NotImplementedError\n\n# after\nfull_tex_to_svg(tex, compiler='xelatex')","handlingStrategy":"validation","validationCode":"assert compiler in ('latex', 'xelatex'), \\\n    f\"unsupported compiler '{compiler}': manimlib only implements 'latex' and 'xelatex'\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict tex_compiler config to 'latex' or 'xelatex'","Use xelatex for Unicode/CJK documents","Do not port manim-community compiler names (pdflatex/lualatex) into manimlib configs"],"tags":["manim","latex","compiler","not-implemented","configuration"],"backgroundTag":null,"analyzedSha":"dee01804d47b9f94402d71472674710dcac125b8","analyzedAt":"2026-08-14T19:53:44.241Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}