-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improved Error in :mod:
.utils.tex_file_writing
(#2574)
* Better Error and insight * Do not use keywords as identifiers * add_tests * Nasty comma * Windows does its own thing * Use os.path.join for windows * Do not log path * Include Insights * Full stop. Co-authored-by: Darylgolden <[email protected]> * Full stop to test data. Co-authored-by: Darylgolden <[email protected]>
- Loading branch information
1 parent
d202d26
commit 5b11a0e
Showing
4 changed files
with
72 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{"levelname": "INFO", "module": "logger_utils", "message": "Log file will be saved in <>"} | ||
{"levelname": "INFO", "module": "tex_file_writing", "message": "Writing \\frac{1}{0} to <>"} | ||
{"levelname": "ERROR", "module": "tex_file_writing", "message": "LaTeX compilation error: LaTeX Error: File `notapackage.sty' not found.\n"} | ||
{"levelname": "ERROR", "module": "tex_file_writing", "message": "Context of error: \n\\documentclass[preview]{standalone}\n-> \\usepackage{notapackage}\n\\begin{document}\n\n\\begin{center}\n"} | ||
{"levelname": "INFO", "module": "tex_file_writing", "message": "You do not have package notapackage.sty installed."} | ||
{"levelname": "INFO", "module": "tex_file_writing", "message": "Install notapackage.sty it using your LaTeX package manager, or check for typos."} | ||
{"levelname": "ERROR", "module": "tex_file_writing", "message": "LaTeX compilation error: Emergency stop.\n"} | ||
{"levelname": "ERROR", "module": "tex_file_writing", "message": "Context of error: \n\\documentclass[preview]{standalone}\n-> \\usepackage{notapackage}\n\\begin{document}\n\n\\begin{center}\n"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
from manim import Scene, Tex, TexTemplate | ||
|
||
|
||
class BadTex(Scene): | ||
def construct(self): | ||
tex_template = TexTemplate(preamble=r"\usepackage{notapackage}") | ||
some_tex = r"\frac{1}{0}" | ||
my_tex = Tex(some_tex, tex_template=tex_template) | ||
self.add(my_tex) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters